ITK  5.2.0
Insight Toolkit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
itk::SimplexMeshVolumeCalculator< TInputMesh > Class Template Reference

#include <itkSimplexMeshVolumeCalculator.h>

+ Inheritance diagram for itk::SimplexMeshVolumeCalculator< TInputMesh >:
+ Collaboration diagram for itk::SimplexMeshVolumeCalculator< TInputMesh >:

Classes

class  SimplexCellVisitor
 

Public Types

using CellMultiVisitorPointer = typename CellMultiVisitorType::Pointer
 
using CellMultiVisitorType = typename SimplexCellType::MultiVisitor
 
using ConstPointer = SmartPointer< const Self >
 
using CovariantVectorType = CovariantVector< typename VectorType::ValueType, 3 >
 
using InputCellTraitsType = typename InputMeshType::MeshTraits::CellTraits
 
using InputMeshConstPointer = typename InputMeshType::ConstPointer
 
using InputMeshPointer = typename InputMeshType::Pointer
 
using InputMeshType = TInputMesh
 
using InputNeighbors = typename InputMeshType::NeighborListType
 
using InputNeighborsIterator = typename InputMeshType::NeighborListType::iterator
 
using InputPixelType = typename InputMeshType::PixelType
 
using InputPointsContainer = typename InputMeshType::PointsContainer
 
using InputPointsContainerIterator = typename InputPointsContainer::ConstIterator
 
using InputPointsContainerPointer = typename InputPointsContainer::ConstPointer
 
using InputPointType = typename InputMeshType::PointType
 
using Pointer = SmartPointer< Self >
 
using PointMapPointer = typename PointMapType::Pointer
 
using PointMapType = itk::MapContainer< IdentifierType, InputPointType >
 
using Self = SimplexMeshVolumeCalculator
 
using SimplexCellType = typename InputMeshType::CellType
 
using SimplexPolygonType = itk::PolygonCell< SimplexCellType >
 
using SimplexVisitorInterfacePointer = typename SimplexVisitorInterfaceType::Pointer
 
using SimplexVisitorInterfaceType = itk::CellInterfaceVisitorImplementation< InputPixelType, InputCellTraitsType, SimplexPolygonType, SimplexCellVisitor >
 
using Superclass = Object
 
using VectorType = typename InputPointType::VectorType
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

void Compute ()
 
virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual double GetArea () const
 
virtual const char * GetNameOfClass () const
 
virtual double GetVolume () const
 
virtual void SetSimplexMesh (InputMeshType *_arg)
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Protected Member Functions

void PrintSelf (std::ostream &os, Indent indent) const override
 
 SimplexMeshVolumeCalculator ()=default
 
 ~SimplexMeshVolumeCalculator () override=default
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
 ~Object () override
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Member Functions

void CalculateTriangleVolume (InputPointType p1, InputPointType p2, InputPointType p3)
 
void CreateTriangles ()
 
void Finalize ()
 
IdentifierType FindCellId (IdentifierType id1, IdentifierType id2, IdentifierType id3)
 
void Initialize ()
 

Private Attributes

double m_Area { 0.0 }
 
PointMapPointer m_Centers
 
double m_Kx { 0.0 }
 
double m_Ky { 0.0 }
 
double m_Kz { 0.0 }
 
IndexValueType m_Muncx { 0 }
 
IndexValueType m_Muncy { 0 }
 
IndexValueType m_Muncz { 0 }
 
SizeValueType m_NumberOfTriangles { 0 }
 
InputMeshPointer m_SimplexMesh
 
double m_Volume { 0.0 }
 
double m_VolumeX { 0.0 }
 
double m_VolumeY { 0.0 }
 
double m_VolumeZ { 0.0 }
 
double m_Wxy { 0.0 }
 
double m_Wxyz { 0.0 }
 
double m_Wxz { 0.0 }
 
double m_Wyz { 0.0 }
 

Additional Inherited Members

- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Detailed Description

template<typename TInputMesh>
class itk::SimplexMeshVolumeCalculator< TInputMesh >

Adapted from itkSimplexMeshToTriangleFilter to calculate the volume of a simplex mesh using the barycenters and normals. call Compute() to calculate the volume and GetVolume() to get the value. For an example see itkDeformableSimplexMesh3DFilter.cxx (Thomas Boettger. Division Medical and Biological Informatics, German Cancer Research Center, Heidelberg.)

Author
Leila Baghdadi MICe, Hospital for Sick Children, Toronto, Canada.

The original implementation has been replaced with an algorithm based on the discrete form of the divergence theorem. The general assumption here is that the model is of closed surface. For more details see the following reference (Alyassin A.M. et al, "Evaluation of new algorithms for the interactive measurement of surface area and volume", Med Phys 21(6) 1994.).

