|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Calculates the volume and centroid for each label in a labeled image. More...
#include <mitkLabeledImageVolumeCalculator.h>


Public Types | |
| typedef std::vector< double > | VolumeVector |
| Vector of per-label volume values. More... | |
| typedef std::vector< Point3D > | PointVector |
| Vector of per-label centroid points. More... | |
Public Member Functions | |
| mitkClassMacroItkParent (LabeledImageVolumeCalculator, itk::Object) | |
| Pointer | Clone () const |
| virtual void | SetImage (const mitk::Image *_arg) |
| Set the input image. More... | |
| virtual void | Calculate () |
| Perform the volume and centroid calculation. More... | |
| double | GetVolume (unsigned int label) const |
| Get the volume for a specific label. More... | |
| const Point3D & | GetCentroid (unsigned int label) const |
| Get the centroid (center of mass) for a specific label. More... | |
| const VolumeVector & | GetVolumes () const |
| Get the vector of volumes for all labels. More... | |
| const PointVector & | GetCentroids () const |
| Get the vector of centroids for all labels. More... | |
Static Public Member Functions | |
| static Pointer | New () |
Protected Member Functions | |
| LabeledImageVolumeCalculator () | |
| ~LabeledImageVolumeCalculator () override | |
| template<typename TPixel , unsigned int VImageDimension> | |
| void | _InternalCalculateVolumes (itk::Image< TPixel, VImageDimension > *image, LabeledImageVolumeCalculator *volumeCalculator, BaseGeometry *geometry) |
Protected Attributes | |
| ImageTimeSelector::Pointer | m_InputTimeSelector |
| Image::ConstPointer | m_Image |
| VolumeVector | m_VolumeVector |
| PointVector | m_CentroidVector |
| Point3D | m_DummyPoint |
Calculates the volume and centroid for each label in a labeled image.
Labels are expected to be of an unsigned integer type. The class iterates over all voxels, groups them by label value, and computes each label's volume (voxel count * voxel volume) and centroid (center of mass).
Definition at line 38 of file mitkLabeledImageVolumeCalculator.h.
| typedef std::vector<Point3D> mitk::LabeledImageVolumeCalculator::PointVector |
Vector of per-label centroid points.
Definition at line 44 of file mitkLabeledImageVolumeCalculator.h.
| typedef std::vector<double> mitk::LabeledImageVolumeCalculator::VolumeVector |
Vector of per-label volume values.
Definition at line 42 of file mitkLabeledImageVolumeCalculator.h.
|
protected |
|
overrideprotected |
|
protected |
|
virtual |
Perform the volume and centroid calculation.
| Pointer mitk::LabeledImageVolumeCalculator::Clone | ( | ) | const |
| const Point3D& mitk::LabeledImageVolumeCalculator::GetCentroid | ( | unsigned int | label | ) | const |
Get the centroid (center of mass) for a specific label.
| [in] | label | The label index. |
| const PointVector& mitk::LabeledImageVolumeCalculator::GetCentroids | ( | ) | const |
Get the vector of centroids for all labels.
| double mitk::LabeledImageVolumeCalculator::GetVolume | ( | unsigned int | label | ) | const |
Get the volume for a specific label.
| [in] | label | The label index. |
| const VolumeVector& mitk::LabeledImageVolumeCalculator::GetVolumes | ( | ) | const |
Get the vector of volumes for all labels.
| mitk::LabeledImageVolumeCalculator::mitkClassMacroItkParent | ( | LabeledImageVolumeCalculator | , |
| itk::Object | |||
| ) |
|
static |
|
virtual |
Set the input image.
| [in] | _arg | The labeled image to analyze. |
|
protected |
Definition at line 106 of file mitkLabeledImageVolumeCalculator.h.
|
protected |
Definition at line 108 of file mitkLabeledImageVolumeCalculator.h.
|
protected |
Definition at line 103 of file mitkLabeledImageVolumeCalculator.h.
|
protected |
Definition at line 101 of file mitkLabeledImageVolumeCalculator.h.
|
protected |
Definition at line 105 of file mitkLabeledImageVolumeCalculator.h.