I've met a 3dSkullStrip issue with Nipype, using the code (with my costumed T1) form the Nipype document page.
from nipype.interfaces import afni as afni
skullstrip = afni.SkullStrip()
skullstrip.inputs.in_file =
'/media/TOSHIBA_EXT/newdata2/cpac/work/resting_preproc_dp37_2/anat_preproc_0/anat_skullstrip/t1_resample.nii.gz'
1) skullstrip.inputs.args = '-o_ply'
res = skullstrip.run()
I aslo test the condition with the definition of outputtype and out_file.
2) skullstrip.inputs.args = '-o_ply'
skullstrip.inputs.outputtype = 'AFNI'
skullstrip.inputs.out_file = 'test'
res = skullstrip.run()
I could get the ply file and the skull-stripped NIFTI file in both
cases.
However, the same FileNotFoundError, 'XXX + orig.BRIK' not found for SkullStrip
output 'out_file', appeared in both.
One more thing, there is no error message if I run the same code in terminal.
140925-12:18:53,883 interface INFO:
stderr 2014-09-25T12:18:53.883272:The intensity in the output dataset is a modified version
140925-12:18:53,884 interface INFO:
stderr 2014-09-25T12:18:53.883272:of the intensity in the input volume.
140925-12:18:53,884 interface INFO:
stderr 2014-09-25T12:18:53.883272:To obtain a masked version of the input with identical values inside
140925-12:18:53,885 interface INFO:
stderr 2014-09-25T12:18:53.883272:the brain, you can either use 3dSkullStrip's -orig_vol option
140925-12:18:53,885 interface INFO:
stderr 2014-09-25T12:18:53.883272:or run the following command:
140925-12:18:53,886 interface INFO:
stderr 2014-09-25T12:18:53.883272: 3dcalc -a
/media/TOSHIBA_EXT/newdata2/cpac/work/resting_preproc_dp37_2/anat_preproc_0/anat_skullstrip/t1_resample.nii.gz
-b test+orig -expr 'a*step(b)' \
140925-12:18:53,886 interface INFO:
stderr 2014-09-25T12:18:53.883272: -prefix test_orig_vol
140925-12:18:53,887 interface INFO:
stderr 2014-09-25T12:18:53.883272:to generate a new masked version of the input.
FileNotFoundError Traceback (most recent call last)
/home/fmri/ in ()
5 skullstrip.inputs.outputtype = 'AFNI'
6 skullstrip.inputs.out_file = 'test'
----> 7 res = skullstrip.run()
/usr/local/lib/python2.7/dist-packages/nipype/interfaces/base.pyc in run(self, **inputs)
957 try:
958 runtime = self._run_interface(runtime)
--> 959 outputs = self.aggregate_outputs(runtime)
960 runtime.endTime = dt.isoformat(dt.utcnow())
961 timediff = parseutc(runtime.endTime) - parseutc(runtime.startTime)
/usr/local/lib/python2.7/dist-packages/nipype/interfaces/base.pyc in aggregate_outputs(self, runtime, needed_outputs)
1051 msg = ("File/Directory '%s' not found for %s output "
1052 "'%s'." % (val, self.class.name, key))
-> 1053 raise FileNotFoundError(msg)
1054 else:
1055 raise error
FileNotFoundError: File/Directory '/home/fmri/test+orig.BRIK' not
found for SkullStrip output 'out_file'. Interface SkullStrip failed to
run.
Any comments are appreciated.
Thanks
Meng
--
---
You received this message because you are subscribed to the Google Groups "NiPy Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nipy-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.