NIPY logo

Table Of Contents

Previous topic

nipype.workflows.camino.diffusion

Next topic

nipype.workflows.fsl.dti

This Page

nipype.workflows.freesurfer.utils

create_get_stats_flow()

Retrieves stats from labels

Parameters

name : string
name of workflow
withreg : boolean
indicates whether to register source to label

Example

Inputs:

inputspec.source_file : reference image for mask generation
inputspec.label_file : label file from which to get ROIs

(optionally with registration)
inputspec.reg_file : bbreg file (assumes reg from source to label
inputspec.inverse : boolean whether to invert the registration
inputspec.subjects_dir : freesurfer subjects directory

Outputs:

outputspec.stats_file : stats file

Graph

digraph getstats{

  label="getstats";

  getstats_inputspec[label="inputspec.IdentityInterface.utility"];

  getstats_segstats[label="segstats.SegStats.freesurfer"];

  getstats_outputspec[label="outputspec.IdentityInterface.utility"];

  getstats_inputspec -> getstats_segstats;

  getstats_inputspec -> getstats_segstats;

  getstats_segstats -> getstats_outputspec;

}

create_getmask_flow()

Registers a source file to freesurfer space and create a brain mask in source space

Requires fsl tools for initializing registration

Parameters

name : string
name of workflow
dilate_mask : boolean
indicates whether to dilate mask or not

Example

>>> getmask = create_getmask_flow()
>>> getmask.inputs.inputspec.source_file = 'mean.nii'
>>> getmask.inputs.inputspec.subject_id = 's1'
>>> getmask.inputs.inputspec.subjects_dir = '.'
>>> getmask.inputs.inputspec.contrast_type = 't2'

Inputs:

inputspec.source_file : reference image for mask generation
inputspec.subject_id : freesurfer subject id
inputspec.subjects_dir : freesurfer subjects directory
inputspec.contrast_type : MR contrast of reference image

Outputs:

outputspec.mask_file : binary mask file in reference image space
outputspec.reg_file : registration file that maps reference image to
                      freesurfer space
outputspec.reg_cost : cost of registration (useful for detecting misalignment)

Graph

digraph getmask{

  label="getmask";

  getmask_inputspec[label="inputspec.IdentityInterface.utility"];

  getmask_fssource[label="fssource.FreeSurferSource.io"];

  getmask_register[label="register.BBRegister.freesurfer"];

  getmask_threshold[label="threshold.Binarize.freesurfer"];

  getmask_transform[label="transform.ApplyVolTransform.freesurfer"];

  getmask_dilate[label="dilate.DilateImage.fsl"];

  getmask_threshold2[label="threshold2.Binarize.freesurfer"];

  getmask_outputspec[label="outputspec.IdentityInterface.utility"];

  getmask_inputspec -> getmask_fssource;

  getmask_inputspec -> getmask_fssource;

  getmask_inputspec -> getmask_register;

  getmask_inputspec -> getmask_register;

  getmask_inputspec -> getmask_register;

  getmask_inputspec -> getmask_register;

  getmask_inputspec -> getmask_transform;

  getmask_inputspec -> getmask_transform;

  getmask_fssource -> getmask_threshold;

  getmask_register -> getmask_transform;

  getmask_register -> getmask_outputspec;

  getmask_register -> getmask_outputspec;

  getmask_threshold -> getmask_transform;

  getmask_transform -> getmask_dilate;

  getmask_dilate -> getmask_threshold2;

  getmask_threshold2 -> getmask_outputspec;

}