I have a simple question, it must be a common issue, but I could not find the answare in the forum.
When an image is re-oriented in the Morphologist pipeline (after the selection of the points CA-CP) a transformation matrix is applied and it is also displayed in the log. My question is if there is an easy way to get this transformation back once all the processing is terminated, so that I can reformat the results in the original space. I could not find it in the header for example. Is it maybe stored in the database? (in this case I have no idea how to get it) Or am I forced to use the log?
Thanks
Re-orient transformation
- riviere
- Site Admin
- Posts: 1361
- Joined: Tue Jan 06, 2004 12:21 pm
- Location: CEA NeuroSpin, Saint Aubin, France
- Contact:
Re: Re-orient transformation
Hi,
The only moment in the pipeline images are reoriented is when they don't have correct orientation information at the beginning of the pipeline (either orientation information is wrong, or it has not been extracted from original images). Then a transformation matrix is calculated to go to Talairach space, but this Talairach transform is never actually applied: all processing is done in native space, the matrix is used on the fly when needed. I don't know which one you are talking about.
For the first reorientation step, again, in "normal" cases no reorientation is done. If it is really needed (and you have enabled the "allow_flip_original_mri" option), the matrix contains only axes flip (axes inversion or exchange, to get, typically from a sagittal to axial orientation). This flip matrix is not kept because it is considered just filling (or fixing) missing information. So you can only get it in the log of BrainVisa.
Do you think it would be useful to keep it somewhere ?
Denis
The only moment in the pipeline images are reoriented is when they don't have correct orientation information at the beginning of the pipeline (either orientation information is wrong, or it has not been extracted from original images). Then a transformation matrix is calculated to go to Talairach space, but this Talairach transform is never actually applied: all processing is done in native space, the matrix is used on the fly when needed. I don't know which one you are talking about.
For the first reorientation step, again, in "normal" cases no reorientation is done. If it is really needed (and you have enabled the "allow_flip_original_mri" option), the matrix contains only axes flip (axes inversion or exchange, to get, typically from a sagittal to axial orientation). This flip matrix is not kept because it is considered just filling (or fixing) missing information. So you can only get it in the log of BrainVisa.
Do you think it would be useful to keep it somewhere ?
Denis
Re: Re-orient transformation
I am talking about the case when the initial orientation is not correct:
[ [1, 0, 0, 0] [0, 1, 0, 0] [0, 0, -1, 181.99854400000001] [0, 0, 0, 1] ] WARNING: Flipping and re-writing source image voxel size orig : [1, 1, 0.99999199999999999, 1] voxel size final: [1.0, 1.0, 0.99999199999999999] dims orig : [256, 256, 182] dims final: [256, 256, 182] transformation: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, -1, 181.99854400000001, 0, 0, 0, 1] new AC: [124.89400000000001, 134.44999999999999, 98.999244000000004] new PC: [123.0, 152.41200000000001, 108.79324400000002] new IP: [126.631, 220.16999999999999, 85.999344000000008]
It looks like there is a flipping plus a translation which I find also later in the log:
transformation: R = [1, 0, 0, 0, 1, 0, 0, 0, -1], T = [0, 0, 181.99854400000001]
What is the translation for? It would be nice if this transformation was stored somewhere as .trm, but anwyay I can get it from the log also.
Thanks
[ [1, 0, 0, 0] [0, 1, 0, 0] [0, 0, -1, 181.99854400000001] [0, 0, 0, 1] ] WARNING: Flipping and re-writing source image voxel size orig : [1, 1, 0.99999199999999999, 1] voxel size final: [1.0, 1.0, 0.99999199999999999] dims orig : [256, 256, 182] dims final: [256, 256, 182] transformation: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, -1, 181.99854400000001, 0, 0, 0, 1] new AC: [124.89400000000001, 134.44999999999999, 98.999244000000004] new PC: [123.0, 152.41200000000001, 108.79324400000002] new IP: [126.631, 220.16999999999999, 85.999344000000008]
It looks like there is a flipping plus a translation which I find also later in the log:
transformation: R = [1, 0, 0, 0, 1, 0, 0, 0, -1], T = [0, 0, 181.99854400000001]
What is the translation for? It would be nice if this transformation was stored somewhere as .trm, but anwyay I can get it from the log also.
Thanks
- riviere
- Site Admin
- Posts: 1361
- Joined: Tue Jan 06, 2004 12:21 pm
- Location: CEA NeuroSpin, Saint Aubin, France
- Contact:
Re: Re-orient transformation
The translation is just to compensate an axis inversion, since in our coordinates systems, the origin is in the corner of the volume (and we must keep positive coordinates here).
I guess we could add an output to store the matrix somewhere. I can look at that.
Denis
I guess we could add an output to store the matrix somewhere. I can look at that.
Denis