Hi AJ,
I don't know an automated way of segmenting hypothalamus, but I wrote a simple bash script of doing this (see attachment). Please remove the .txt extension.
Greets,
Iven Fellhauer
-----Ursprüngliche Nachricht-----
Von: FSL - FMRIB's Software Library [mailto:[log in to unmask]] Im Auftrag von Adil Javed
Gesendet: Mittwoch, 8. Juni 2011 09:43
An: [log in to unmask]
Betreff: [FSL] segmenting new regions
I am interested in segmenting hypothalamus from T1 images. Does anyone know of any automated way of doing this?
Thanks,
AJ
#!/bin/bash
#alte Dateien löschen
echo `rm test.text`
echo `rm *.gz`
echo `rm *.mat`
#MRIs einlesen vorbereiten
echo `ls -1 x*.img > test.text`
#Ergebnis-Datei-Header einfügen
echo "FILENAME;VOL_L_HIPP;VOL_R_HIPP;" > results.csv
#MRI-Dateien in array einlesen
filecontent=(`cat "test.text"`)
for t in "${filecontent[@]}"
do
#Variablen
declare -a VOL_L_HIPP_ARRAY
declare -a VOL_R_HIPP_ARRAY
echo `rm -r subject*`
echo `rm *.txt`
echo "Segmentierung L_HIPP von ${t}"
echo `run_first_all -i ${t} -s L_Hipp -o subject_l`
echo "Volumen L_HIPP von ${t} berechnen"
echo `fslstats subject_l-L_Hipp_corr.nii.gz -V > l_hipp_vol.txt`
echo "Segmentierung R_HIPP von ${t}"
echo `run_first_all -i ${t} -s R_Hipp -o subject_r`
echo "Volumen R_HIPP von ${t} berechnen"
echo `fslstats subject_r-R_Hipp_corr.nii.gz -V > r_hipp_vol.txt`
#L_HIPP_VOL-Werte einlesen
while read line
do
string_l_hipp_vol=$line
VOL_L_HIPP_ARRAY=(`echo $string_l_hipp_vol|tr ' ' ' '`)
done < l_hipp_vol.txt
#R_HIPP_VOL-Werte einlesen
while read line
do
string_r_hipp_vol=$line
VOL_R_HIPP_ARRAY=(`echo $string_r_hipp_vol|tr ' ' ' '`)
done < r_hipp_vol.txt
echo "${t};${VOL_L_HIPP_ARRAY[1]};${VOL_R_HIPP_ARRAY[1]}" >> results.csv
#Variablen löschen
unset VOL_L_HIPP_ARRAY
unset VOL_R_HIPP_ARRAY
done
|