ITK Sphinx Examples:
Examples
SphinxExamples/src/Core/Mesh/CalculateAreaAndVolumeOfSimplexMesh/Code.cxx.

Definition at line 54 of file itkSimplexMeshVolumeCalculator.h.

Member Typedef Documentation

◆ CellMultiVisitorPointer

template<typename TInputMesh >
using itk::SimplexMeshVolumeCalculator< TInputMesh >::CellMultiVisitorPointer = typename CellMultiVisitorType::Pointer

Definition at line 167 of file itkSimplexMeshVolumeCalculator.h.

◆ CellMultiVisitorType

template<typename TInputMesh >
using itk::SimplexMeshVolumeCalculator< TInputMesh >::CellMultiVisitorType = typename SimplexCellType::MultiVisitor

Definition at line 166 of file itkSimplexMeshVolumeCalculator.h.

◆ ConstPointer

template<typename TInputMesh >
using itk::SimplexMeshVolumeCalculator< TInputMesh >::ConstPointer = SmartPointer<const Self>

Definition at line 67 of file itkSimplexMeshVolumeCalculator.h.

◆ CovariantVectorType

template<typename TInputMesh >
using itk::SimplexMeshVolumeCalculator< TInputMesh >::CovariantVectorType = CovariantVector<typename VectorType::ValueType, 3>

Definition at line 98 of file itkSimplexMeshVolumeCalculator.h.

◆ InputCellTraitsType

template<typename TInputMesh >
using itk::SimplexMeshVolumeCalculator< TInputMesh >::InputCellTraitsType = typename InputMeshType::MeshTraits::CellTraits

Definition at line 81 of file itkSimplexMeshVolumeCalculator.h.

◆ InputMeshConstPointer

template<typename TInputMesh >
using itk::SimplexMeshVolumeCalculator< TInputMesh >::InputMeshConstPointer = typename InputMeshType::ConstPointer

Definition at line 77 of file itkSimplexMeshVolumeCalculator.h.

◆ InputMeshPointer

template<typename TInputMesh >
using itk::SimplexMeshVolumeCalculator< TInputMesh >::InputMeshPointer = typename InputMeshType::Pointer

Definition at line 76 of file itkSimplexMeshVolumeCalculator.h.

◆ InputMeshType

template<typename TInputMesh >
using itk::SimplexMeshVolumeCalculator< TInputMesh >::InputMeshType = TInputMesh

Definition at line 75 of file itkSimplexMeshVolumeCalculator.h.

◆ InputNeighbors

template<typename TInputMesh >
using itk::SimplexMeshVolumeCalculator< TInputMesh >::InputNeighbors = typename InputMeshType::NeighborListType

Definition at line 87 of file itkSimplexMeshVolumeCalculator.h.

◆ InputNeighborsIterator

template<typename TInputMesh >
using itk::SimplexMeshVolumeCalculator< TInputMesh >::InputNeighborsIterator = typename InputMeshType::NeighborListType::iterator

Definition at line 88 of file itkSimplexMeshVolumeCalculator.h.

◆ InputPixelType

template<typename TInputMesh >
using itk::SimplexMeshVolumeCalculator< TInputMesh >::InputPixelType = typename InputMeshType::PixelType

Definition at line 80 of file itkSimplexMeshVolumeCalculator.h.

◆ InputPointsContainer

template<typename TInputMesh >
using itk::SimplexMeshVolumeCalculator< TInputMesh >::InputPointsContainer = typename InputMeshType::PointsContainer

Definition at line 83 of file itkSimplexMeshVolumeCalculator.h.

◆ InputPointsContainerIterator

template<typename TInputMesh >
using itk::SimplexMeshVolumeCalculator< TInputMesh >::InputPointsContainerIterator = typename InputPointsContainer::ConstIterator

Definition at line 85 of file itkSimplexMeshVolumeCalculator.h.

◆ InputPointsContainerPointer

template<typename TInputMesh >
using itk::SimplexMeshVolumeCalculator< TInputMesh >::InputPointsContainerPointer = typename InputPointsContainer::ConstPointer

Definition at line 84 of file itkSimplexMeshVolumeCalculator.h.

◆ InputPointType

template<typename TInputMesh >
using itk::SimplexMeshVolumeCalculator< TInputMesh >::InputPointType = typename InputMeshType::PointType

Definition at line 79 of file itkSimplexMeshVolumeCalculator.h.

◆ Pointer

template<typename TInputMesh >
using itk::SimplexMeshVolumeCalculator< TInputMesh >::Pointer = SmartPointer<Self>

Smart pointer type alias support

Definition at line 66 of file itkSimplexMeshVolumeCalculator.h.

◆ PointMapPointer

template<typename TInputMesh >
using itk::SimplexMeshVolumeCalculator< TInputMesh >::PointMapPointer = typename PointMapType::Pointer

Definition at line 95 of file itkSimplexMeshVolumeCalculator.h.

