Re: [Freesurfer] How to automate recon-all command for multiple subjects

2018-11-21 Thread Vivek Sharma
External Email - Use Caution Thanks! On Tue, Nov 20, 2018 at 8:57 PM Bruce Fischl wrote: > > in csh it would be something like > > setenv SUBJECTS_DIR > foreach fname ($dir/*.nii) > set fonly=${f:t} > set fnoext=${f:r} > recon-all -i $fname -s $fnoext

Re: [Freesurfer] How to automate recon-all command for multiple subjects

2018-11-20 Thread Bruce Fischl
in csh it would be something like setenv SUBJECTS_DIR foreach fname ($dir/*.nii) set fonly=${f:t} set fnoext=${f:r} recon-all -i $fname -s $fnoext -all end On Tue, 20 Nov 2018, Vivek Sharma wrote: External Email - Use Caution I have a folder, lets name

Re: [Freesurfer] How to automate recon-all command for multiple subjects

2018-11-20 Thread Bruce Fischl
oh, that was from your example. -i should be the full path to the input volume *or* one file in the correct dicom series. -s is something you choose to uniquely identify that subject's recon-all outputs cheers Bruce On Tue, 20 Nov 2018, Vivek Sharma wrote: External Email - Use

Re: [Freesurfer] How to automate recon-all command for multiple subjects

2018-11-20 Thread Vivek Sharma
External Email - Use Caution Hi The following code worked. for asubject in /home/vivek/Downloads/freesurfer/subjects/*.nii; do recon-all -s ${asubject%.nii} -i $asubject -all -qcache; done Thank you. On Tue, Nov 20, 2018 at 12:19 PM Vivek Sharma wrote: > I have a folder, lets

Re: [Freesurfer] How to automate recon-all command for multiple subjects

2018-11-19 Thread Vivek Sharma
External Email - Use Caution I have a folder, lets name xyz which contains .nii file. Now I want to run recon-all for all the files in that folder. Please let me know how I can do that. On Tue, Nov 20, 2018 at 11:40 AM Vivek Sharma wrote: > I'm trying to run this code but it's

Re: [Freesurfer] How to automate recon-all command for multiple subjects

2018-11-19 Thread Vivek Sharma
External Email - Use Caution I'm trying to run this code but it's not working. What should be $i in the code? On Mon, Nov 19, 2018 at 9:15 PM Bruce Fischl wrote: > or you could do that all on a single line: > > recon-all -i $SUBJECTS_DIR/$i/ -s $i -all > > cheers > Bruce > > On

Re: [Freesurfer] How to automate recon-all command for multiple subjects

2018-11-19 Thread Bruce Fischl
or you could do that all on a single line: recon-all -i $SUBJECTS_DIR/$i/ -s $i -all cheers Bruce On Mon, 19 Nov 2018, Alex Hanganu wrote: External Email - Use Caution HI Vivek, you probably need 2 steps, first registration, second recon-all. Something like: ... do    

Re: [Freesurfer] How to automate recon-all command for multiple subjects

2018-11-19 Thread Alex Hanganu
External Email - Use Caution HI Vivek, you probably need 2 steps, first registration, second recon-all. Something like: ... do recon-all -i $SUBJECTS_DIR/$i/ -s $i recon-all -all -subjid $i I didn't check if the scrips runs. That's the general structure. Best, Alex Le

[Freesurfer] How to automate recon-all command for multiple subjects

2018-11-19 Thread Vivek Sharma
External Email - Use Caution Hi, I'm using freesurfer to generate head surfaces using MRI file. I want to execute recon-all command for number of subjects, but unable to run it. The script I'm using is: for i in `cat *subs.txt*` do recon-all -s $i -all -qcache done subs.txt