how "AimsMesh" can generate files.tri?

Questions about BrainVisa usage and installation

Moderators: denghien, riviere

Post Reply
Tristan
Posts: 5
Joined: Tue Apr 20, 2004 11:42 am

how "AimsMesh" can generate files.tri?

Post by Tristan »

Hi

I 'd like to generate a file.tri using AimsMesh and i can't manage.
when I write : AimsMesh --tri -i ... -o ...
Anatomist doesn't understand the "--tri" option.

Thank you, for helping me
Tristan
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Post by riviere »

Hi Tristan,

Well, I think the doc of AimsMesh is outdated... I'll fix it. The --tri option certainly doesn't exist anymore (I haven't checked yet) because it's not needed anymore, you just have to specify .tri extension (rather than .mesh) to the output file argument:

Code: Select all

AimsMesh -i toto.ima -o toto.tri
However the .tri format is rather old and incomplete and we don't use it anymore here. The .mesh format has both a binary and an ascii variant and is documented on the web site: http://brainvisa.info/doc/formats/mesh.pdf and http://brainvisa.info/doc/html/en/index.html

Denis
Tristan
Posts: 5
Joined: Tue Apr 20, 2004 11:42 am

Post by Tristan »

Hi Denis
I tried what you said

"AimsMesh -i toto.ima -o toto.tri"

but it doesn't work.

I need to include this files.mesh in a matlab program, and i don't know how i'll do?

Tristan
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Post by riviere »

Oh yes you're right, AimsMesh is a low-level command that generates multiple mesh files (one for each interface of the objects to mesh) and generates file names with numbers without bothering about the extension. This should be fixed anyway.

Well, right now you have three options:

- use AimsMeshBrain instead: this command meshes only one interafce and is more suitable if you know you have one object in a binary image (with one connected component), it makes smooth meshes (decimated + smoothed) and can write .mes or .tri format

- use AimsMesh as you did, and convert the output mesh to .tri format afterwards using AimsFileConvert:

Code: Select all

AimsFileConvert toto.mesh toto.tri
- read the .mesh from Matlab, and you're quite lucky because there are matlab routines in brainvisa (thanks to Guillaume Flandin and Denis Schwartz): look in <SHFJ_pack>/brainvisa/matlab/mesh, there are matlab functions to read, write and plot .mesh files...

Denis
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Post by riviere »

Errors in AimsMesh help and .tri output have been corrected now. It will work better in the next update (however I think you don't need .tri format anyway!)

Denis
Tristan
Posts: 5
Joined: Tue Apr 20, 2004 11:42 am

Post by Tristan »

I'm very happy. it works now with the command
AimsFileConvert ...
Thanks a lot

Tristan
Post Reply