◆ PointMapType

template<typename TInputMesh >
using itk::SimplexMeshVolumeCalculator< TInputMesh >::PointMapType = itk::MapContainer<IdentifierType, InputPointType>

Definition at line 94 of file itkSimplexMeshVolumeCalculator.h.

◆ Self

template<typename TInputMesh >
using itk::SimplexMeshVolumeCalculator< TInputMesh >::Self = SimplexMeshVolumeCalculator

Standard "Self" type alias.

Definition at line 60 of file itkSimplexMeshVolumeCalculator.h.

◆ SimplexCellType

template<typename TInputMesh >
using itk::SimplexMeshVolumeCalculator< TInputMesh >::SimplexCellType = typename InputMeshType::CellType

Definition at line 90 of file itkSimplexMeshVolumeCalculator.h.

◆ SimplexPolygonType

template<typename TInputMesh >
using itk::SimplexMeshVolumeCalculator< TInputMesh >::SimplexPolygonType = itk::PolygonCell<SimplexCellType>

Definition at line 91 of file itkSimplexMeshVolumeCalculator.h.

◆ SimplexVisitorInterfacePointer

template<typename TInputMesh >
using itk::SimplexMeshVolumeCalculator< TInputMesh >::SimplexVisitorInterfacePointer = typename SimplexVisitorInterfaceType::Pointer

Definition at line 165 of file itkSimplexMeshVolumeCalculator.h.

◆ SimplexVisitorInterfaceType

Definition at line 163 of file itkSimplexMeshVolumeCalculator.h.

◆ Superclass

template<typename TInputMesh >
using itk::SimplexMeshVolumeCalculator< TInputMesh >::Superclass = Object

Standard "Superclass" type alias.

Definition at line 63 of file itkSimplexMeshVolumeCalculator.h.

◆ VectorType

template<typename TInputMesh >
using itk::SimplexMeshVolumeCalculator< TInputMesh >::VectorType = typename InputPointType::VectorType

Definition at line 97 of file itkSimplexMeshVolumeCalculator.h.

Constructor & Destructor Documentation

◆ SimplexMeshVolumeCalculator()

template<typename TInputMesh >
itk::SimplexMeshVolumeCalculator< TInputMesh >::SimplexMeshVolumeCalculator ( )
protecteddefault

◆ ~SimplexMeshVolumeCalculator()

template<typename TInputMesh >
itk::SimplexMeshVolumeCalculator< TInputMesh >::~SimplexMeshVolumeCalculator ( )
overrideprotecteddefault

Member Function Documentation

◆ CalculateTriangleVolume()

template<typename TInputMesh >
void itk::SimplexMeshVolumeCalculator< TInputMesh >::CalculateTriangleVolume ( InputPointType  p1,
InputPointType  p2,
InputPointType  p3 
)
private

intermediate volume computation

◆ Compute()

template<typename TInputMesh >
void itk::SimplexMeshVolumeCalculator< TInputMesh >::Compute ( )

Compute the volume of the entire simplex mesh.

◆ CreateAnother()

