18#ifndef itkSimplexMeshVolumeCalculator_h
19#define itkSimplexMeshVolumeCalculator_h
53template <
typename TInputMesh>
124 using PointIdIterator =
typename SimplexPolygonType::PointIdIterator;
132 m_Mesh->GetPoint(*it, &p);
133 center += p.GetVectorFromOrigin();
141 m_CenterMap->InsertElement(cellId, center);
162 CellInterfaceVisitorImplementation<InputPixelType, InputCellTraitsType, SimplexPolygonType, SimplexCellVisitor>;
176 itkGetConstMacro(Volume,
double);
179 itkGetConstMacro(
Area,
double);
211 double m_Volume{ 0.0 };
212 double m_VolumeX{ 0.0 };
213 double m_VolumeY{ 0.0 };
214 double m_VolumeZ{ 0.0 };
215 double m_Area{ 0.0 };
219 double m_Wxyz{ 0.0 };
232#ifndef ITK_MANUAL_INSTANTIATION
233# include "itkSimplexMeshVolumeCalculator.hxx"
A template class used to implement a visitor object.
A templated class holding a n-Dimensional covariant vector.
Control indentation during Print() invocation.
Light weight base class for most itk classes.
A wrapper of the STL "map" container.
Base class for most ITK classes.
Represents a polygon in a Mesh.
unsigned int GetNumberOfPoints() const override
PointIdIterator PointIdsEnd() override
PointIdIterator PointIdsBegin() override
void SetMesh(InputMeshPointer mesh)
PointMapPointer GetCenterMap()
virtual ~SimplexCellVisitor()=default
void Visit(IdentifierType cellId, SimplexPolygonType *poly)
visits all polygon cells and compute the cell centers
PointMapPointer m_CenterMap
Adapted from itkSimplexMeshToTriangleFilter to calculate the volume of a simplex mesh using the baryc...
typename CellMultiVisitorType::Pointer CellMultiVisitorPointer
typename InputMeshType::PointType InputPointType
typename InputMeshType::ConstPointer InputMeshConstPointer
typename SimplexCellType::MultiVisitor CellMultiVisitorType
typename SimplexVisitorInterfaceType::Pointer SimplexVisitorInterfacePointer
typename InputMeshType::NeighborListType::iterator InputNeighborsIterator
typename InputMeshType::Pointer InputMeshPointer
typename PointMapType::Pointer PointMapPointer
IdentifierType FindCellId(IdentifierType id1, IdentifierType id2, IdentifierType id3)
typename InputPointsContainer::ConstIterator InputPointsContainerIterator
typename InputPointType::VectorType VectorType
typename InputPointsContainer::ConstPointer InputPointsContainerPointer
SimplexMeshVolumeCalculator()=default
~SimplexMeshVolumeCalculator() override=default
typename InputMeshType::MeshTraits::CellTraits InputCellTraitsType
typename InputMeshType::PixelType InputPixelType
void CalculateTriangleVolume(InputPointType p1, InputPointType p2, InputPointType p3)
typename InputMeshType::NeighborListType InputNeighbors
typename InputMeshType::PointsContainer InputPointsContainer
void PrintSelf(std::ostream &os, Indent indent) const override
typename InputMeshType::CellType SimplexCellType
The class represents a 2-simplex mesh.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
ImageBaseType::PointType PointType
ImageBaseType::SpacingType VectorType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
SizeValueType IdentifierType
unsigned long SizeValueType