[Insight-developers] Mesh changes on progress

Luis Ibanez luis.ibanez@kitware.com
Thu, 04 Apr 2002 21:26:41 -0500


Hi,

Some changes will be done to the itk::Mesh in order
to provide a better support for the FEM applications.

The basic change involves to make the itk::Cells
be templated not over the TPixel and TCellTraits
as they are now but over the base class that
supports the API of  :       CellInterface< >

This clever combination was proposed by Aljaz as a
mechanism for allowing to introduce a customized
class at the base of the Mesh cells and yet avoiding
double inheritance.

With this change, the normal use of the Mesh is
obtained by writing:


itk::LineCell<  CellInterface< PixelType, CellTraits > >

        instead of the previous:

itk::LineCell< PixelType, CellTraits >

FEM meshes can take advantage of this open template
parameter for introducing the FEMElement   class
as the base class for the family of cells.   like

template < typename TCellInterface >
itk::Element    : public TCellInterface
{
};

and then:

typedef itk::Element< CellInterface< PixelType, CellTraits > ElementBase;
typedef itk::LineCell<  ElementBase >  LineElement;

The Element class will insert its virtual methods in the
hierarchy without disturbing the current code in the cells.


Most of the code related to computation of ShapeFunctions and Jacobians
will then be moved to the normal Cell types (LineCell, TriangleCell,... etc)

These changes are being tested in experimental builds and will be checked
in as soon as they become stable.


   Luis