18 #ifndef itkSimplexMeshVolumeCalculator_h
19 #define itkSimplexMeshVolumeCalculator_h
49 template<
typename TInputMesh >
95 typename VectorType::ValueType, 3 >;
113 m_CenterMap = PointMapType::New();
123 using PointIdIterator =
typename SimplexPolygonType::PointIdIterator;
132 m_Mesh->GetPoint(*it, &p);
133 center += p.GetVectorFromOrigin();
141 m_CenterMap->InsertElement(cellId, center);
176 itkGetConstMacro(Volume,
double);
179 itkGetConstMacro(Area,
double);
184 void PrintSelf(std::ostream & os,
Indent indent)
const override;
192 void CreateTriangles();
205 double m_Volume{0.0};
206 double m_VolumeX{0.0};
207 double m_VolumeY{0.0};
208 double m_VolumeZ{0.0};
226 #ifndef ITK_MANUAL_INSTANTIATION
227 #include "itkSimplexMeshVolumeCalculator.hxx"
typename InputMeshType::PointType InputPointType
typename SimplexVisitorInterfaceType::Pointer SimplexVisitorInterfacePointer
typename InputMeshType::MeshTraits::CellTraits InputCellTraitsType
Light weight base class for most itk classes.
typename InputMeshType::NeighborListType::iterator InputNeighborsIterator
A template class used to implement a visitor object.
PointMapPointer GetCenterMap()
visits all polygon cells and compute the cell centers
unsigned long SizeValueType
The class represents a 2-simplex mesh.
A wrapper of the STL "map" container.
typename InputMeshType::NeighborListType InputNeighbors
typename InputPointsContainer::ConstIterator InputPointsContainerIterator
typename InputMeshType::ConstPointer InputMeshConstPointer
PointIdIterator PointIdsBegin() override
typename InputMeshType::PixelType InputPixelType
PointMapPointer m_Centers
typename SimplexCellType::MultiVisitor CellMultiVisitorType
SizeValueType IdentifierType
InputMeshPointer m_SimplexMesh
typename InputMeshType::Pointer InputMeshPointer
signed long IndexValueType
PointMapPointer m_CenterMap
visits all polygon cells and compute the cell centers
Represents a polygon in a Mesh.
typename CellMultiVisitorType::Pointer CellMultiVisitorPointer
void SetMesh(InputMeshPointer mesh)
visits all polygon cells and compute the cell centers
Adapted from itkSimplexMeshToTriangleFilter to calculate the volume of a simplex mesh using the baryc...
Control indentation during Print() invocation.
ImageBaseType::PointType PointType
InputMeshPointer m_Mesh
visits all polygon cells and compute the cell centers
typename InputMeshType::PointsContainer InputPointsContainer
typename InputPointType::VectorType VectorType
void Visit(IdentifierType cellId, SimplexPolygonType *poly)
visits all polygon cells and compute the cell centers
typename InputPointsContainer::ConstPointer InputPointsContainerPointer
Base class for most ITK classes.
ImageBaseType::SpacingType VectorType
A templated class holding a n-Dimensional covariant vector.
unsigned int GetNumberOfPoints() const override
typename InputMeshType::CellType SimplexCellType
typename PointMapType::Pointer PointMapPointer
PointIdIterator PointIdsEnd() override