1
1
# -*- 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.
3
4
4
5
Change directory to provide relative paths for doctests
5
6
>>> import os
6
7
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
7
8
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data'))
8
9
>>> os.chdir(datadir)
9
10
"""
10
- from __future__ import print_function , division , unicode_literals , absolute_import
11
+ from __future__ import (print_function , division , unicode_literals ,
12
+ absolute_import )
11
13
from builtins import range , str
12
14
import os
13
15
@@ -20,17 +22,19 @@ class ANTSInputSpec(ANTSCommandInputSpec):
20
22
dimension = traits .Enum (3 , 2 , argstr = '%d' , usedefault = False ,
21
23
position = 1 , desc = 'image dimension (2 or 3)' )
22
24
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' ))
24
27
moving_image = InputMultiPath (File (exists = True ), argstr = '%s' ,
25
28
mandatory = True ,
26
- desc = ('image to apply transformation to (generally a coregistered '
29
+ desc = ('image to apply transformation to '
30
+ '(generally a coregistered'
27
31
'functional)' ))
28
32
29
33
# 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').
34
38
#
35
39
# This is a two stage registration. in the first stage
36
40
# [ 'Mattes', .................]
@@ -49,10 +53,18 @@ class ANTSInputSpec(ANTSCommandInputSpec):
49
53
metric = traits .List (traits .Enum ('CC' , 'MI' , 'SMI' , 'PR' , 'SSD' ,
50
54
'MSQ' , 'PSE' ), mandatory = True , desc = '' )
51
55
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.' )
54
60
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' ,
56
68
mandatory = True , desc = '' )
57
69
transformation_model = traits .Enum ('Diff' , 'Elast' , 'Exp' , 'Greedy Exp' ,
58
70
'SyN' , argstr = '%s' , mandatory = True ,
0 commit comments