|
21 | 21 | traits, TraitedSpec, BaseInterfaceInputSpec, SimpleInterface, |
22 | 22 | File, InputMultiPath, OutputMultiPath) |
23 | 23 | from nipype.interfaces import fsl |
24 | | -from fmriprep.utils.misc import remove_rotation_and_shear |
25 | 24 |
|
26 | 25 | LOGGER = logging.getLogger('nipype.interface') |
27 | 26 |
|
@@ -294,7 +293,6 @@ def _run_interface(self, runtime): |
294 | 293 |
|
295 | 294 | class ValidateImageInputSpec(BaseInterfaceInputSpec): |
296 | 295 | in_file = File(exists=True, mandatory=True, desc='input image') |
297 | | - remove_rotation_and_shear = traits.Bool(False, usedefault=True) |
298 | 296 |
|
299 | 297 |
|
300 | 298 | class ValidateImageOutputSpec(TraitedSpec): |
@@ -344,7 +342,6 @@ class ValidateImage(SimpleInterface): |
344 | 342 | output_spec = ValidateImageOutputSpec |
345 | 343 |
|
346 | 344 | def _run_interface(self, runtime): |
347 | | - |
348 | 345 | img = nb.load(self.inputs.in_file) |
349 | 346 | out_report = os.path.join(runtime.cwd, 'report.html') |
350 | 347 |
|
@@ -373,14 +370,7 @@ def _run_interface(self, runtime): |
373 | 370 |
|
374 | 371 | # Both match, qform valid (implicit with match), codes okay -> do nothing, empty report |
375 | 372 | if matching_affines and qform_code > 0 and sform_code > 0: |
376 | | - if self.inputs.remove_rotation_and_shear: |
377 | | - out_fname = fname_presuffix(self.inputs.in_file, suffix='_valid', |
378 | | - newpath=runtime.cwd) |
379 | | - img = remove_rotation_and_shear(img) |
380 | | - img.to_filename(out_fname) |
381 | | - self._results['out_file'] = out_fname |
382 | | - else: |
383 | | - self._results['out_file'] = self.inputs.in_file |
| 373 | + self._results['out_file'] = self.inputs.in_file |
384 | 374 | open(out_report, 'w').close() |
385 | 375 | self._results['out_report'] = out_report |
386 | 376 | return runtime |
@@ -428,9 +418,6 @@ def _run_interface(self, runtime): |
428 | 418 | </p> |
429 | 419 | """ |
430 | 420 | snippet = '<h3 class="elem-title">%s</h3>\n%s\n' % (warning_txt, description) |
431 | | - |
432 | | - if self.inputs.remove_rotation_and_shear: |
433 | | - img = remove_rotation_and_shear(img) |
434 | 421 | # Store new file and report |
435 | 422 | img.to_filename(out_fname) |
436 | 423 | with open(out_report, 'w') as fobj: |
|
0 commit comments