Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkCalculateSegmentationVolume.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkCalculateSegmentationVolume_h
14 #define mitkCalculateSegmentationVolume_h
15 
16 #include "mitkImageCast.h"
17 #include "mitkSegmentationSink.h"
19 
20 namespace mitk
21 {
23  {
24  public:
27 
28  protected:
29  CalculateSegmentationVolume(); // use smart pointers
31 
32  bool ReadyToRun() override;
33 
34  bool ThreadedUpdateFunction() override; // will be called from a thread after calling StartAlgorithm
35 
36  template <typename TPixel, unsigned int VImageDimension>
37  void ItkImageProcessing(itk::Image<TPixel, VImageDimension> *itkImage, TPixel *dummy = nullptr);
38 
39  private:
40  unsigned int m_Volume;
41 
42  Vector3D m_CenterOfMass;
43  Vector3D m_MinIndexOfBoundingBox;
44  Vector3D m_MaxIndexOfBoundingBox;
45  };
46 
47 } // namespace
48 
49 #endif
#define MITKSEGMENTATION_EXPORT
mitkClassMacro(CalculateSegmentationVolume, SegmentationSink)
mitkAlgorithmNewMacro(CalculateSegmentationVolume)
bool ThreadedUpdateFunction() override
void ItkImageProcessing(itk::Image< TPixel, VImageDimension > *itkImage, TPixel *dummy=nullptr)
Find image slices visible on a given plane.