Hi,
attached is a .png of Anatomist:
- 2 white matter meshes of the same subject:
1. *Lwhite.mesh generated in Morphologist Pipeline;
2. lh.r.aims.white.mesh (from the FreeSurfer pipeline, resampled and in Aims Referential.
as you can see the meshes do not overlap, i would like to move the lh.r.aims.white.mesh to the *Lwhite.mesh, any tips on how to achieve this?
merci,
-joost
question overlap meshes
question overlap meshes
- Attachments
-
- Screenshot2.png (147.92 KiB) Viewed 26010 times
-
- Posts: 9
- Joined: Fri Apr 17, 2009 10:28 pm
Re: question overlap meshes
yes! I solved it by registering their actual T1 volumes to each other, then I used AimsMeshTransform to apply that transformation to the mesh.
For my purposes, I decided to register my T1 to the freesurfer T1 (001.nii) in FSL using FLIRT, convert the .mat file to .trm (in brainvisa), invert the transformation, then apply it to the freesurfer mesh. However, this still leaves me with the problem of moving the .tex of labels through the transformation... so far I have been unsuccessful.
Let me know if you need more details.
If anyone knows any way to apply a transformation to a texture file please let me know!
-Kathleen
For my purposes, I decided to register my T1 to the freesurfer T1 (001.nii) in FSL using FLIRT, convert the .mat file to .trm (in brainvisa), invert the transformation, then apply it to the freesurfer mesh. However, this still leaves me with the problem of moving the .tex of labels through the transformation... so far I have been unsuccessful.
Let me know if you need more details.
If anyone knows any way to apply a transformation to a texture file please let me know!
-Kathleen
-
- Posts: 9
- Joined: Fri Apr 17, 2009 10:28 pm
Re: question overlap meshes
Hi users,
I just figured out how to get the aparc onto the mesh as well. I transformed the spherereg and the standard ico meshes into the brainvisa space using the transform from the inverted registration mentioned above. Then I ran "06 Computation of resampling parameters". Then I took the Isin output into "11 Resample label textures". The newly resampled textures display on my white mesh (the lh.r.aim.white.regtobvisa.mesh that has also been transformed with my inverted transform).
Sorry if these instructions are not clear, feel free to ask me to clarify or explain why.
-Kathleen
I just figured out how to get the aparc onto the mesh as well. I transformed the spherereg and the standard ico meshes into the brainvisa space using the transform from the inverted registration mentioned above. Then I ran "06 Computation of resampling parameters". Then I took the Isin output into "11 Resample label textures". The newly resampled textures display on my white mesh (the lh.r.aim.white.regtobvisa.mesh that has also been transformed with my inverted transform).
Sorry if these instructions are not clear, feel free to ask me to clarify or explain why.
-Kathleen
- riviere
- Site Admin
- Posts: 1361
- Joined: Tue Jan 06, 2004 12:21 pm
- Location: CEA NeuroSpin, Saint Aubin, France
- Contact:
Re: question overlap meshes
OK, thanks Kathleen for answering.
The question that remains is why are images not already in the same space: does FreeSurfer work on resampled / normalized / cropped images ? Or can we deduce the transform without applying flirt ? If yes, we could add it somewhere in the BrainVisa/FreeSurfer pipeline somewhere.
Denis
The question that remains is why are images not already in the same space: does FreeSurfer work on resampled / normalized / cropped images ? Or can we deduce the transform without applying flirt ? If yes, we could add it somewhere in the BrainVisa/FreeSurfer pipeline somewhere.
Denis
-
- Posts: 9
- Joined: Fri Apr 17, 2009 10:28 pm
Re: question overlap meshes
Yes FreeSurfer does resample data and some other steps that are a mystery to me. It seems to resize and reshape the brain somehow - I believe they have called this process "unwarping". My initial attempts were to just take the freesurfer data back into native space before importing it but I was not able to figure out their transforms and resampling steps.
Re: question overlap meshes
Hi,
the answer is:
in the freesurfer subject dir/mri/transforms there's a talairach.lta file; the 15th line has 3 coordinates in the RAS coordinate system. if you want to move a freesurfer surface to brainvisa you have to add these coordinates to the original freesurfer surface coordinates. thereafter, you can convert the freesurfer coordinate system to the brainvisa coordinate system using freesurfertoAIMS python script provided in the pipeline (or matlab as we do here).
merci,
-joost
the answer is:
in the freesurfer subject dir/mri/transforms there's a talairach.lta file; the 15th line has 3 coordinates in the RAS coordinate system. if you want to move a freesurfer surface to brainvisa you have to add these coordinates to the original freesurfer surface coordinates. thereafter, you can convert the freesurfer coordinate system to the brainvisa coordinate system using freesurfertoAIMS python script provided in the pipeline (or matlab as we do here).
merci,
-joost
Re: question overlap meshes
Hi,
sorry, it's line 21 not 15 in talairach.lta
FreeSurfer produces surfaces (e.g. ?h.pial/white) in the subject's native image space, no "unwarping" is applied. Freesurfer resamples original T1 data to 1x1x1mm resolution before processing it (conform). The problem was just between the coordinate systems, nothing more. the talairach.lta file contains the solution.
merci,
-joost
sorry, it's line 21 not 15 in talairach.lta
FreeSurfer produces surfaces (e.g. ?h.pial/white) in the subject's native image space, no "unwarping" is applied. Freesurfer resamples original T1 data to 1x1x1mm resolution before processing it (conform). The problem was just between the coordinate systems, nothing more. the talairach.lta file contains the solution.
merci,
-joost
Re: question overlap meshes
Hi,
I did some tests with my data and I can give you additional information.
In fact you don't need to resample data because all information are written in the headers.
In order to resolve the problem, you can process by two different ways:
-> The FIRST is very simple, you can use the 001.nii file instead of T1.nii or orig.nii to run Morphologist. This allows:
1) to avoid to work with resampled data (volume size: 256x256x256; voxel size : 1x1x1)
2) data will be in the initial space (referential of ../mri/orig/001.nii), so you could superimpose both meshes.
-> The SECOND, if you work with ../mri/T1.nii or ../mri/orig.nii, in order to superimpose meshes, you could handle the referential manager of Anatomist instead of resampling data. Anatomist propose a powerful tool to manage and to handle referantials without to resample data. Very often, you can find information in the part of header. Anatomist can read this information (for example transformation for the "scanner-based anatomical coordinates").
- "read information": drag and drop your volume into a browser window
- "load information from file header": right-click on the volume, then select the "referential -> load information from file header. Note that data are just modify for the display, not on the hard disk.
I assume that the following lines could resolve your problem without resample your data:
STEP 1: Load in Anatomist (open an anatomist session without BrainVISA)
- M1: load mesh computed by morphologist for instance T1_Lwhite.mesh
- M2: load mesh converted by the freesurfer pipeline in BrainVISA, lh.r.aims.white.mesh
- Anat 1: load T1.nii + "load information from file header" (see above)
- Anat 2: load 001.nii + "load information from file header"
STEP 2:
- Put M1 in the referential of Anat1 by right-clicking -> referential -> load the correct color
- Put M2 in the referential of Anat2 by right-clicking -> referential -> load the correct color
STEP 3: Load an identity transformation between both referentials:
- Open Settings -> Referential window
- Simultaneously, click on 'crtl' key + draw a line between both referantials called "scanner-based" (before pass the mouse on points of color to know their names)
SETP 4: Visualize
- Put M1 and M2 in the same 3D window
- Change the referential of window by clicking on the line of the top in the 3D window. By default, this line is red, now use a color corresponding to one of "scanner based"
For the further version of toolbox, these steps could be automatically managed by BrainVISA.
Notes:
1) When you use Anatomist without BrainVISA, you manage yourself the referantials. But when you use BrainVISA and that you open Anatomist with BrainVISA, then some referentials are managed by BrainVISA. Automatic and magic things will happen
2) If a mesh becomes black: "mesh -> click-right -> geometry -> invert polygon orientation"
3) More information about referentials:
http://brainvisa.info/doc/aimsdata-4.2/ ... /ch06.html
http://brainvisa.info/doc/anatomist-4.2 ... /ch04.html
http://brainvisa.info/doc/anatomist-4.2 ... /ch08.html
Isa
I did some tests with my data and I can give you additional information.
In fact you don't need to resample data because all information are written in the headers.
In order to resolve the problem, you can process by two different ways:
-> The FIRST is very simple, you can use the 001.nii file instead of T1.nii or orig.nii to run Morphologist. This allows:
1) to avoid to work with resampled data (volume size: 256x256x256; voxel size : 1x1x1)
2) data will be in the initial space (referential of ../mri/orig/001.nii), so you could superimpose both meshes.
-> The SECOND, if you work with ../mri/T1.nii or ../mri/orig.nii, in order to superimpose meshes, you could handle the referential manager of Anatomist instead of resampling data. Anatomist propose a powerful tool to manage and to handle referantials without to resample data. Very often, you can find information in the part of header. Anatomist can read this information (for example transformation for the "scanner-based anatomical coordinates").
- "read information": drag and drop your volume into a browser window
- "load information from file header": right-click on the volume, then select the "referential -> load information from file header. Note that data are just modify for the display, not on the hard disk.
I assume that the following lines could resolve your problem without resample your data:
STEP 1: Load in Anatomist (open an anatomist session without BrainVISA)
- M1: load mesh computed by morphologist for instance T1_Lwhite.mesh
- M2: load mesh converted by the freesurfer pipeline in BrainVISA, lh.r.aims.white.mesh
- Anat 1: load T1.nii + "load information from file header" (see above)
- Anat 2: load 001.nii + "load information from file header"
STEP 2:
- Put M1 in the referential of Anat1 by right-clicking -> referential -> load the correct color
- Put M2 in the referential of Anat2 by right-clicking -> referential -> load the correct color
STEP 3: Load an identity transformation between both referentials:
- Open Settings -> Referential window
- Simultaneously, click on 'crtl' key + draw a line between both referantials called "scanner-based" (before pass the mouse on points of color to know their names)
SETP 4: Visualize
- Put M1 and M2 in the same 3D window
- Change the referential of window by clicking on the line of the top in the 3D window. By default, this line is red, now use a color corresponding to one of "scanner based"
For the further version of toolbox, these steps could be automatically managed by BrainVISA.
Notes:
1) When you use Anatomist without BrainVISA, you manage yourself the referantials. But when you use BrainVISA and that you open Anatomist with BrainVISA, then some referentials are managed by BrainVISA. Automatic and magic things will happen
2) If a mesh becomes black: "mesh -> click-right -> geometry -> invert polygon orientation"
3) More information about referentials:
http://brainvisa.info/doc/aimsdata-4.2/ ... /ch06.html
http://brainvisa.info/doc/anatomist-4.2 ... /ch04.html
http://brainvisa.info/doc/anatomist-4.2 ... /ch08.html
Isa