template<typename TInputMesh >
virtual::itk::LightObject::Pointer itk::SimplexMeshVolumeCalculator< TInputMesh >::CreateAnother ( ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::Object.

◆ CreateTriangles()

template<typename TInputMesh >
void itk::SimplexMeshVolumeCalculator< TInputMesh >::CreateTriangles ( )
private

creates dual triangles for all simplex cells

◆ Finalize()

template<typename TInputMesh >
void itk::SimplexMeshVolumeCalculator< TInputMesh >::Finalize ( )
private

◆ FindCellId()

template<typename TInputMesh >
IdentifierType itk::SimplexMeshVolumeCalculator< TInputMesh >::FindCellId ( IdentifierType  id1,
IdentifierType  id2,
IdentifierType  id3 
)
private

part of algorithm

◆ GetArea()

template<typename TInputMesh >
virtual double itk::SimplexMeshVolumeCalculator< TInputMesh >::GetArea ( ) const
virtual

Return the computed area.

◆ GetNameOfClass()

template<typename TInputMesh >
virtual const char* itk::SimplexMeshVolumeCalculator< TInputMesh >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::Object.

◆ GetVolume()

template<typename TInputMesh >
virtual double itk::SimplexMeshVolumeCalculator< TInputMesh >::GetVolume ( ) const
virtual

Return the computed volume.

◆ Initialize()

template<typename TInputMesh >
void itk::SimplexMeshVolumeCalculator< TInputMesh >::Initialize ( )
private

◆ New()

template<typename TInputMesh >
static Pointer itk::SimplexMeshVolumeCalculator< TInputMesh >::New ( )
static

Method of creation through the object factory.

◆ PrintSelf()

template<typename TInputMesh >
void itk::SimplexMeshVolumeCalculator< TInputMesh >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::Object.

◆ SetSimplexMesh()

template<typename TInputMesh >
virtual void itk::SimplexMeshVolumeCalculator< TInputMesh >::SetSimplexMesh ( InputMeshType _arg)
virtual

Set the input mesh.

Member Data Documentation

◆ m_Area

template<typename TInputMesh >
double itk::SimplexMeshVolumeCalculator< TInputMesh >::m_Area { 0.0 }
private

Definition at line 216 of file itkSimplexMeshVolumeCalculator.h.

◆ m_Centers

template<typename TInputMesh >
PointMapPointer itk::SimplexMeshVolumeCalculator< TInputMesh >::m_Centers
private

attribute stores the result of the simplex cell visitor

Definition at line 208 of file itkSimplexMeshVolumeCalculator.h.

◆ m_Kx

template<typename TInputMesh >
double itk::SimplexMeshVolumeCalculator< TInputMesh >::m_Kx { 0.0 }
private

Definition at line 217 of file itkSimplexMeshVolumeCalculator.h.

◆ m_Ky

template<typename TInputMesh >
double itk::SimplexMeshVolumeCalculator< TInputMesh >::m_Ky { 0.0 }
private

Definition at line 218 of file itkSimplexMeshVolumeCalculator.h.

◆ m_Kz

template<typename TInputMesh >
double itk::SimplexMeshVolumeCalculator< TInputMesh >::m_Kz { 0.0 }
private

Definition at line 219 of file itkSimplexMeshVolumeCalculator.h.

◆ m_Muncx

template<typename TInputMesh >
IndexValueType itk::SimplexMeshVolumeCalculator< TInputMesh >::m_Muncx { 0 }
private

Definition at line 225 of file itkSimplexMeshVolumeCalculator.h.

◆ m_Muncy

template<typename TInputMesh >
IndexValueType itk::SimplexMeshVolumeCalculator< TInputMesh >::m_Muncy { 0 }
private

Definition at line 226 of file itkSimplexMeshVolumeCalculator.h.

◆ m_Muncz

template<typename TInputMesh >
IndexValueType itk::SimplexMeshVolumeCalculator< TInputMesh >::m_Muncz { 0 }
private

Definition at line 227 of file itkSimplexMeshVolumeCalculator.h.

◆ m_NumberOfTriangles

template<typename TInputMesh >
SizeValueType itk::SimplexMeshVolumeCalculator< TInputMesh >::m_NumberOfTriangles { 0 }
private

Definition at line 229 of file itkSimplexMeshVolumeCalculator.h.

◆ m_SimplexMesh

template<typename TInputMesh >
InputMeshPointer itk::SimplexMeshVolumeCalculator< TInputMesh >::m_SimplexMesh
private

Definition at line 210 of file itkSimplexMeshVolumeCalculator.h.

◆ m_Volume

template<typename TInputMesh >
double itk::SimplexMeshVolumeCalculator< TInputMesh >::m_Volume { 0.0 }
private

Definition at line 212 of file itkSimplexMeshVolumeCalculator.h.

◆ m_VolumeX

template<typename TInputMesh >
double itk::SimplexMeshVolumeCalculator< TInputMesh >::m_VolumeX { 0.0 }
private

Definition at line 213 of file itkSimplexMeshVolumeCalculator.h.

◆ m_VolumeY

template<typename TInputMesh >
double itk::SimplexMeshVolumeCalculator< TInputMesh >::m_VolumeY { 0.0 }
private

Definition at line 214 of file itkSimplexMeshVolumeCalculator.h.

◆ m_VolumeZ

template<typename TInputMesh >
double itk::SimplexMeshVolumeCalculator< TInputMesh >::m_VolumeZ { 0.0 }
private

Definition at line 215 of file itkSimplexMeshVolumeCalculator.h.

◆ m_Wxy

template<typename TInputMesh >
double itk::SimplexMeshVolumeCalculator< TInputMesh >::m_Wxy { 0.0 }
private

Definition at line 221 of file itkSimplexMeshVolumeCalculator.h.

◆ m_Wxyz

template<typename TInputMesh >
double itk::SimplexMeshVolumeCalculator< TInputMesh >::m_Wxyz { 0.0 }
private

Definition at line 220 of file itkSimplexMeshVolumeCalculator.h.

◆ m_Wxz

template<typename TInputMesh >
double itk::SimplexMeshVolumeCalculator< TInputMesh >::m_Wxz { 0.0 }
private

Definition at line 222 of file itkSimplexMeshVolumeCalculator.h.

◆ m_Wyz

template<typename TInputMesh >
double itk::SimplexMeshVolumeCalculator< TInputMesh >::m_Wyz { 0.0 }
private

Definition at line 223 of file itkSimplexMeshVolumeCalculator.h.


The documentation for this class was generated from the following file: