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
Computation of the volume of a mesh
-
- Posts: 3
- Joined: Fri Jul 06, 2007 7:58 am
- Location: NeuroSpin, Saclay, France
- Contact:
-
- Posts: 3
- Joined: Fri Jul 06, 2007 7:58 am
- Location: NeuroSpin, Saclay, France
- Contact:
- Jean-Francois Mangin
- Posts: 337
- Joined: Mon Mar 01, 2004 10:24 am
- Location: Neurospin, CEA, France
- Contact:
-
- Posts: 3
- Joined: Fri Jul 06, 2007 7:58 am
- Location: NeuroSpin, Saclay, France
- Contact:
- riviere
- Site Admin
- Posts: 1361
- Joined: Tue Jan 06, 2004 12:21 pm
- Location: CEA NeuroSpin, Saint Aubin, France
- Contact:
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
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
- Jean-Francois Mangin
- Posts: 337
- Joined: Mon Mar 01, 2004 10:24 am
- Location: Neurospin, CEA, France
- Contact:
- riviere
- Site Admin
- Posts: 1361
- Joined: Tue Jan 06, 2004 12:21 pm
- Location: CEA NeuroSpin, Saint Aubin, France
- Contact:
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
That's all.
The mesh has to be closed otherwise there will be some missing cylinders and the volume will be all wrong.
Denis