@@ -46,13 +46,8 @@ class RigidInputSpec(CommandLineInputSpec):
46
46
ftol = traits .Float (mandatory = True , position = 4 , argstr = "%g" ,
47
47
desc = "cost function tolerance" , default_value = 0.01 ,
48
48
usedefault = True )
49
- # use_in_trans = traits.Bool(position=5, argstr="1",
50
- # desc="initialize with existing transform")
51
49
initialize_xfm = File (desc = "DTITK-FORMAT transform " ,
52
50
copyfile = False , position = 5 , argstr = "%s" )
53
- # need to enforce DTITK format or it's a silent failure
54
- # (can we search the stderr for keywords to error if not found?)
55
- # stderr: filename.aff doesn't exist or can't be opened
56
51
57
52
58
53
class RigidOutputSpec (TraitedSpec ):
@@ -86,6 +81,12 @@ class Rigid(CommandLineDtitk):
86
81
value = 1
87
82
return super(Rigid, self)._format_arg(name, spec, value)'''
88
83
84
+ def _run_interface (self , runtime ):
85
+ runtime = super (Rigid , self )._run_interface (runtime )
86
+ if '''.aff doesn't exist or can't be opened''' in runtime .stderr :
87
+ self .raise_exception (runtime )
88
+ return runtime
89
+
89
90
def _list_outputs (self ):
90
91
outputs = self .output_spec ().get ()
91
92
moving = self .inputs .moving_file
0 commit comments