nipy/nipype — pull request #795 by chrisfilo (2014-02-10 19:12:26+00:00)
Title: WIP: nipype_cmd - run any Interface from a command line

nipype_cmd --help

usage: nipype_cmd [-h] module interface

Nipype interface runner

positional arguments:
module Module name
interface Interface name

optional arguments:
-h, --help show this help message and exit

nipype_cmd nipype.interfaces.nipy

Available Interfaces:
SpaceTimeRealigner
Similarity
ComputeMask
FitGLM
EstimateContrast
FmriRealign4d

nipype_cmd nipype.interfaces.nipy ComputeMask --help

usage: nipype_cmd nipype.interfaces.nipy ComputeMask [-h] [--M M] [--cc CC]
[--ignore_exception IGNORE_EXCEPTION]
[--m M]
[--reference_volume REFERENCE_VOLUME]
mean_volume

Run ComputeMask

positional arguments:
mean_volume mean EPI image, used to compute the threshold for the
mask

optional arguments:
-h, --help show this help message and exit
--M M upper fraction of the histogram to be discarded
--cc CC Keep only the largest connected component
--ignore_exception IGNORE_EXCEPTION
Print an error message instead of throwing an
exception in case the interface fails to run
--m M lower fraction of the histogram to be discarded
--reference_volume REFERENCE_VOLUME
reference volume used to compute the mask. If none is
give, the mean volume is used.

nipype_cmd nipype.interfaces.nipy ComputeMask /tmp/mean_volume.nii

brain_mask = /tmp/mean_mask.nii.gz