[Insight-developers] AutomaticTopologyMeshSource

Luis Ibanez luis.ibanez@kitware.com
Tue, 13 May 2003 10:16:40 -0400


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.
>