Skip to content

fix: renamed mask_file to mask_files #1984

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions nipype/algorithms/confounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,6 @@ def _list_outputs(self):
class CompCorInputSpec(BaseInterfaceInputSpec):
realigned_file = File(exists=True, mandatory=True,
desc='already realigned brain image (4D)')
mask_file = InputMultiPath(File(exists=True, deprecated='0.13',
new_name='mask_files',
desc='One or more mask files that determines ROI (3D)'))
mask_files = InputMultiPath(File(exists=True,
desc='One or more mask files that determines ROI (3D)'))
merge_method = traits.Enum('union', 'intersect', 'none', xor=['mask_index'],
Expand Down Expand Up @@ -342,7 +339,7 @@ class CompCor(BaseInterface):
>>> ccinterface.inputs.num_components = 1
>>> ccinterface.inputs.use_regress_poly = True
>>> ccinterface.inputs.regress_poly_degree = 2

"""
input_spec = CompCorInputSpec
output_spec = CompCorOutputSpec
Expand All @@ -366,7 +363,7 @@ def _run_interface(self, runtime, tCompCor_mask=False):
mmap=NUMPY_MMAP).get_data()
components = None

if isdefined(self.inputs.mask_files) or isdefined(self.inputs.mask_file):
if isdefined(self.inputs.mask_files):
if (not isdefined(self.inputs.mask_index) and
not isdefined(self.inputs.merge_method)):
self.inputs.mask_index = 0
Expand Down Expand Up @@ -509,7 +506,7 @@ class TCompCor(CompCor):
>>> ccinterface.inputs.use_regress_poly = True
>>> ccinterface.inputs.regress_poly_degree = 2
>>> ccinterface.inputs.percentile_threshold = .03

"""

input_spec = TCompCorInputSpec
Expand Down Expand Up @@ -588,7 +585,7 @@ def _run_interface(self, runtime):
mask_file = os.path.abspath('mask.nii')
nb.Nifti1Image(mask_data, aff).to_filename(mask_file)
IFLOG.debug('tCompcor computed and saved mask of shape {} to '
'mask_file {}'.format(mask.shape, mask_file))
'mask file {}'.format(mask.shape, mask_file))
_out_masks.append(mask_file)
self._set_header('tCompCor')

Expand All @@ -604,7 +601,7 @@ def _run_interface(self, runtime):
mask_file = os.path.abspath('mask.nii')
nb.Nifti1Image(mask_data, aff).to_filename(mask_file)
IFLOG.debug('tCompcor computed and saved mask of shape {} to '
'mask_file {}'.format(mask.shape, mask_file))
'mask file {}'.format(mask.shape, mask_file))
_out_masks.append(mask_file)
self._set_header('tCompCor')

Expand Down Expand Up @@ -927,4 +924,3 @@ def regress_poly(degree, data, remove_mean=True, axis=-1):

# Back to original shape
return regressed_data.reshape(datashape)