nipype.interfaces.cmtk.parcellation module¶
Parcellate¶
Bases: LibraryBaseInterface
Subdivides segmented ROI file into smaller subregions
This interface implements the same procedure as in the ConnectomeMapper’s parcellation stage (cmp/stages/parcellation/maskcreation.py) for a single parcellation scheme (e.g. ‘scale500’).
Example
>>> import nipype.interfaces.cmtk as cmtk >>> parcellate = cmtk.Parcellate() >>> parcellate.inputs.freesurfer_dir = '.' >>> parcellate.inputs.subjects_dir = '.' >>> parcellate.inputs.subject_id = 'subj1' >>> parcellate.inputs.dilation = True >>> parcellate.inputs.parcellation_name = 'scale500' >>> parcellate.run()
- Mandatory Inputs:
subject_id (a string) – Subject ID.
- Optional Inputs:
dilation (a boolean) – Dilate cortical parcels? Useful for fMRI connectivity. (Nipype default value:
False
)freesurfer_dir (a pathlike object or string representing an existing directory) – Freesurfer main directory.
out_roi_file (a pathlike object or string representing a file) – Region of Interest file for connectivity mapping.
parcellation_name (‘scale33’ or ‘scale60’ or ‘scale125’ or ‘scale250’ or ‘scale500’) – (Nipype default value:
scale500
)subjects_dir (a pathlike object or string representing an existing directory) – Freesurfer subjects directory.
- Outputs:
aseg_file (a pathlike object or string representing an existing file) – Automated segmentation file converted from Freesurfer “subjects” directory.
cc_unknown_file (a pathlike object or string representing an existing file) – Image file with regions labelled as unknown cortical structures.
dilated_roi_file_in_structural_space (a pathlike object or string representing a file) – Dilated ROI image resliced to the dimensions of the original structural image.
ribbon_file (a pathlike object or string representing an existing file) – Image file detailing the cortical ribbon.
roi_file (a pathlike object or string representing an existing file) – Region of Interest file for connectivity mapping.
roi_file_in_structural_space (a pathlike object or string representing an existing file) – ROI image resliced to the dimensions of the original structural image.
roiv_file (a pathlike object or string representing a file) – Region of Interest file for fMRI connectivity mapping.
white_matter_mask_file (a pathlike object or string representing an existing file) – White matter mask file.
- Parcellate.imports = ('scipy',)¶
- nipype.interfaces.cmtk.parcellation.create_annot_label(subject_id, subjects_dir, fs_dir, parcellation_name)¶
- nipype.interfaces.cmtk.parcellation.create_roi(subject_id, subjects_dir, fs_dir, parcellation_name, dilation)¶
Creates the ROI_%s.nii.gz files using the given parcellation information from networks. Iteratively create volume.
- nipype.interfaces.cmtk.parcellation.create_wm_mask(subject_id, subjects_dir, fs_dir, parcellation_name)¶
- nipype.interfaces.cmtk.parcellation.crop_and_move_datasets(subject_id, subjects_dir, fs_dir, parcellation_name, out_roi_file, dilation)¶
- nipype.interfaces.cmtk.parcellation.extract(Z, shape, position, fill)¶
Extract voxel neighbourhood
- Parameters:
Z (array-like) – the original data
shape (tuple) – tuple containing neighbourhood dimensions
position (tuple) – tuple containing central point indexes
fill (float) – value for the padding of Z
- Returns:
R – the neighbourhood of the specified point in Z
- Return type:
ndarray