Issue with the mesh format for the latest version
Issue with the mesh format for the latest version
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.
Re: Issue with the mesh format for the latest version
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:
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
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
Peter, what exactly is being checked at the beginning? Are you using the C++ API?
--Alex
Re: Issue with the mesh format for the latest version
Alex,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:
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.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
Peter, what exactly is being checked at the beginning? Are you using the C++ API?
--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.
- 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
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
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
Re: Issue with the mesh format for the latest version
Hi Denis,
could you give a concrete example of how to use python to update the normals for an existing brainvisa mesh?
merci,
-joost
could you give a concrete example of how to use python to update the normals for an existing brainvisa mesh?
merci,
-joost
Re: Issue with the mesh format for the latest version
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
You will find some examples in this part of documentation at the "Meshes" section:
http://brainvisa.info/doc/aimsdata-4.3/ ... ing%pyaims .
Isa