13 #ifndef mitkVolumeCalculator_h
14 #define mitkVolumeCalculator_h
17 #include <itkObject.h>
18 #include <itkObjectFactory.h>
41 itkFactorylessNewMacro(Self);
50 itkSetMacro(Threshold,
int);
60 itkGetMacro(Volume,
float);
65 itkGetMacro(VoxelCount,
unsigned long int);
108 template <
typename TPixel,
unsigned int VImageDimension>
Image class for storing multi-dimensional medical image data.
Calculates the volume of a mitk::Image.
void ComputeVolume()
Compute the volume by iterating over all voxels above the threshold.
~VolumeCalculator() override
ImageTimeSelector::Pointer m_TimeSelector
std::vector< float > m_Volumes
void InternalCompute(const itk::Image< TPixel, VImageDimension > *itkImage)
void ComputeVolumeFromImageStatistics()
Compute the volume using image statistics (count of max-valued voxels).
static float ComputeVolume(Vector3D spacing, unsigned int voxelCount)
Compute a volume from spacing and voxel count.
mitkClassMacroItkParent(VolumeCalculator, itk::Object)
unsigned long int m_VoxelCount
Image::ConstPointer m_Image
std::vector< float > GetVolumes()
Return the volumes for 4D images.
Find image slices visible on a given plane.