Home · Quickstart · User Guide and Examples · Interfaces Index · Developers · About · Nipy

# nipype.interfaces.cmtk.parcellation module

## Parcellate

Link to code

> 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()

> subject_ida string

>   Subject ID.

> dilationa boolean

>   Dilate cortical parcels? Useful for fMRI connectivity. (Nipype default value: `False`)

> freesurfer_dira pathlike object or string representing an existing directory

>   Freesurfer main directory.

> out_roi_filea 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_dira pathlike object or string representing an existing directory

>   Freesurfer subjects directory.

> aseg_filea pathlike object or string representing an existing file

>   Automated segmentation file converted from Freesurfer “subjects” directory.

> cc_unknown_filea pathlike object or string representing an existing file

>   Image file with regions labelled as unknown cortical structures.

> dilated_roi_file_in_structural_spacea pathlike object or string representing a file

>   Dilated ROI image resliced to the dimensions of the original structural image.

> ribbon_filea pathlike object or string representing an existing file

>   Image file detailing the cortical ribbon.

> roi_filea pathlike object or string representing an existing file

>   Region of Interest file for connectivity mapping.

> roi_file_in_structural_spacea pathlike object or string representing an existing file

>   ROI image resliced to the dimensions of the original structural image.

> roiv_filea pathlike object or string representing a file

>   Region of Interest file for fMRI connectivity mapping.

> white_matter_mask_filea 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