4
4
from .base import ANTSCommandInputSpec , ANTSCommand , FixHeaderANTSCommand
5
5
6
6
7
- class _ImageMathInputSpec (ANTSCommandInputSpec ):
7
+ class ImageMathInputSpec (ANTSCommandInputSpec ):
8
8
dimension = traits .Int (
9
9
3 , usedefault = True , position = 1 , argstr = "%d" , desc = "dimension of output image"
10
10
)
@@ -63,7 +63,7 @@ class _ImageMathInputSpec(ANTSCommandInputSpec):
63
63
)
64
64
65
65
66
- class _ImageMathOuputSpec (TraitedSpec ):
66
+ class ImageMathOuputSpec (TraitedSpec ):
67
67
output_image = File (exists = True , desc = "output image file" )
68
68
69
69
@@ -94,11 +94,11 @@ class ImageMath(FixHeaderANTSCommand):
94
94
"""
95
95
96
96
_cmd = "ImageMath"
97
- input_spec = _ImageMathInputSpec
98
- output_spec = _ImageMathOuputSpec
97
+ input_spec = ImageMathInputSpec
98
+ output_spec = ImageMathOuputSpec
99
99
100
100
101
- class _ResampleImageBySpacingInputSpec (ANTSCommandInputSpec ):
101
+ class ResampleImageBySpacingInputSpec (ANTSCommandInputSpec ):
102
102
dimension = traits .Int (
103
103
3 , usedefault = True , position = 1 , argstr = "%d" , desc = "dimension of output image"
104
104
)
@@ -142,7 +142,7 @@ class _ResampleImageBySpacingInputSpec(ANTSCommandInputSpec):
142
142
)
143
143
144
144
145
- class _ResampleImageBySpacingOutputSpec (TraitedSpec ):
145
+ class ResampleImageBySpacingOutputSpec (TraitedSpec ):
146
146
output_image = File (exists = True , desc = "resampled file" )
147
147
148
148
@@ -180,8 +180,8 @@ class ResampleImageBySpacing(FixHeaderANTSCommand):
180
180
"""
181
181
182
182
_cmd = "ResampleImageBySpacing"
183
- input_spec = _ResampleImageBySpacingInputSpec
184
- output_spec = _ResampleImageBySpacingOutputSpec
183
+ input_spec = ResampleImageBySpacingInputSpec
184
+ output_spec = ResampleImageBySpacingOutputSpec
185
185
186
186
def _format_arg (self , name , trait_spec , value ):
187
187
if name == "out_spacing" :
@@ -193,7 +193,7 @@ def _format_arg(self, name, trait_spec, value):
193
193
return super (ResampleImageBySpacing , self )._format_arg (name , trait_spec , value )
194
194
195
195
196
- class _ThresholdImageInputSpec (ANTSCommandInputSpec ):
196
+ class ThresholdImageInputSpec (ANTSCommandInputSpec ):
197
197
dimension = traits .Int (
198
198
3 , usedefault = True , position = 1 , argstr = "%d" , desc = "dimension of output image"
199
199
)
@@ -244,7 +244,7 @@ class _ThresholdImageInputSpec(ANTSCommandInputSpec):
244
244
)
245
245
246
246
247
- class _ThresholdImageOutputSpec (TraitedSpec ):
247
+ class ThresholdImageOutputSpec (TraitedSpec ):
248
248
output_image = File (exists = True , desc = "resampled file" )
249
249
250
250
@@ -275,11 +275,11 @@ class ThresholdImage(FixHeaderANTSCommand):
275
275
"""
276
276
277
277
_cmd = "ThresholdImage"
278
- input_spec = _ThresholdImageInputSpec
279
- output_spec = _ThresholdImageOutputSpec
278
+ input_spec = ThresholdImageInputSpec
279
+ output_spec = ThresholdImageOutputSpec
280
280
281
281
282
- class _AIInputSpec (ANTSCommandInputSpec ):
282
+ class AIInputSpec (ANTSCommandInputSpec ):
283
283
dimension = traits .Enum (
284
284
3 , 2 , usedefault = True , argstr = "-d %d" , desc = "dimension of output image"
285
285
)
@@ -359,7 +359,7 @@ class _AIInputSpec(ANTSCommandInputSpec):
359
359
)
360
360
361
361
362
- class _AIOuputSpec (TraitedSpec ):
362
+ class AIOuputSpec (TraitedSpec ):
363
363
output_transform = File (exists = True , desc = "output file name" )
364
364
365
365
@@ -388,8 +388,8 @@ class AI(ANTSCommand):
388
388
"""
389
389
390
390
_cmd = "antsAI"
391
- input_spec = _AIInputSpec
392
- output_spec = _AIOuputSpec
391
+ input_spec = AIInputSpec
392
+ output_spec = AIOuputSpec
393
393
394
394
def _run_interface (self , runtime , correct_return_codes = (0 ,)):
395
395
runtime = super (AI , self )._run_interface (runtime , correct_return_codes )
@@ -824,3 +824,14 @@ class LabelGeometry(ANTSCommand):
824
824
_cmd = "LabelGeometryMeasures"
825
825
input_spec = LabelGeometryInputSpec
826
826
output_spec = LabelGeometryOutputSpec
827
+
828
+
829
+ # For forward compatibility
830
+ _ImageMathInputSpec = ImageMathInputSpec
831
+ _ImageMathOuputSpec = ImageMathOuputSpec
832
+ _ResampleImageBySpacingInputSpec = ResampleImageBySpacingInputSpec
833
+ _ResampleImageBySpacingOutputSpec = ResampleImageBySpacingOutputSpec
834
+ _ThresholdImageInputSpec = ThresholdImageInputSpec
835
+ _ThresholdImageOutputSpec = ThresholdImageOutputSpec
836
+ _AIInputSpec = AIInputSpec
837
+ _AIOuputSpec = AIOuputSpec
0 commit comments