Home · Quickstart · Documentation · Citation · NiPy

# interfaces.cmtk.parcellation

## Parcellate

Link to code

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

Inputs:

    [Mandatory]
    subject_id: (a string)
            Subject ID

    [Optional]
    dilation: (a boolean, nipype default value: False)
            Dilate cortical parcels? Useful for fMRI connectivity
    freesurfer_dir: (an existing directory name)
            Freesurfer main directory
    ignore_exception: (a boolean, nipype default value: False)
            Print an error message instead of throwing an exception in case the
            interface fails to run
    out_roi_file: (a file name)
            Region of Interest file for connectivity mapping
    parcellation_name: ('scale33' or 'scale60' or 'scale125' or
             'scale250' or 'scale500', nipype default value: scale500)
    subject_id: (a string)
            Subject ID
    subjects_dir: (an existing directory name)
            Freesurfer subjects directory

Outputs:

    aseg_file: (an existing file name)
            Automated segmentation file converted from Freesurfer "subjects"
            directory
    cc_unknown_file: (an existing file name)
            Image file with regions labelled as unknown cortical structures
    dilated_roi_file_in_structural_space: (a file name)
            dilated ROI image resliced to the dimensions of the original
            structural image
    ribbon_file: (an existing file name)
            Image file detailing the cortical ribbon
    roi_file: (an existing file name)
            Region of Interest file for connectivity mapping
    roi_file_in_structural_space: (an existing file name)
            ROI image resliced to the dimensions of the original structural
            image
    roiv_file: (a file name)
            Region of Interest file for fMRI connectivity mapping
    white_matter_mask_file: (an existing file name)
            White matter mask file

## `create_annot_label()`

Link to code

## `create_roi()`

Link to code

Creates the ROI_%s.nii.gz files using the given parcellation information from networks. Iteratively create volume.

## `create_wm_mask()`

Link to code

## `crop_and_move_datasets()`

Link to code

## `extract()`

Link to code

Extract voxel neighbourhood Parameters ~~~~~~~~~~ Z: the original data shape: tuple containing neighbourhood dimensions position: tuple containing central point indexes fill: value for the padding of Z Returns ~~~~~~~ R: the neighbourhood of the specified point in Z