Skip to content

Commit 33d72e7

Browse files
committed
Merge pull request #516 from satra/fix/mcr
WIP: when using mcr set nodesktop and nosplash to undefined
2 parents 9a65d4e + a0121b5 commit 33d72e7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

nipype/interfaces/spm/base.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,15 @@
99
from copy import deepcopy
1010

1111
# Third-party imports
12+
from nibabel import load
1213
import numpy as np
1314
from scipy.io import savemat
1415

1516
# Local imports
16-
from nipype.interfaces.base import (BaseInterface, traits, isdefined,
17-
InputMultiPath, BaseInterfaceInputSpec,
18-
Directory)
19-
20-
from nibabel import load
21-
from nipype.interfaces.matlab import MatlabCommand
22-
23-
import nipype.utils.spm_docs as sd
17+
from ..base import (BaseInterface, traits, isdefined, InputMultiPath,
18+
BaseInterfaceInputSpec, Directory, Undefined)
19+
from ..matlab import MatlabCommand
20+
from ...utils import spm_docs as sd
2421

2522
from ... import logging
2623
logger = logging.getLogger('interface')
@@ -222,6 +219,9 @@ def _matlab_cmd_update(self):
222219
uses_mcr=self.inputs.use_mcr)
223220
self.mlab.inputs.script_file = 'pyscript_%s.m' % \
224221
self.__class__.__name__.split('.')[-1].lower()
222+
if isdefined(self.inputs.use_mcr) and self.inputs.use_mcr:
223+
self.mlab.inputs.nodesktop = Undefined
224+
self.mlab.inputs.nosplash = Undefined
225225

226226
@property
227227
def jobtype(self):

0 commit comments

Comments
 (0)