[Insight-developers] Simplex Volume Calculator

Thomas Boettger t.boettger at dkfz-heidelberg.de
Tue Nov 2 14:50:27 EST 2004


Hello Luis,

in the DeformableSimplexMeshFilter I am computing the normals for each 
point of the simplex mesh (line 200ff):

http://www.itk.org/cgi-bin/cvsweb.cgi/Code/Algorithms/itkDeformableSimplexMesh3DFilter.txx?annotate=1.12&root=Insight

Therefore I only ensure a correct ordering of the neighbor point array 
in the TriangleMeshToSimplexMeshFilter.

If you are now computing the normals of a simplex mesh cell in your new 
class, this could result in unordered normals.

I never checked this, because I usually converted the simplex mesh back 
to a triangle mesh. This conversion (thats what I think, because I did 
not encounter problems with unsorted normals) generates the triangles 
based on the neighbor point array only and therefore creates an ordered 
list.

I could take a look at the code if you need the vertices of a simplex 
mesh cell sorted. By the way, the new filter is computing the volume of 
a simplex mesh?


Regrads,

Thomas


Luis Ibanez wrote:
> 
> Jim,
> 
> Thanks for looking into this issue.
> 
> Yes, the problem could also be in
> the TriangleMeshToSimplexMeshFilter.. or...
> it still could be an actual bug in the Calculator.
> 
> I guess that the right test to perform is the
> one you suggest: converting the meshes to VTK
> and checking their normals.
> 
> The application
> 
>   InsightApplications/DeformableModelSimplexMesh
> 
> maybe a good place for performing such test.
> 
> 
>    Luis
> 
> 
> 
> ---------------------------------
> Miller, James V (Research) wrote:
> 
>> I just took a quick look at the RegularSphere code.  I don't see 
>> anything that would suggest an inproper ordering. 'Course the best
>> way to tell would be to write out a VTK file and see if the normals
>> are flipped. Haven't tried that yet.
>>
>> Could the problem be in the TriangleMeshToSimplexMeshFilter? This
>> filter takes the nice triangle mesh and converts into some other
>> structure based on the center points of the triangles. I guess I don't
>> understand what a SimplexMesh is.
>>
>> TriangleMeshToSimplexMeshFilter claims to reorient the vertices for
>> geometry computations.  Since it looks like the triangles may have
>> been oriented correctly, maybe the "reorientation" code in incorrect.
>>
>> The RegularSphere could still be incorrect. I just made a quick pass 
>> through the logic and drew a few pictures that made it seem
>> like it was doing the right thing.
>>
>> Jim
>>
>>
>>
>> -----Original Message-----
>> From: Luis Ibanez [mailto:luis.ibanez at kitware.com]
>> Sent: Monday, November 01, 2004 9:01 AM
>> To: Lorensen, William E (Research)
>> Cc: insight-developers at public.kitware.com
>> Subject: Re: [Insight-developers] Simplex Volume Calculator
>>
>>
>>
>> Bill,
>>
>> Yes, the reason is that the class is expecting the input surface
>> to be oriented and unfortunately it seems that the RegularSphere
>> surface class is not generating a triangulation with neighbor
>> links oriented consistently (clockwise or counter clockwise).
>>
>> That can be considered to be a bug in the SphereSimplexMeshSource... 
>> or... maybe what we need a filter that will take a Mesh and reorder
>> the neighbor links in order to orient it.
>>
>>
>>    Luis
>>
>>
>> ----------------------------------------
>> Lorensen, William E (Research) wrote:
>>
>>
>>> Luis,
>>> The test of the new class is failing on all platforms.
>>>
>>> Bill
>>> _______________________________________________
>>> Insight-developers mailing list
>>> Insight-developers at itk.org
>>> http://www.itk.org/mailman/listinfo/insight-developers
>>>
>>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Insight-developers mailing list
>> Insight-developers at itk.org
>> http://www.itk.org/mailman/listinfo/insight-developers
>> _______________________________________________
>> Insight-developers mailing list
>> Insight-developers at itk.org
>> http://www.itk.org/mailman/listinfo/insight-developers
>>
>>
> 
> 
> 
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers


-- 
Dipl.-Inform. Thomas Boettger
Deutsches Krebsforschungszentrum         (German Cancer Research Center)
Div. Medical and Biological Informatics B010    Tel: (+49) 6221-42 2328
Im Neuenheimer Feld 280                          Fax: (+49) 6221-42 2345
D-69120 Heidelberg                            e-mail: t.boettger at dkfz.de
Germany                      http://www.dkfz.de/mbi/people/thomasb.shtml




More information about the Insight-developers mailing list