Dear Experts,
I already checked the forum for same error messages but could not find any solution.
So when I run 5ttgen I got following error message:
FSL FIRST has failed; not all structures were segmented successfully
When I check the log file it says the following:
Cannot open volume first-L_Accu_corr for reading!
Image Exception : #22 :: ERROR: Could not open image first_all_none_firstseg
Strangely the 5ttgen command works fine with some of my data.
All my data has been on the same way preprocessed and created in a directory of same structure.
I also started running just the fsl run_first_all command and it works fine. I also could run fsl_anat command.
It seemed to be a problem with the coregistered T1 images. The T1 is for all measurements the same, I just did a coregistration (6 rigid transform FLIRT) between the T1 and each DWI as recommended before running 5ttgen. Last I took the unregistered T1 and repeated 5ttgen. It worked!
I really dont know why because when I checked via mrinfo/mrview both T1 seemed to be ok.
Here is the post that you’re looking for. Note in particular the effects of T1 co-registration if you use flirt & are not fully aware of its default behaviour. Another topic that I really need to add to the documentation FAQs…
Dear Rob,
thank you for your help,
I checked out the post and did it the way you suggested: first I transformed the flirt_trafo.mat via transformconvert to mtrix_trafo.txt and then I applied via mrtransform the transformation to my T1. When viewing the results everything looks good to me. But when I compare the inputs of the matrices (flirt_trafo.mat and mrtrix_trafo.txt) they slightly differ from each other. I guess although the matrices are not the same they do the same job in the end or are the results incorrect then?
Here the matrices:
Another question relates to the mrtransform command. While I have been reading some other post http://community.mrtrix.org/t/beginner-connectome-pipeline-updated/373/7 relating to this topic I was wondering about the -inverse option which all other user turned on? But why should I apply an inverse transform to my T1 in that case? Sorry but I am a bit confused right now, I guess I just misunderstood something easy, because I just applied the mrtrix-trafo without the -inverse option on and it works well.
Thank you I really appreciate your help!
Best
Max
But when I compare the inputs of the matrices (flirt_trafo.mat and mrtrix_trafo.txt) they slightly differ from each other.
Yep, that’s the whole point of the transformconvert call. It’s not just changing the file type extension from .mat to .txt (which would be kinda boring): first and MRtrix3 define their affine transformation matrices with respect to different coordinate conventions, and hence an explicit matrix conversion operation is required. If you apply the flirt_trafo.mat transformation to your image via mrtransform, i.e. skip the transformconvert step, it should be quite clear that that would indeed be an incorrect result.
… I was wondering about the -inverse option which all other user turned on?
A single affine transformation matrix intrinsically defines a transformation from image 1 to image 2. If you were to apply that same transformation to image 2, it would move further away from image 1. The goal of the -inverse option is to invert the transformation before applying it, such that a transform estimated to move image 1 to image 2 can instead be applied to image 2 to move it to image 1. So usage or non-usage of this option depends on both which option you are applying the transformation to, and which order the two images were provided in when the registration was performed.