Hi,
This error indicates that it could not read the image file. In fact your input
and output images have the same name! This isn't a good idea, as if
something goes wrong you lose the original image. I would strongly
recommend that you pick a different name for the output image.
If you are doing many images then I would not use the GUI. It is easier, quicker
and more flexible to use a script - unless you are very unfamiliar with command
line tools, in which case it might be easier for you to stick to the GUI.
If you are willing to give the script option a try then this is what you would do.
Run the GUI on one image to get the correct command line (it shows in the terminal
that you started the GUI from) and then script all the other calls with something like:
for fn in LIST_OF_FILENAMES ; do
echo $fn
ff=`$FSLDIR/bin/remove_ext $fn`;
$FSLDIR/bin/flirt -in $ff -out ${ff}_reg -omat ${ff}_reg.mat ALL_OTHER_OPTIONS
done
where LIST_OF_FILENAMES should be replaced by a list of your filenames,
separated by spaces, and ALL_OTHER_OPTIONS is copy of all the options
output by your initial GUI run except for the -in, -out and -omat options (as these
are set above). You can change the name of your outputs to whatever you want.
One advantage of the scripting option is that you can break it easily into small
chunks and run them on different machines, or on a cluster. You can also
potentially generate the list of filenames very easily by doing something like:
my_study_dir/NT0*/structural.nii.gz
which would immediately make a list of all structural.nii.gz files in directories
starting with NT0 within the directory my_study_dir.
Either way (GUI or script) will give you the same results. It is just a question of
what is easier and more flexible for you.
All the best,
Mark
On 22 Mar 2011, at 15:35, Anto wrote:
> Dear all,
>
> my goal is to register sevral hundreds of MRI images to a common template using flirt. Could someone explain me how to use the "Group facility" in Flirt (GUI)?
>
>
>
> I tried to do perform a 12-parameter regitration by choosing as "input image" and "output image", in the FLIRT GUI, the folder containing all the images to be registered. However I guess this is wrong as I had the following error messages:
>
> /usr/share/fsl/bin/flirt -in /home/anto/Desktop/RightRight_asymteml_12par_CSF -ref /home/anto/Desktop/EvalRegForShapeAna/RightRight_12param_asymtemplate2_CSF.nii.gz -out /home/anto/Desktop/RightRight_asymteml_12par_CSF -omat /home/anto/Desktop/RightRight_asymteml_12par_CSF.mat -bins 256 -cost corratio -searchrx -90 90 -searchry -90 90 -searchrz -90 90 -dof 12 -interp trilinear
>
> ** ERROR (nifti_image_read): failed to find header file for '/home/anto/Desktop/RightRight_asymteml_12par_CSF'
> ** ERROR: nifti_image_open(/home/anto/Desktop/RightRight_asymteml_12par_CSF): bad header info
> Error: failed to open file /home/anto/Desktop/RightRight_asymteml_12par_CSF
> ERROR: Could not open image /home/anto/Desktop/RightRight_asymteml_12par_CSF
> Image Exception : #22 :: Failed to read volume /home/anto/Desktop/RightRight_asymteml_12par_CSF
> terminate called after throwing an instance of 'RBD_COMMON::BaseException'
> Aborted
> Finished
>
>
>
> However, if I use the FSL GUI to register one by one the images contained in the folder "/home/anto/Desktop/RightRight_asymteml_12par_CSF" everything works fine.
> Could someone suggest me a fast method to register multiple images to a same template?
>
>
> Best regards,
> Anto
>
|