Medical Imaging Interaction Toolkit  2016.11.0
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 ()
 
virtual ~VolumeCalculator ()
 
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 37 of file mitkVolumeCalculator.h.

Member Typedef Documentation

Definition at line 40 of file mitkVolumeCalculator.h.

Constructor & Destructor Documentation

mitk::VolumeCalculator::VolumeCalculator ( )
protected

Definition at line 48 of file mitkVolumeCalculator.cpp.

References m_TimeSelector, and mitk::ImageTimeSelector::New().

mitk::VolumeCalculator::~VolumeCalculator ( )
protectedvirtual

Definition at line 53 of file mitkVolumeCalculator.cpp.

Member Function Documentation

Pointer mitk::VolumeCalculator::Clone ( ) const
void mitk::VolumeCalculator::ComputeVolume ( )

Definition at line 62 of file mitkVolumeCalculator.cpp.

References AccessFixedDimensionByItk, InternalCompute(), and Update().

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

Definition at line 118 of file mitkVolumeCalculator.cpp.

void mitk::VolumeCalculator::ComputeVolumeFromImageStatistics ( )

Definition at line 89 of file mitkVolumeCalculator.cpp.

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

Definition at line 40 of file mitkVolumeCalculator.h.

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

Definition at line 40 of file mitkVolumeCalculator.h.

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()
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.

Definition at line 57 of file mitkVolumeCalculator.cpp.

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

Returns the number of accepted voxels.

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

Definition at line 24 of file mitkVolumeCalculator.cpp.

References m_Threshold, m_Volume, and m_VoxelCount.

static Pointer mitk::VolumeCalculator::New ( )
static
virtual void mitk::VolumeCalculator::SetImage ( Image _arg)
virtual
virtual void mitk::VolumeCalculator::SetThreshold ( int  _arg)
virtual

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

Member Data Documentation

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

Definition at line 75 of file mitkVolumeCalculator.h.

int mitk::VolumeCalculator::m_Threshold
protected

Definition at line 76 of file mitkVolumeCalculator.h.

Referenced by InternalCompute().

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

Definition at line 80 of file mitkVolumeCalculator.h.

Referenced by VolumeCalculator().

float mitk::VolumeCalculator::m_Volume
protected

Definition at line 77 of file mitkVolumeCalculator.h.

Referenced by InternalCompute().

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

Definition at line 79 of file mitkVolumeCalculator.h.

unsigned long int mitk::VolumeCalculator::m_VoxelCount
protected

Definition at line 78 of file mitkVolumeCalculator.h.

Referenced by InternalCompute().


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