11# -*- coding: utf-8 -*-
2- """The ants module provides basic functions for interfacing with ants functions.
2+ """The ants module provides basic functions for interfacing with ants
3+ functions.
34
45 Change directory to provide relative paths for doctests
56 >>> import os
67 >>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
78 >>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data'))
89 >>> os.chdir(datadir)
910"""
10- from __future__ import print_function , division , unicode_literals , absolute_import
11+ from __future__ import (print_function , division , unicode_literals ,
12+ absolute_import )
1113from builtins import range , str
1214import os
1315
@@ -20,17 +22,19 @@ class ANTSInputSpec(ANTSCommandInputSpec):
2022 dimension = traits .Enum (3 , 2 , argstr = '%d' , usedefault = False ,
2123 position = 1 , desc = 'image dimension (2 or 3)' )
2224 fixed_image = InputMultiPath (File (exists = True ), mandatory = True ,
23- desc = ('image to which the moving image is warped' ))
25+ desc = ('image to which the moving image is '
26+ 'warped' ))
2427 moving_image = InputMultiPath (File (exists = True ), argstr = '%s' ,
2528 mandatory = True ,
26- desc = ('image to apply transformation to (generally a coregistered '
29+ desc = ('image to apply transformation to '
30+ '(generally a coregistered'
2731 'functional)' ))
2832
2933# Not all metrics are appropriate for all modalities. Also, not all metrics
30- # are efficeint or appropriate at all resolution levels, Some metrics perform
31- # well for gross global registraiton, but do poorly for small changes (i.e.
32- # Mattes), and some metrics do well for small changes but don't work well for
33- # gross level changes (i.e. 'CC').
34+ # are efficeint or appropriate at all resolution levels, Some metrics
35+ # perform well for gross global registraiton, but do poorly for small
36+ # changes (i.e. Mattes), and some metrics do well for small changes but
37+ # don't work well for gross level changes (i.e. 'CC').
3438#
3539# This is a two stage registration. in the first stage
3640# [ 'Mattes', .................]
@@ -49,10 +53,18 @@ class ANTSInputSpec(ANTSCommandInputSpec):
4953 metric = traits .List (traits .Enum ('CC' , 'MI' , 'SMI' , 'PR' , 'SSD' ,
5054 'MSQ' , 'PSE' ), mandatory = True , desc = '' )
5155
52- metric_weight = traits .List (traits .Float (), requires = ['metric' ], desc = '' )
53- radius = traits .List (traits .Int (), requires = ['metric' ], desc = '' )
56+ metric_weight = traits .List (traits .Float (), value = [1.0 ], usedefault = True ,
57+ requires = ['metric' ], mandatory = True ,
58+ desc = 'the metric weight(s) for each stage. '
59+ 'The weights must sum to 1 per stage.' )
5460
55- output_transform_prefix = Str ('out' , usedefault = True , argstr = '--output-naming %s' ,
61+ radius = traits .List (traits .Int (), requires = ['metric' ], mandatory = True ,
62+ desc = 'radius of the region (i.e. number of layers'
63+ ' around a voxel point)'
64+ ' that is used for computing cross correlation' )
65+
66+ output_transform_prefix = Str ('out' , usedefault = True ,
67+ argstr = '--output-naming %s' ,
5668 mandatory = True , desc = '' )
5769 transformation_model = traits .Enum ('Diff' , 'Elast' , 'Exp' , 'Greedy Exp' ,
5870 'SyN' , argstr = '%s' , mandatory = True ,
0 commit comments