Computation of the volume of a mesh

AIMS library and commands usage

Moderators: riviere, denghien

Antonio_Moreno
Posts: 3
Joined: Fri Jul 06, 2007 7:58 am
Location: NeuroSpin, Saclay, France
Contact:

Computation of the volume of a mesh

Postby Antonio_Moreno » Fri Jul 06, 2007 9:11 am

Hi!

I'd like to know if there is a way to compute the volume contained inside a mesh with the Aims commands.

I'm interested in computing the difference in volume (in mm³) of a binary image (number of voxels x volume of one voxel) with the mesh generated from this volume. I'd like to quantify the error of this conversion volume-->mesh.

If you have any idea, it will be welcome!!

Thanks in advance!

Antonio

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

Postby riviere » Fri Jul 06, 2007 5:37 pm

Hi Antonio,
The development version of AimsMeshArea does so. The stable one only outputs the surface area.
It only works on closed meshes, of course.
Denis

Antonio_Moreno
Posts: 3
Joined: Fri Jul 06, 2007 7:58 am
Location: NeuroSpin, Saclay, France
Contact:

Postby Antonio_Moreno » Fri Jul 06, 2007 7:56 pm

Thank you very much, Denis! I will try with the development version of AimsMeshArea then.

Antonio

User avatar
Jean-Francois Mangin
Posts: 337
Joined: Mon Mar 01, 2004 10:24 am
Location: Neurospin, CEA, France
Contact:

Postby Jean-Francois Mangin » Sat Jul 07, 2007 5:16 pm

I wonder why you consider the mesh based volume as the one with errors. I do not know the way the volume of this mesh is computed,
but in my opinion, it could be closer to reality than the volume of a binary image.

Antonio_Moreno
Posts: 3
Joined: Fri Jul 06, 2007 7:58 am
Location: NeuroSpin, Saclay, France
Contact:

Postby Antonio_Moreno » Sat Jul 07, 2007 6:51 pm

Hi Jeff,

You are true. In fact it depends on the way the binary image is computed... I should say that I want to quantify the difference in volume of the voxel-based object and its mesh. The error can come from the conversion in both directions: volume-->mesh or mesh-->volume.

Antonio

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

Postby riviere » Sun Jul 08, 2007 2:53 pm

Hi,

I guess in every case the mesh is computed from the volume, not the contrary, at least if you are using meshes computed by our tools. But I think what Jeff means is that the mesh, with its smoothing effect, may after all be closer to reality than the volume with its voxel quantization from which it is extracted, because mesh triangles can cut across voxels and compensate a kind of "partial volume effect".
Anyway I think the values are close (for reasonably big objects at least). I have not performed any statistics on this but I have compared both values on several objects when I wrote the mesh volume calculation, to debug it and check that values are comparable. So, try and tell us...
To answer Jeff, the mesh volume is calculated directly from the mesh triangles, not through any voxelization process. It's a sum of cylinder volumes, one cylinder under each triangle.

Denis

User avatar
Jean-Francois Mangin
Posts: 337
Joined: Mon Mar 01, 2004 10:24 am
Location: Neurospin, CEA, France
Contact:

Postby Jean-Francois Mangin » Tue Jul 10, 2007 8:44 pm

You mean it is based on the cutting mesh algorithm?

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

Postby riviere » Tue Jul 10, 2007 10:01 pm

No it's very simple actually: take a given, fixed direction (z axis for instance). Project every triangle onto a plane orthogonal to this direction (x,y plane). For each triangle, count the volume of the cylinder under this projected triangle, either positively if the triangle normal has the same direction as the projection->triangle vector (or consider the signed volume multiplicated by the sign of the dot product of the normal with the z direction).
That's all.
The mesh has to be closed otherwise there will be some missing cylinders and the volume will be all wrong.
Denis


Return to “AIMS”

Who is online

Users browsing this forum: No registered users and 3 guests