simnibs.SubjectFiles

class simnibs.SubjectFiles(fnamehead: str | None = None, subpath: str | None = None)

Class to find files for a given subject

Parameters:
  • fnamehead (str (optional)) – Path to head mesh. Either fnamehead or subpath need to be set. subpath has preference when it comes to finding other files.

  • subpath (str (optional)) – Path to m2m_folder. Either fnamehead or subpath need to be set. subpath has preference when it comes to finding other files

fnamehead

Path to head mesh (.msh)

Type:

str

subpath

Path to m2m_folder (dir)

Type:

str

subid

The subject ID (eg: ernie)

Type:

str

tensor_file

Path to the NIfTI file with the tensor conductivity information (.nii.gz)

Type:

str

eeg_cap_folder

Path to the folder with EEG caps (dir)

Type:

str

segmentation_folder

Path to the output from the segmentation

Type:

str

surface_folder

Path to surfaces from middle GM reconstruction

Type:

str

label_prep_folder

Path to the output from upsampling

Type:

str

mni_transf_folder

Path to MNI transformations

Type:

str

eeg_cap_1010

Path to the EEG 10-10 electrode file (.csv)

Type:

str

reference_volume

Path to the reference subject volume (T1.nii.gz)

Type:

str

mni2conf_nonl

MNI to conform nonlinear transformation (.nii.gz)

Type:

str

conf2mni_nonl

Conform to MNI nonlinear tansformation (.nii.gz)

Type:

str

mni2conf_6dof

MNI to conform 6 DOF transfomation (.txt or .mat)

Type:

str

mni2conf_12dof

MNI to conform 12 DOF transfomation (.txt or .mat)

Type:

str

final_labels_MNI

Label image created from final mesh in MNI space

Type:

str

hemispheres

Hemisphere names.

Type:

list

surfaces

Dictionary of ‘standard’ surfaces which are present after running CHARM. Each entry is a dict with hemispheres as keys pointing to the corresponding surface file.

Type:

dict

morph_data

Dictionary of ‘standard’ morphometry data which os present after running CHARM. Each entry is a dict with hemispheres as keys pointing to the corresponding morph file.

Type:

dict

T1

T1 image after applying transformations

Type:

str

T2_reg

T2 image after rigid co-registration to T1

Type:

str

T1_denoised

T1 image after running filtering (optional)

Type:

str

T2_reg_denoised

T2 image after co-registration and filtering (optional)

Type:

str

T1_bias_corrected

T1 image after bias correction

Type:

str

T2_reg_bias_corrected

T2 image after bias correction

Type:

str

labeling

Output segmentation from samseg

Type:

str

final_labels

Label image created from final mesh

Type:

str

template_coregistered

Affine mapping from atlas voxel space to T1 voxel space

Type:

str

T1_upsampled

Bias corrected T1 upsampled to 0.5mm^3 resolution

Type:

str

T2_upsampled

Bias corrected T2 upsampled to 0.5mm^3 resolution

Type:

str

tissue_labeling_upsampled

Labeling mapped to conductivity values and reconstructed at 0.5mm^3 resolution

Type:

str

head_mesh

Final head mesh

Type:

str

cerebrum_mask

Mask indicating cerebrum and cerebellum. Needed for surfaces.

Type:

str

norm_image

Normalized intensity image. Needed for surfaces.

Type:

str

subcortical_mask

Mask of subcortical structures. Needed for surfaces

Type:

str

parahippo_mask

Mask of parahippocampal area. Needed for surfaces.

Type:

str

hemi_mask

Mask indicating left/right. Needed for surfaces.

Type:

str

charm_log

The charm run log (.html)

Type:

str

summary_report

html summarizing the run and linking to the reports (.html)

Type:

str

Warning

This class does not check for existance of the files

__init__(fnamehead: str | None = None, subpath: str | None = None)

Methods

__init__([fnamehead, subpath])

get_eeg_cap([cap_name])

Gets the name of an EEG cap for this subject

get_morph_data(hemi, data[, subsampling])

Get morphometry data files, e.g., thickness.

get_surface(hemi, surface[, subsampling])

Get surface files, e.g., central, pial, sphere, sphere.reg