Issue with the mesh format for the latest version

Questions about BrainVisa usage and installation

Moderators: denghien, riviere

Post Reply
PeterK
Posts: 45
Joined: Fri Mar 05, 2004 3:18 pm

Issue with the mesh format for the latest version

Post by PeterK »

There seems to be a niggling problem with the mesh files created by the latest version of brainvisa (4.2.x). If I attempt to read it as an AIMs format, the number of normal vectors is set to 0. Opening and saving it with anatomist restores the good state of the mesh. Was there a recent change in the AIMs mesh format? This issue only showed up on the latest releases of bvisa, the older versions (4.1 and preceding) seem to produce meshes of consistent format.
atsui
Posts: 13
Joined: Fri Jan 13, 2012 9:23 pm
Location: Davis, CA USA

Re: Issue with the mesh format for the latest version

Post by atsui »

Hello,

I just wanted to add some context to the issue that Peter is referring to. I am using his RIC toolbox to estimate cortical thickness, which makes use of gray matter and white matter meshes generated at the end of the Morphologist 2012 pipeline. It seems like it asserts something about the mesh size and the number of normals but fails for some reason:

Code: Select all

[atsui@quark tmp]$ RicCorticalThicknessByNormal --gm Lhemi.mesh --wm Lwhite.mesh -m thread --bv --sm both -o out/ --mind 0.2 --maxd 8 --ft
Mesh size and normals size are not equal exiting
Error reading fileLhemi.mesh
I found the error strange because I remember it had worked perfectly when I tested it with meshes before, but I think they might have been generated from Morphologist 2011 from an older version of Brainvisa.

Peter, what exactly is being checked at the beginning? Are you using the C++ API?

--Alex
PeterK
Posts: 45
Joined: Fri Mar 05, 2004 3:18 pm

Re: Issue with the mesh format for the latest version

Post by PeterK »

atsui wrote:Hello,

I just wanted to add some context to the issue that Peter is referring to. I am using his RIC toolbox to estimate cortical thickness, which makes use of gray matter and white matter meshes generated at the end of the Morphologist 2012 pipeline. It seems like it asserts something about the mesh size and the number of normals but fails for some reason:

Code: Select all

[atsui@quark tmp]$ RicCorticalThicknessByNormal --gm Lhemi.mesh --wm Lwhite.mesh -m thread --bv --sm both -o out/ --mind 0.2 --maxd 8 --ft
Mesh size and normals size are not equal exiting
Error reading fileLhemi.mesh
I found the error strange because I remember it had worked perfectly when I tested it with meshes before, but I think they might have been generated from Morphologist 2011 from an older version of Brainvisa.

Peter, what exactly is being checked at the beginning? Are you using the C++ API?

--Alex
Alex,
We check to make sure that the number of vertices = number of normals. It seems like the number of normals is set to zero in these meshes. Opening and saving them in anatomist resets this number to the correct one.
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Re: Issue with the mesh format for the latest version

Post by riviere »

Hi,
I will check that. Normals are actually optional in the .mesh format, and Anatomist rebuilds them if they are not here, which explains why they come back once loaded and saved back by anatomist. In a Aims program the function to do so is quite simple: just call the updateNormals() method on the mesh (either in python or C++). But we will take care of correctly generating them directly in Morphologist.
Denis
joost
Posts: 86
Joined: Tue Feb 05, 2008 1:56 pm

Re: Issue with the mesh format for the latest version

Post by joost »

Hi Denis,

could you give a concrete example of how to use python to update the normals for an existing brainvisa mesh?

merci,
-joost
denghien
Posts: 209
Joined: Mon Apr 05, 2004 1:35 pm
Location: IFR49 / SHFJ Orsay
Contact:

Re: Issue with the mesh format for the latest version

Post by denghien »

Hi Joost,

You will find some examples in this part of documentation at the "Meshes" section:
http://brainvisa.info/doc/aimsdata-4.3/ ... ing%pyaims .


Isa
Post Reply