File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -179,13 +179,18 @@ class SPMCommand(BaseInterface):
179179
180180 _jobtype = 'basetype'
181181 _jobname = 'basename'
182+
183+ _matlab_cmd = None
184+ _paths = None
185+ _use_mcr = None
182186
183187 def __init__ (self , ** inputs ):
184188 super (SPMCommand , self ).__init__ (** inputs )
185189 self .inputs .on_trait_change (self ._matlab_cmd_update , ['matlab_cmd' ,
186190 'mfile' ,
187191 'paths' ,
188192 'use_mcr' ])
193+ self ._check_mlab_inputs ()
189194 self ._matlab_cmd_update ()
190195
191196 def _matlab_cmd_update (self ):
@@ -206,10 +211,17 @@ def jobtype(self):
206211 @property
207212 def jobname (self ):
208213 return self ._jobname
214+
215+ def _check_mlab_inputs (self ):
216+ if not isdefined (self .inputs .matlab_cmd ) and self ._matlab_cmd :
217+ self .inputs .matlab_cmd = self ._matlab_cmd
218+ if not isdefined (self .inputs .paths ) and self ._paths :
219+ self .inputs .paths = self ._paths
220+ if not isdefined (self .inputs .use_mcr ) and self ._use_mcr :
221+ self .inputs .use_mcr = self ._use_mcr
209222
210223 def _run_interface (self , runtime ):
211224 """Executes the SPM function using MATLAB."""
212-
213225 self .mlab .inputs .script = self ._make_matlab_command (deepcopy (self ._parse_inputs ()))
214226 results = self .mlab .run ()
215227 runtime .returncode = results .runtime .returncode
You can’t perform that action at this time.
0 commit comments