18 #ifndef itkCellInterface_h
19 #define itkCellInterface_h
30 #define itkCellVisitMacro(TopologyId) \
31 static int GetTopologyId() \
35 virtual void Accept(CellIdentifier cellid, typename CellInterface< PixelType, \
36 CellTraits >::MultiVisitor * mv) ITK_OVERRIDE \
38 typename CellInterfaceVisitor< PixelType, CellTraits >::Pointer v = \
39 mv->GetVisitor(TopologyId); \
42 v->VisitFromCell(cellid, this); \
48 #define itkCellCommonTypedefs(celltype) \
49 typedef celltype Self; \
50 typedef AutoPointer< const Self > ConstSelfAutoPointer; \
51 typedef AutoPointer< Self > SelfAutoPointer; \
52 typedef Self * RawPointer; \
53 typedef const Self *ConstRawPointer
57 #define itkCellInheritedTypedefs(superclassArg) \
58 typedef superclassArg Superclass; \
59 typedef typename Superclass::PixelType PixelType; \
60 typedef typename Superclass::CellType CellType; \
61 typedef typename Superclass::CellAutoPointer CellAutoPointer; \
62 typedef typename Superclass::CellConstAutoPointer CellConstAutoPointer; \
63 typedef typename Superclass::CellRawPointer CellRawPointer; \
64 typedef typename Superclass::CellConstRawPointer CellConstRawPointer; \
65 typedef typename Superclass::CellTraits CellTraits; \
66 typedef typename Superclass::CoordRepType CoordRepType; \
67 typedef typename Superclass::InterpolationWeightType \
68 InterpolationWeightType; \
69 typedef typename Superclass::PointIdentifier PointIdentifier; \
70 typedef typename Superclass::PointIdIterator PointIdIterator; \
71 typedef typename Superclass::PointIdConstIterator PointIdConstIterator; \
72 typedef typename Superclass::CellIdentifier CellIdentifier; \
73 typedef typename Superclass::CellFeatureIdentifier CellFeatureIdentifier; \
74 typedef typename Superclass::CellFeatureIdentifier CellFeatureCount; \
75 typedef typename Superclass::PointType PointType; \
76 typedef typename Superclass::VectorType VectorType; \
77 typedef typename Superclass::PointsContainer PointsContainer; \
78 typedef typename Superclass::UsingCellsContainer UsingCellsContainer; \
79 typedef typename Superclass::CellGeometry CellGeometry; \
80 typedef typename Superclass::ParametricCoordArrayType \
81 ParametricCoordArrayType; \
82 typedef typename Superclass::ShapeFunctionsArrayType \
83 ShapeFunctionsArrayType; \
84 itkStaticConstMacro(PointDimension, unsigned int, Superclass::PointDimension)
189 typedef typename std::map< int, VisitorPointer >::value_type
201 typename std::map< int, typename VisitorType::Pointer >::iterator
205 return ( *pos ).second;
421 #if !defined( ITK_WRAPPING_PARSER )
451 void operator=(const Self &) ITK_DELETE_FUNCTION;
472 template<
int VPointDimension, typename TCoordRep,
473 typename TInterpolationWeight, typename TPointIdentifier,
474 typename TCellIdentifier, typename TCellFeatureIdentifier,
475 typename TPoint, typename TPointsContainer,
476 typename TUsingCellsContainer >
494 #define itkMakeCellTraitsMacro \
495 CellTraitsInfo < itkGetStaticConstMacro(PointDimension), CoordRepType, \
496 InterpolationWeightType, \
497 PointIdentifier, CellIdentifier, CellFeatureIdentifier, \
498 PointType, PointsContainer, UsingCellsContainer >
501 #if !defined( ITK_WRAPPING_PARSER )
502 #ifndef ITK_MANUAL_INSTANTIATION
503 #include "itkCellInterface.hxx"
Array class with size defined at construction time.
virtual PointIdConstIterator GetPointIds() const
const PointIdentifier * PointIdConstIterator
CellTraits::CellIdentifier CellIdentifier
virtual unsigned int GetDimension(void) const =0
itk::Array< PointIdentifier > PointIdentifierContainerType
CellInterfaceVisitor< TPixelType, TCellTraits > VisitorType
Light weight base class for most itk classes.
SelfAutoPointer CellAutoPointer
RawPointer CellRawPointer
virtual bool IsUsingCell(CellIdentifier cellId)
SmartPointer< Self > Pointer
UsingCellsContainer m_UsingCells
virtual void EvaluateShapeFunctions(const ParametricCoordArrayType &, ShapeFunctionsArrayType &) const
CoordRepType * GetBoundingBox(CoordRepType[PointDimension *2])
virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const =0
TCellIdentifier CellIdentifier
itkCellCommonTypedefs(CellInterface)
TUsingCellsContainer UsingCellsContainer
VisitorPointer m_Visitors[LAST_ITK_CELL]
A visitor that can visit different cell types in a mesh. CellInterfaceVisitor instances can be regist...
void UnRegister() ITK_SP_NOEXCEPT
An abstract interface for cells.
CellTraits::PointType PointType
CellTraits::PointIdentifier PointIdentifier
TPointIdentifier PointIdentifier
CellTraits::InterpolationWeightType InterpolationWeightType
std::map< int, VisitorPointer > m_UserDefined
virtual void SetPointId(int localId, PointIdentifier)=0
VisitorType * GetVisitor(int id)
Abstract interface for a visitor class that can visit the cells in a Mesh.
virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &)=0
CellFeatureIdentifier CellFeatureCount
PointType::VectorType VectorType
NOTE: it should normally be defined in the traits.
virtual bool EvaluatePosition(CoordRepType *, PointsContainer *, CoordRepType *, CoordRepType[], double *, InterpolationWeightType *)
TCellFeatureIdentifier CellFeatureIdentifier
virtual void Accept(CellIdentifier cellId, MultiVisitor *)=0
TInterpolationWeight InterpolationWeightType
virtual UsingCellsContainerIterator UsingCellsBegin()
CellTraits::CellFeatureIdentifier CellFeatureIdentifier
UsingCellsContainer::iterator UsingCellsContainerIterator
virtual PointIdIterator PointIdsEnd(void)=0
ConstSelfAutoPointer CellConstAutoPointer
virtual void MakeCopy(CellAutoPointer &) const =0
virtual bool IntersectWithLine(CoordRepType[PointDimension], CoordRepType[PointDimension], CoordRepType, CoordRepType[PointDimension], CoordRepType *, CoordRepType[])
virtual CellGeometry GetType(void) const =0
PointIdentifierContainerType GetPointIdsContainer() const
TPointsContainer PointsContainer
virtual bool IsExplicitBoundary()
static const unsigned int PointDimension
itkTypeMacroNoParent(CellInterface)
CellTraits::PointIdIterator PointIdIterator
Array< InterpolationWeightType > ShapeFunctionsArrayType
void SetPointIdsContainer(const PointIdentifierContainerType &)
virtual void RemoveUsingCell(CellIdentifier cellId)
virtual unsigned int GetNumberOfPoints(void) const =0
virtual void SetPointIds(PointIdConstIterator first)=0
ConstRawPointer CellConstRawPointer
virtual void AddUsingCell(CellIdentifier cellId)
virtual unsigned int GetNumberOfUsingCells()
A simple utility class to define the cell type inside a mesh type structure definition. This just makes a copy of existing type information that is needed for a cell type template parameter.
virtual UsingCellsContainerIterator UsingCellsEnd()
PointIdentifier * PointIdIterator
CoordRepType GetBoundingBoxDiagonalLength2(void)
Array< CoordRepType > ParametricCoordArrayType
CellTraits::PointsContainer PointsContainer
virtual bool IntersectBoundingBoxWithLine(CoordRepType[PointDimension *2], CoordRepType[PointDimension], CoordRepType[PointDimension], CoordRepType[PointDimension], CoordRepType *)
CellTraits::CoordRepType CoordRepType
CellTraits::PointIdConstIterator PointIdConstIterator
VisitorType::Pointer VisitorPointer
virtual unsigned int GetInterpolationOrder() const
virtual bool GetClosestBoundary(CoordRepType[], bool *, CellAutoPointer &)
virtual PointIdIterator PointIdsBegin(void)=0
virtual int GetCellTopologyId()=0
void AddVisitor(VisitorType *v)
CellTraits::UsingCellsContainer UsingCellsContainer
std::map< int, VisitorPointer >::value_type VisitorPointerValueType