Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkRegionVoxelCounter.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 mitkRegionVoxelCounter_h
18 #define mitkRegionVoxelCounter_h
19 
20 #include<itkImage.h>
21 
22 #include "mitkCommon.h"
23 #include "MitkConnectomicsExports.h"
24 
25 namespace mitk
26 {
27 
28  template <typename TPixel, unsigned int VImageDimension>
30  {
31  public:
32  typedef itk::Image< TPixel, VImageDimension > ImageType;
33 
34  void SetRegion(typename ImageType::RegionType);
35  void SetImage(itk::Image<TPixel, VImageDimension> *);
36 
38  int VoxelWithValue(int value);
40  double PercentageVoxelWithValueZeroExcluded(int value);
41 
42  private:
43  typename ImageType::RegionType m_Region;
44  ImageType * m_Image;
45  };
46 
47 }
48 
50 
51 #endif /* mitkRegionVoxelCounter_h */
void SetImage(itk::Image< TPixel, VImageDimension > *)
DataCollection - Class to facilitate loading/accessing structured data.
double PercentageVoxelWithValueZeroExcluded(int value)
Gives back the percentage of the number of voxels with the chosen value in comparison to the number o...
void SetRegion(typename ImageType::RegionType)
itk::Image< TPixel, VImageDimension > ImageType
int VoxelWithValue(int value)
Counts all voxels with the chosen value in the set region.