Convert .mesh file to text file?

Questions about Anatomist manipulation

Moderators: denghien, riviere

Post Reply
Xingfeng Li
Posts: 8
Joined: Wed Dec 17, 2008 10:17 am

Convert .mesh file to text file?

Post by Xingfeng Li »

Hi All,
I want to get the cortical thickness of hippocampus. I have done the cortical thickness for the whole brain(.mesh file, like this R_utrans_wm.mesh), and i also have done the hippocampus segmentation(labeled as 36 in a 3D MRI MINC file in Tal space). I have asked Peter Kochunov to help, he told me that i can convert mesh file to text file using: AimsFileConvert -i mymesh.mesh -o mymesh.txt -a
My question is how to get and run AimsFileConvert ? is it part of BrainVisa?
I am beginner to use this software, it is the first time for me to do this work. Thanks for help in advance.
User avatar
Jean-Francois Mangin
Posts: 337
Joined: Mon Mar 01, 2004 10:24 am
Location: Neurospin, CEA, France
Contact:

Re: Convert .mesh file to text file?

Post by Jean-Francois Mangin »

Yes BrainVISA is distributed with hundred of commandlines including a FileConverter that
can provide you with an ASCII mesh format and various other things. The way to run the command depends on
the system linux/window/mac but is very simple. Everything is explained in the explanation
about BrainVISA installation on the download page. Basically you just have to set up
the PATH towards commands and libraries.
Xingfeng Li
Posts: 8
Joined: Wed Dec 17, 2008 10:17 am

Re: Convert .mesh file to text file?

Post by Xingfeng Li »

Thanks a lot.
I have done this. My eventually aim is to get the thickness of hippocampus.
I have got the mesh file (text file now), thickness file(from RIC, text file ), and mask file (MNI 3D tal space).
But i have problems to find the corresponding coordinates of these three files. Do you know how to do this? is there matlab file available to do so? I have read all the data (3 files) into matlab. is there any easy way to do this?
User avatar
Jean-Francois Mangin
Posts: 337
Joined: Mon Mar 01, 2004 10:24 am
Location: Neurospin, CEA, France
Contact:

Re: Convert .mesh file to text file?

Post by Jean-Francois Mangin »

The only thing I can tell you is that in BrainVISA, you can find a process calling SPM to
convert affine normalization to our transformation format. So if you normalize your data
with SPM and get an Anatomist transformation, you can use Aims commands to normalize the mesh.
This is the end of my knowledge.
Anyway, I do not get what you are trying to do...
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Re: Convert .mesh file to text file?

Post by riviere »

Hi,
For the coordinates systems, we have a document describing our coordinates systems and the classical SPM/MNI referential: http://brainvisa.info/doc/aimsdata-3.1/ ... tials.html.
Now you need to know that meshes have coordinates in the Aims referential, and normalization information (either in nifti image formats, or in SPM normalization files converted by brainvisa) go to the SPM/MNI template referential. If no normalization is needed, then there may have flips between Aims and SPM axes, and an origin translation (see also http://brainvisa.info/doc/aimsdata-3.1/ ... ormat.html).
Within Aims (using AimsFileInfo for instance), some referential transformations information may be included in the imege headers, they are in 3 fields:
- 'referentials' is a list of destination referentials for transformations
- 'transformations' is a list of transformation matrices going from the Aims referential to the corresponding referential in the above field (all coords in millimeters). These transformations include any NIFTI headers transformation info, or Analyze origin fields, or MINC headers transformations, or from other sources, with appropriate modifications to have the Aims referential as source.
Each transformation is a 4x4 matrix written as rows (16 numbers).
- 'storage_to_memory' is the transformation matrix from disk storage orientation (order of the voxels on disk, depending on the file format and other things) to the Aims referential (voxel -> voxel transformation, this time).

I need to add this precisions to the referentials doc page...
Denis
Post Reply