[Insight-developers] itkAffineTransformMeshFilter

Brad King brad.king@kitware.com
Tue, 27 Feb 2001 13:53:09 -0500 (EST)


Luis,

> What is the efficient way to pass the rest of the Mesh data ?
The idea of the methods like "SetPointData" and "GetPointData" is that
multiple Mesh instances can share the containers for information they
share (Cell geometry, CellData, PointData, BoundaryAssignments, etc).  
This saves a large amount of memory when most of the instances use the
containers in a read-only manner.

Therefore, you want to transfer Mesh data like this:

m_OutputMesh->SetPointData(m_InputMesh->GetPointData());

I'm guessing you'll want to copy all the containers from the old mesh to
the new, except the ones holding the data that have been transformed.

This also allows cool things like transforming the geometry of a Mesh,
performing operations on how that geometry relates to the data, and then
accessing the results through the un-transformed version of the Mesh, with
no need to transform the geometry back.  I don't know when you'd ever want
to do something like this, but it can be done.

We may want to add deep-copy support to the containers for other
uses.  Thoughts on this, anyone?

-Brad