Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkLabeledImageVolumeCalculator.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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef _MITK_LABELEDIMAGEVOLUMECALCULATOR_H
18 #define _MITK_LABELEDIMAGEVOLUMECALCULATOR_H
19 
21 #include <itkObject.h>
22 
23 #include "mitkImage.h"
24 #include "mitkImageTimeSelector.h"
25 
26 #include <itkImage.h>
27 
28 namespace mitk
29 {
39  {
40  public:
41  typedef std::vector<double> VolumeVector;
42  typedef std::vector<Point3D> PointVector;
43 
45  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
46 
47  itkSetConstObjectMacro(Image, mitk::Image);
48 
49  virtual void Calculate();
50 
51  double GetVolume(unsigned int label) const;
52 
53  const Point3D &GetCentroid(unsigned int label) const;
54 
55  const VolumeVector &GetVolumes() const;
56 
57  const PointVector &GetCentroids() const;
58 
59  protected:
61 
62  virtual ~LabeledImageVolumeCalculator();
63 
64  template <typename TPixel, unsigned int VImageDimension>
65  void _InternalCalculateVolumes(itk::Image<TPixel, VImageDimension> *image,
66  LabeledImageVolumeCalculator *volumeCalculator,
67  BaseGeometry *geometry);
68 
69  ImageTimeSelector::Pointer m_InputTimeSelector;
70 
71  Image::ConstPointer m_Image;
72 
73  VolumeVector m_VolumeVector;
74  PointVector m_CentroidVector;
75 
76  Point3D m_DummyPoint;
77  };
78 }
79 
80 #endif // #define _MITK_LABELEDIMAGEVOLUMECALCULATOR_H
#define MITKDATATYPESEXT_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:53
Image class for storing images.
Definition: mitkImage.h:76
Provides access to a volume at a specific time of the input image.
Class for calculating the volume (or area) for each label in a labeled image.
BaseGeometry Describes the geometry of a data object.