44from .base import ANTSCommandInputSpec , ANTSCommand , FixHeaderANTSCommand
55
66
7- class _ImageMathInputSpec (ANTSCommandInputSpec ):
7+ class ImageMathInputSpec (ANTSCommandInputSpec ):
88 dimension = traits .Int (
99 3 , usedefault = True , position = 1 , argstr = "%d" , desc = "dimension of output image"
1010 )
@@ -63,7 +63,7 @@ class _ImageMathInputSpec(ANTSCommandInputSpec):
6363 )
6464
6565
66- class _ImageMathOuputSpec (TraitedSpec ):
66+ class ImageMathOuputSpec (TraitedSpec ):
6767 output_image = File (exists = True , desc = "output image file" )
6868
6969
@@ -94,11 +94,11 @@ class ImageMath(FixHeaderANTSCommand):
9494 """
9595
9696 _cmd = "ImageMath"
97- input_spec = _ImageMathInputSpec
98- output_spec = _ImageMathOuputSpec
97+ input_spec = ImageMathInputSpec
98+ output_spec = ImageMathOuputSpec
9999
100100
101- class _ResampleImageBySpacingInputSpec (ANTSCommandInputSpec ):
101+ class ResampleImageBySpacingInputSpec (ANTSCommandInputSpec ):
102102 dimension = traits .Int (
103103 3 , usedefault = True , position = 1 , argstr = "%d" , desc = "dimension of output image"
104104 )
@@ -142,7 +142,7 @@ class _ResampleImageBySpacingInputSpec(ANTSCommandInputSpec):
142142 )
143143
144144
145- class _ResampleImageBySpacingOutputSpec (TraitedSpec ):
145+ class ResampleImageBySpacingOutputSpec (TraitedSpec ):
146146 output_image = File (exists = True , desc = "resampled file" )
147147
148148
@@ -180,8 +180,8 @@ class ResampleImageBySpacing(FixHeaderANTSCommand):
180180 """
181181
182182 _cmd = "ResampleImageBySpacing"
183- input_spec = _ResampleImageBySpacingInputSpec
184- output_spec = _ResampleImageBySpacingOutputSpec
183+ input_spec = ResampleImageBySpacingInputSpec
184+ output_spec = ResampleImageBySpacingOutputSpec
185185
186186 def _format_arg (self , name , trait_spec , value ):
187187 if name == "out_spacing" :
@@ -193,7 +193,7 @@ def _format_arg(self, name, trait_spec, value):
193193 return super (ResampleImageBySpacing , self )._format_arg (name , trait_spec , value )
194194
195195
196- class _ThresholdImageInputSpec (ANTSCommandInputSpec ):
196+ class ThresholdImageInputSpec (ANTSCommandInputSpec ):
197197 dimension = traits .Int (
198198 3 , usedefault = True , position = 1 , argstr = "%d" , desc = "dimension of output image"
199199 )
@@ -244,7 +244,7 @@ class _ThresholdImageInputSpec(ANTSCommandInputSpec):
244244 )
245245
246246
247- class _ThresholdImageOutputSpec (TraitedSpec ):
247+ class ThresholdImageOutputSpec (TraitedSpec ):
248248 output_image = File (exists = True , desc = "resampled file" )
249249
250250
@@ -275,11 +275,11 @@ class ThresholdImage(FixHeaderANTSCommand):
275275 """
276276
277277 _cmd = "ThresholdImage"
278- input_spec = _ThresholdImageInputSpec
279- output_spec = _ThresholdImageOutputSpec
278+ input_spec = ThresholdImageInputSpec
279+ output_spec = ThresholdImageOutputSpec
280280
281281
282- class _AIInputSpec (ANTSCommandInputSpec ):
282+ class AIInputSpec (ANTSCommandInputSpec ):
283283 dimension = traits .Enum (
284284 3 , 2 , usedefault = True , argstr = "-d %d" , desc = "dimension of output image"
285285 )
@@ -359,7 +359,7 @@ class _AIInputSpec(ANTSCommandInputSpec):
359359 )
360360
361361
362- class _AIOuputSpec (TraitedSpec ):
362+ class AIOuputSpec (TraitedSpec ):
363363 output_transform = File (exists = True , desc = "output file name" )
364364
365365
@@ -388,8 +388,8 @@ class AI(ANTSCommand):
388388 """
389389
390390 _cmd = "antsAI"
391- input_spec = _AIInputSpec
392- output_spec = _AIOuputSpec
391+ input_spec = AIInputSpec
392+ output_spec = AIOuputSpec
393393
394394 def _run_interface (self , runtime , correct_return_codes = (0 ,)):
395395 runtime = super (AI , self )._run_interface (runtime , correct_return_codes )
@@ -824,3 +824,14 @@ class LabelGeometry(ANTSCommand):
824824 _cmd = "LabelGeometryMeasures"
825825 input_spec = LabelGeometryInputSpec
826826 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