Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
mitk::VolumeCalculator Class Reference

Calculates the volume of a mitk::Image. The given volume is in milliliters or as a voxel count. Voxels are counted if their gray value is above a threshold (see SetThreshold), the default threshold is 0. More...

#include <mitkVolumeCalculator.h>

Inheritance diagram for mitk::VolumeCalculator:
Collaboration diagram for mitk::VolumeCalculator:

Public Types

typedef VolumeCalculator Self
 
typedef itk::Object Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 

Public Member Functions

virtual std::vector< std::string > GetClassHierarchy () const
 
virtual const char * GetClassName () const
 
Pointer Clone () const
 
virtual void SetImage (Image *_arg)
 
virtual void SetThreshold (int _arg)
 
virtual float GetVolume ()
 
virtual unsigned long int GetVoxelCount ()
 
std::vector< float > GetVolumes ()
 
void ComputeVolume ()
 
void ComputeVolumeFromImageStatistics ()
 

Static Public Member Functions

static const char * GetStaticNameOfClass ()
 
static Pointer New ()
 
static float ComputeVolume (Vector3D spacing, unsigned int voxelCount)
 

Protected Member Functions

 VolumeCalculator ()
 
 ~VolumeCalculator () override
 
template<typename TPixel , unsigned int VImageDimension>
void InternalCompute (const itk::Image< TPixel, VImageDimension > *itkImage)
 

Protected Attributes

Image::ConstPointer m_Image
 
int m_Threshold
 
float m_Volume
 
unsigned long int m_VoxelCount
 
std::vector< float > m_Volumes
 
ImageTimeSelector::Pointer m_TimeSelector
 

Detailed Description

Calculates the volume of a mitk::Image. The given volume is in milliliters or as a voxel count. Voxels are counted if their gray value is above a threshold (see SetThreshold), the default threshold is 0.

The filter works for 2D, 3D and 3D+t. In the 3D+t case a vector of volumes is provided (see GetVolumes()).

Definition at line 33 of file mitkVolumeCalculator.h.

Member Typedef Documentation

◆ ConstPointer

◆ Pointer

◆ Self

◆ Superclass

Definition at line 36 of file mitkVolumeCalculator.h.

Constructor & Destructor Documentation

◆ VolumeCalculator()

mitk::VolumeCalculator::VolumeCalculator ( )
protected

◆ ~VolumeCalculator()

mitk::VolumeCalculator::~VolumeCalculator ( )
overrideprotected

Member Function Documentation

◆ Clone()

Pointer mitk::VolumeCalculator::Clone ( ) const

◆ ComputeVolume() [1/2]

void mitk::VolumeCalculator::ComputeVolume ( )

◆ ComputeVolume() [2/2]

static float mitk::VolumeCalculator::ComputeVolume ( Vector3D  spacing,
unsigned int  voxelCount 
)
static

◆ ComputeVolumeFromImageStatistics()

void mitk::VolumeCalculator::ComputeVolumeFromImageStatistics ( )

◆ GetClassHierarchy()

virtual std::vector<std::string> mitk::VolumeCalculator::GetClassHierarchy ( ) const
inlinevirtual

Definition at line 36 of file mitkVolumeCalculator.h.

◆ GetClassName()

virtual const char* mitk::VolumeCalculator::GetClassName ( ) const
virtual

◆ GetStaticNameOfClass()

static const char* mitk::VolumeCalculator::GetStaticNameOfClass ( )
inlinestatic

Definition at line 36 of file mitkVolumeCalculator.h.

◆ GetVolume()

virtual float mitk::VolumeCalculator::GetVolume ( )
virtual

In case of a 2D image this returns the calculated volume in square cm, in case of 3D images the result is given in cubic cm. For 4D data refer to the GetVolumes() function.

See also
GetVolumes()

◆ GetVolumes()

std::vector<float> mitk::VolumeCalculator::GetVolumes ( )

Returns the volume for 4D images, as a vector where each volume is represented by an item in the vector (in cubic cm).

Note
Also for 2D+t images the result will be returned in cubic cm.

◆ GetVoxelCount()

virtual unsigned long int mitk::VolumeCalculator::GetVoxelCount ( )
virtual

Returns the number of accepted voxels.

◆ InternalCompute()

template<typename TPixel , unsigned int VImageDimension>
void mitk::VolumeCalculator::InternalCompute ( const itk::Image< TPixel, VImageDimension > *  itkImage)
protected

◆ New()

static Pointer mitk::VolumeCalculator::New ( )
static

◆ SetImage()

virtual void mitk::VolumeCalculator::SetImage ( Image _arg)
virtual

◆ SetThreshold()

virtual void mitk::VolumeCalculator::SetThreshold ( int  _arg)
virtual

Sets threshold, all voxels that are equal or greater are accepted.

Member Data Documentation

◆ m_Image

Image::ConstPointer mitk::VolumeCalculator::m_Image
protected

Definition at line 75 of file mitkVolumeCalculator.h.

◆ m_Threshold

int mitk::VolumeCalculator::m_Threshold
protected

Definition at line 76 of file mitkVolumeCalculator.h.

◆ m_TimeSelector

ImageTimeSelector::Pointer mitk::VolumeCalculator::m_TimeSelector
protected

Definition at line 80 of file mitkVolumeCalculator.h.

◆ m_Volume

float mitk::VolumeCalculator::m_Volume
protected

Definition at line 77 of file mitkVolumeCalculator.h.

◆ m_Volumes

std::vector<float> mitk::VolumeCalculator::m_Volumes
protected

Definition at line 79 of file mitkVolumeCalculator.h.

◆ m_VoxelCount

unsigned long int mitk::VolumeCalculator::m_VoxelCount
protected

Definition at line 78 of file mitkVolumeCalculator.h.


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