Dear FSLers,
does anyone of you have a good idea on how to perform a scripted FAST segmentation? I tried it - with my rudimentary scripting "skills" - in this way, nevertheless, the script always stops after the first patient set.
The files (about 120 patients) are stored in one folder named roiDWI, filenames are
001_b1000r_dwi.nii.gz; 002_b1000r_dwi.nii.gz; 003_b1000r_dwi.nii.gz; and so on
The segmented files should then optimally be stored in a new folder named roiDWIseg
#!/bin/bash
#segmentation in 6 classes, .nii.gz files stored in 2 different folders.
cd /User/Desktop/study/roiDWI
for filename in *.nii ; do
fname=`$FSLDIR/bin/remove_ext ${filename}`
fast -t 1 -n 6 -H 0.1 -I 4 -l 20.0 --nopve -o /User/Desktop/study/roiDWIseg/${fname} /User/Desktop/study/roiDWI/${fname}
done
echo FAST finished
sleep 5s
If anybody might share his skills I would be more than thankful.
Cheers, Matias
|