nipy/nipype — pull request #457 by hjmjohnson (2012-09-14 23:29:51+00:00)
Title: ENH:  Reorganize and expand the features from ANTS

The Advanced Normalization Toolkit is a nice set
of tools that allow for registration of medical
image registration. The "Normalization" tools available
contain both intensity normalization tools (i.e. N4) and
spatial normalizaiton tools (i.e. antsRegistration).

This effort attempts to make a more maintainable set of
nipye wrapping that closely follow the ANTS development.
The primary reason for this re-organization is to allow
the nipype interface for ANTS to very closely match the
on-going development of the ANTS tools themselves.

The guidelines used for this effort are as follows:

1) Where ever possible, nipype should mirror the command
line options. This rule is sometimes violated because
the command line tool option is a key work in nipype
(i.e. "input"), or to make nipype consistent across
tools.
2) One nipype wrap program per python file. This makes it easier
to find the appropriate file and to know what has been wrapped
from the command line tools. It also closely matches the
paradigm used for SEM wrapped programs, and it opens the door
for more consistent maintenance of the tools from the ANTS
original source code tree because there is a one-to-one mapping
between wrapper and function. The tools have too many permutations
of use to have them all globbed together.

3) python file name should match program name as closely as possible . That includes case sensitivity.
ENH: Make name match program.

for i in *.py; do
echo "$i $(grep _cmd $i) $(grep ${i//.py/}InputSpec\( $i)"
done

PYTHON FILE SHELL PROGRAM NAME NIPYPE WRAPPED NAME
=================================== ========================================= =====================================================================
ANTS.py _cmd = 'ANTS' class ANTSInputSpec(ANTSCommandInputSpec):
Atropos.py _cmd = 'Atropos' class AtroposInputSpec(ANTSCommandInputSpec):
AverageAffineTransform.py _cmd = 'AverageAffineTransform' class AverageAffineTransformInputSpec(ANTSCommandInputSpec):
AverageImages.py _cmd = 'AverageImages' class AverageImagesInputSpec(ANTSCommandInputSpec):
MultiplyImages.py _cmd = 'MultiplyImages' class MultiplyImagesInputSpec(ANTSCommandInputSpec):
N4BiasFieldCorrection.py _cmd = 'N4BiasFieldCorrection' class N4BiasFieldCorrectionInputSpec(ANTSCommandInputSpec):
WarpImageMultiTransform.py _cmd = 'WarpImageMultiTransform' class WarpImageMultiTransformInputSpec(ANTSCommandInputSpec):
WarpTimeSeriesImageMultiTransform.py _cmd = 'WarpTimeSeriesImageMultiTransform' class WarpTimeSeriesImageMultiTransformInputSpec(ANTSCommandInputSpec):
antsApplyTransforms.py _cmd = 'antsApplyTransforms' class antsApplyTransformsInputSpec(ANTSCommandInputSpec):
antsIntroduction.py _cmd = 'antsIntroduction.sh' class antsIntroductionInputSpec(ANTSCommandInputSpec):
antsRegistration.py _cmd = 'antsRegistration' class antsRegistrationInputSpec(CommandLineInputSpec):
buildtemplateparallel.py _cmd = 'buildtemplateparallel.sh' class buildtemplateparallelInputSpec(ANTSCommandInputSpec):

* This is only here for backwards compatibility, the antsApplyTransforms.py provides a more complete interface
alternateInterfaceApplyTransforms.py _cmd = 'antsApplyTransforms'

* These are entire workflow 'pipelets'
antsRegiatrationBuildTemplate.py
ANTSBuildTemplate.py

* These are infrastructure files
base.py
__init__.py
setup.py