A 3dSkullStrip issue on Nipype 0.9.2

67 views
Skip to first unread message

Leemon Albert

unread,
Sep 25, 2014, 6:52:59 AM9/25/14
to nipy...@googlegroups.com, Marie Wölfer
Hi, Nipype developers,

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

Satrajit Ghosh

unread,
Sep 26, 2014, 8:10:31 AM9/26/14
to nipy-user, Marie Wölfer
hi meng,

could you please try this with the current master branch of nipype?

cheers,

satra

--

---
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.

Leemon Albert

unread,
Sep 27, 2014, 6:40:21 AM9/27/14
to nipy...@googlegroups.com, Marie Wölfer, sa...@mit.edu
Hi Satra,

Thanks for your suggestion.  I am not sure about this.Because I need the custom branch, NIPYPE-CPAC.
But after reinstalling the AFNI, the error message is changed as follows.



     ['Node anat_skullstrip failed to run on host fmri-Canlab.']
140926-10:22:27,460 workflow INFO:
     Saving crash info to /media/TOSHIBA_EXT/newdata2/cpac/log/crash-20140926-102227-fmri-anat_skullstrip.pklz
140926-10:22:27,460 workflow INFO:
     Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nipype/pipeline/plugins/multiproc.py", line 18, in run_node
    result['result'] = node.run(updatehash=updatehash)
  File "/usr/local/lib/python2.7/dist-packages/nipype/pipeline/engine.py", line 1390, in run
    self._run_interface()
  File "/usr/local/lib/python2.7/dist-packages/nipype/pipeline/engine.py", line 1500, in _run_interface
    self._result = self._run_command(execute)
  File "/usr/local/lib/python2.7/dist-packages/nipype/pipeline/engine.py", line 1626, in _run_command
    result = self._interface.run()
  File "/usr/local/lib/python2.7/dist-packages/nipype/interfaces/base.py", line 958, in run
    runtime = self._run_interface(runtime)
  File "/usr/local/lib/python2.7/dist-packages/nipype/interfaces/base.py", line 1401, in _run_interface
    self.raise_exception(runtime)
  File "/usr/local/lib/python2.7/dist-packages/nipype/interfaces/base.py", line 1331, in raise_exception
    raise RuntimeError(message)
RuntimeError: Command:
3dSkullStrip -input /media/TOSHIBA_EXT/newdata2/cpac/work/resting_preproc_dp37_2/anat_preproc_0/anat_skullstrip/t1_resample.nii.gz -prefix t1_resample_skullstrip
Standard output:

Standard error:
No protocol specified
No protocol specified
freeglut (3dSkullStrip): failed to open display ':1'

Return code: 1

Interface SkullStrip failed to run.

Best
Meng

Satrajit Ghosh

unread,
Sep 27, 2014, 8:34:15 AM9/27/14
to Leemon Albert, nipy-user, Marie Wölfer
hi leemon,

that error might be related to ssh-ing in to a requirement in afni to have a display. you will need to either install xvfb or ssh in with X support.

regarding your original error, if you can't use nipype directly, you might be better off asking that question on the cpac mailing list. i don't know what changes they have made to the custom version.

cheers,

satra

Reply all
Reply to author
Forward
0 new messages