[Neuroimaging] Freesurfer LocalGI with nipype

Bernardoni, Fabio Fabio.Bernardoni at uniklinikum-dresden.de
Thu Jun 16 11:43:04 EDT 2016

Dear all,

I am trying to build a nipype workflow that does a preprocessing and computes the local gyrification index (LGI) for a set of subjects. 

>From the freesurfer documentation, to compute the LGI the pial surface must be present, so that one should first run recon all with the -all directive and once this has success one can run recon all with the -localGI directive:

1) recon-all -s <subj> -all
2) recon-all -s <subj> -localGI

When I implement 2) in bash I do something like:
if [ ! -f ./surf/rh.pial_lgi ]; then
        recon-all -s <subj> -localGI  2>&1

How do I implement this dependency in nipype? Normally I require that one of the output of process 1 (optimally the pial surface) is an input of process 2. But the pial surface cannot be an input of process 2 because the ReconAll node does not accept the pial surface as input (there is in general no output of ReconAll that is also its input).

By the way, when I define the recon-all node to compute the LGI:

        reconall_gyri = pe.Node(interface=fs.ReconAll(directive='localGI', flags='-nuintensitycor-3T',
                         subjects_dir=workflow_dir), name="reconall_gyri")

I have the impression that nothing is produced, so maybe I am doing something wrong...

Thanks for any help,

Dr. Fabio Bernardoni
wiss. Mitarbeiter
Psychosoziale Medizin und Entwicklungsneurowissenschaften
Tel. +49 (0)351 458-5245
Fax +49 (0)351 458-7206
URL http://www.uniklinikum-dresden.de/psm; www.transdenlab.de
Universitätsklinikum Carl Gustav Carus & Medizinische Fakultät
an der Technischen Universität Dresden
Anstalt des öffentlichen Rechts des Freistaates Sachsen
Fetscherstraße 74, 01307 Dresden
Vorstand: Prof. Dr. med. D. M. Albrecht (Sprecher), Wilfried E. B. Winzer
Vorsitzender des Aufsichtsrates: Prof. Dr. med. Peter C. Scriba
USt.-IDNr.: DE 140 135 217, St.-Nr.: 203 145 03113

More information about the Neuroimaging mailing list