|
ITK
6.0.0
Insight Toolkit
|
Go to the documentation of this file.
18 #ifndef itkCellInterface_h
19 #define itkCellInterface_h
32 #define itkCellVisitMacro(TopologyId) \
33 static constexpr CellGeometryEnum GetTopologyId() { return TopologyId; } \
34 virtual void Accept(CellIdentifier cellid, typename CellInterface<PixelType, CellTraits>::MultiVisitor * mv) \
37 typename CellInterfaceVisitor<PixelType, CellTraits>::Pointer v = mv->GetVisitor(TopologyId); \
40 v->VisitFromCell(cellid, this); \
43 ITK_MACROEND_NOOP_STATEMENT
47 #define itkCellCommonTypedefs(celltype) \
48 using Self = celltype; \
49 using ConstSelfAutoPointer = AutoPointer<const Self>; \
50 using SelfAutoPointer = AutoPointer<Self>; \
51 using RawPointer = Self *; \
52 using ConstRawPointer = const Self *
56 #define itkCellInheritedTypedefs(superclassArg) \
57 using Superclass = superclassArg; \
58 using typename Superclass::PixelType; \
59 using CellType = typename Superclass::CellType; \
60 using typename Superclass::CellAutoPointer; \
61 using typename Superclass::CellConstAutoPointer; \
62 using typename Superclass::CellRawPointer; \
63 using typename Superclass::CellConstRawPointer; \
64 using typename Superclass::CellTraits; \
65 using typename Superclass::CoordRepType; \
66 using typename Superclass::InterpolationWeightType; \
67 using typename Superclass::PointIdentifier; \
68 using typename Superclass::PointIdIterator; \
69 using typename Superclass::PointIdConstIterator; \
70 using typename Superclass::CellIdentifier; \
71 using typename Superclass::CellFeatureIdentifier; \
72 using CellFeatureCount = typename Superclass::CellFeatureIdentifier; \
73 using typename Superclass::PointType; \
74 using typename Superclass::VectorType; \
75 using typename Superclass::PointsContainer; \
76 using typename Superclass::UsingCellsContainer; \
77 using typename Superclass::ParametricCoordArrayType; \
78 using typename Superclass::ShapeFunctionsArrayType; \
79 static constexpr unsigned int PointDimension = Superclass::PointDimension
96 template <
typename TPixelType,
typename TCellTraits>
127 static constexpr
unsigned int PointDimension = CellTraits::PointDimension;
191 return m_Visitors[static_cast<int>(
id)];
195 auto pos = m_UserDefined.find(
id);
196 if (pos != m_UserDefined.end())
211 m_Visitors[static_cast<int>(
id)] = v;
245 GetDimension()
const = 0;
249 GetInterpolationOrder()
const;
253 GetNumberOfPoints()
const = 0;
257 GetNumberOfBoundaryFeatures(
int dimension)
const = 0;
294 PointIdsBegin()
const = 0;
303 PointIdsEnd()
const = 0;
308 GetPointIdsContainer()
const;
424 IsExplicitBoundary();
431 AddUsingCell(CellIdentifier cellId);
437 RemoveUsingCell(CellIdentifier cellId);
445 IsUsingCell(CellIdentifier cellId);
451 GetNumberOfUsingCells();
453 #if !defined(ITK_WRAPPING_PARSER)
457 virtual UsingCellsContainerIterator
463 virtual UsingCellsContainerIterator
479 #if !defined(ITK_LEGACY_REMOVE)
518 template <
int VPointDimension,
520 typename TInterpolationWeight,
521 typename TPointIdentifier,
522 typename TCellIdentifier,
523 typename TCellFeatureIdentifier,
525 typename TPointsContainer,
526 typename TUsingCellsContainer>
530 static constexpr
unsigned int PointDimension = VPointDimension;
544 #define itkMakeCellTraitsMacro \
545 CellTraitsInfo<Self::PointDimension, \
547 InterpolationWeightType, \
550 CellFeatureIdentifier, \
556 #if !defined(ITK_WRAPPING_PARSER)
557 # ifndef ITK_MANUAL_INSTANTIATION
558 # include "itkCellInterface.hxx"
SmartPointer< Self > Pointer
TPointsContainer PointsContainer
virtual bool GetClosestBoundary(CoordRepType[], bool *, CellAutoPointer &)
typename std::map< CellGeometryEnum, VisitorPointer >::value_type VisitorPointerValueType
std::map< CellGeometryEnum, VisitorPointer > m_UserDefined
typename PointType::VectorType VectorType
NOTE: it should normally be defined in the traits.
typename CellTraits::PointIdentifier PointIdentifier
virtual bool IntersectWithLine(CoordRepType[PointDimension], CoordRepType[PointDimension], CoordRepType, CoordRepType[PointDimension], CoordRepType *, CoordRepType[])
typename CellTraits::UsingCellsContainer UsingCellsContainer
typename VisitorType::Pointer VisitorPointer
Abstract interface for a visitor class that can visit the cells in a Mesh.
A simple utility class to define the cell type inside a mesh type structure definition....
typename CellTraits::InterpolationWeightType InterpolationWeightType
ImageBaseType::SpacingType VectorType
ImageBaseType::PointType PointType
const PointIdentifier * PointIdConstIterator
typename CellTraits::PointsContainer PointsContainer
typename CellTraits::PointType PointType
ConstSelfAutoPointer CellConstAutoPointer
typename CellTraits::CoordRepType CoordRepType
A visitor that can visit different cell types in a mesh. CellInterfaceVisitor instances can be regist...
typename CellTraits::PointIdConstIterator PointIdConstIterator
TCellIdentifier CellIdentifier
PointIdentifier * PointIdIterator
VisitorType * GetVisitor(CellGeometryEnum id)
typename UsingCellsContainer::iterator UsingCellsContainerIterator
Light weight base class for most itk classes.
RawPointer CellRawPointer
CoordRepType * GetBoundingBox(CoordRepType[PointDimension *2])
TUsingCellsContainer UsingCellsContainer
class ITK_TEMPLATE_EXPORT CellInterface
virtual bool EvaluatePosition(CoordRepType *, PointsContainer *, CoordRepType *, CoordRepType[], double *, InterpolationWeightType *)
SelfAutoPointer CellAutoPointer
void UnRegister() noexcept
typename CellTraits::CellIdentifier CellIdentifier
ConstRawPointer CellConstRawPointer
CellFeatureIdentifier CellFeatureCount
An abstract interface for cells.
CoordRepType GetBoundingBoxDiagonalLength2()
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
typename CellTraits::PointIdIterator PointIdIterator
virtual void EvaluateShapeFunctions(const ParametricCoordArrayType &, ShapeFunctionsArrayType &) const
Array class with size defined at construction time.
TInterpolationWeight InterpolationWeightType
typename CellTraits::CellFeatureIdentifier CellFeatureIdentifier
TCellFeatureIdentifier CellFeatureIdentifier
void AddVisitor(VisitorType *v)
TPointIdentifier PointIdentifier
virtual CellGeometryEnum GetCellTopologyId()=0
#define itkCellCommonTypedefs(celltype)
virtual bool IntersectBoundingBoxWithLine(CoordRepType[PointDimension *2], CoordRepType[PointDimension], CoordRepType[PointDimension], CoordRepType[PointDimension], CoordRepType *)