ReconAll and FreeSurferSource do not produce outputs, how to solve?

Hi,

I am using the latest Version: 0.13.1 of nipype on centos CentOS Linux release 7.3.1611.

  1. from nipype.interfaces.freesurfer import ReconAll
  2. from nipype.interfaces.io import FreeSurferSource

When the reconall node is completed, there are no outputs set for this node, all are , therefore I used FreeSurferSource to pull the outputs but this also failed to grab the outputs (same as you can see below.

Does anyone know how to solve this issue or bug? I don’t see any error messages or crash reports except for the nodes which are followed by reconall or FSSource (failed to get inputs from prev. nodes).

Execution Outputs

  • BA_stats :
  • T1 :
  • annot :
  • aparc_a2009s_stats :
  • aparc_aseg :
  • aparc_stats :
  • area_pial :
  • aseg :
  • aseg_stats :
  • avg_curv :
  • brain :
  • brainmask :
  • curv :
  • curv_pial :
  • curv_stats :
  • entorhinal_exvivo_stats :
  • filled :
  • graymid :
  • inflated :
  • jacobian_white :
  • label :
  • norm :
  • nu :
  • orig :
  • pial :
  • rawavg :
  • ribbon :
  • smoothwm :
  • sphere :
  • sphere_reg :
  • sulc :
  • thickness :
  • volume :
  • white :
  • wm :
  • wmparc :
  • wmparc_stats :

Runtime info

  • duration : 0.05551

Thanks in advance,

Best regards,


Shahid.

Hi Shahid,

It’s difficult to help without some more information. Does the reconall node create the freesurfer output folder? How long does it take to run the node? Could you provide the code that you used to run ReconAll and FreeSurferSoruce?

In theory, if you run recon-all with something like this, it should create the right reconall output:

from nipype.interfaces.freesurfer import ReconAll

# Create an output folder (you need to create this folder first)
out_dir = '/home/username/experiment/freesurfer'

# Setup the ReconAll Interface
reconall = ReconAll(directive='all', subjects_dir=out_dir, 
                    subject_id='sub-01',
                    T1_files='sub-01_T1w.nii.gz')

# Run the ReconAll Interface
reconall.run()

After you’ve run this, you could either connect the output of reconall, directly to the next input. Which I don’t recommened. Recon-All takes a long time to execute and it might be best to have it separated/isolated from any other pipeline.

If you want to use FreeSurferSource to handle the reconall outputs, than you could run something like this:

from nipype.interfaces.io import FreeSurferSource
fssource = FreeSurferSource(subjects_dir='/home/username/experiment/freesurfer',
                            subject_id='sub-01')
res = fssource.run()

#To access the brainmask, just use the output 'brainmask'
res.outputs.brainmask
>>> '/home/username/experiment/freesurfer/sub-01/mri/brainmask.mgz'

Cheers,
Michael

1 Like