[Insight-developers] AutomaticTopologyMeshSource

Mark Foskey mark_foskey@unc.edu
Tue, 13 May 2003 10:38:13 -0400


Yeah, this came up when I was testing it.  The way I have it now, 
Update() is overridden to be a no-op, and the class makes sure that the 
mesh is in a valid state after every AddFoo call.  Does this raise 
problems with thread safety?

Luis Ibanez wrote:
> 
> Hi Mark,
> 
> This sounds like a great idea.
> 
> I'm not sure if this should be a MeshSource, since there will be
> an Update() method but the actual construction of the Mesh is
> done through calls to AddTriangle, AddLine... and so on.
> 
> Maybe it will be enough to document the class to make clear that
> all the invokations to AddTriangle() should be done before calling
> Update().
> 
> 
> 
>   Luis
> 
> 
> -------------------
> Mark Foskey wrote:
> 
>> I am writing a mesh source to make it easier to create meshes.  The 
>> idea is that you should be able to call
>>
>> meshSource->AddTriangle( p0, p1, p2 );
>> meshSource->AddTriangle( p1, p2, p3 );
>>
>> where p0, ..., p3 are already-defined points, and the meshSource will 
>> add the appropriate points, VertexCells, LineCells, and TriangleCells 
>> for a full K-complex, being sure not to add any object more than once.
>>
>> I intend to have AddFoo methods for each of the currently supported 
>> CellTypes.
>>
>> It seems that this may be useful in a number of places.  I want it to 
>> facilitate the implementation of medial surface extraction, but it can 
>> also be convenient when importing mesh data from an arbitrary format.
>>
>> There will also be methods of the form AddTriangle( id1, id2, id3 ), 
>> where the id's are identifiers for points that have already been added.
>>
>> I have looked around and it doesn't seem like ITK already has anything 
>> that does this, but I'd like to know if I'm duplicating any effort, or 
>> if there are any objections to the idea of such a class.
>>
>> I plan to check in a partial version in the next couple of days for 
>> testing purposes; I have a running test program but you can only add 
>> points and vertex cells.
>>
> 
> 
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers


-- 
Mark Foskey    (919) 843-5436  Computer-Aided Diagnosis and Display Lab
mark_foskey@unc.edu            Department of Radiology, CB 7515, UNC
http://www.cs.unc.edu/~foskey  Chapel Hill, NC  27599-7515