Medical Imaging Interaction Toolkit  2018.4.99-6a3ea89d
Medical Imaging Interaction Toolkit
mitkRandomImageSampler.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 #ifndef __mitkRandomImageSampler_h
13 #define __mitkRandomImageSampler_h
14 
15 #include "MitkCLUtilitiesExports.h"
16 
17 //MITK
18 #include <mitkImage.h>
19 #include "mitkImageToImageFilter.h"
20 #include <itkImage.h>
21 
22 namespace mitk
23 {
25  {
30  };
31 
32 
34  {
35  public:
36 
38  itkFactorylessNewMacro(Self);
39  itkCloneMacro(Self);
40  itkSetMacro(SamplingMode, RandomImageSamplerMode);
41  itkGetConstMacro(SamplingMode, RandomImageSamplerMode);
42 
43  itkSetMacro(AcceptanceRate, double);
44  itkGetConstMacro(AcceptanceRate, double);
45 
46  //itkSetMacro(AcceptanceRateVector, std::vector<double>);
47  void SetAcceptanceRateVector(std::vector<double> arg)
48  {
49  m_AcceptanceRateVector = arg;
50  }
51 
52  itkGetConstMacro(AcceptanceRateVector, std::vector<double>);
53 
54  itkSetMacro(NumberOfSamples, unsigned int);
55  itkGetConstMacro(NumberOfSamples, unsigned int);
56 
57  //itkSetMacro(NumberOfSamplesVector, std::vector<unsigned int>);
58  void SetNumberOfSamplesVector(std::vector<unsigned int> arg)
59  {
60  m_NumberOfSamplesVector = arg;
61  }
62 
63  itkGetConstMacro(NumberOfSamplesVector, std::vector<unsigned int>);
64 
65  private:
73  ~RandomImageSampler() override;
78  void GenerateOutputInformation() override;
83  void GenerateData() override;
84 
88  template<typename TPixel, unsigned int VImageDimension>
89  void ItkImageProcessing(const itk::Image<TPixel, VImageDimension>* itkImage);
90 
94  template<typename TPixel, unsigned int VImageDimension>
95  void ItkImageProcessingClassDependendSampling(const itk::Image<TPixel, VImageDimension>* itkImage);
96 
100  template<typename TPixel, unsigned int VImageDimension>
101  void ItkImageProcessingFixedNumberSampling(const itk::Image<TPixel, VImageDimension>* itkImage);
102 
106  template<typename TPixel, unsigned int VImageDimension>
107  void ItkImageProcessingClassDependendNumberSampling(const itk::Image<TPixel, VImageDimension>* itkImage);
108 
109  double m_AcceptanceRate;
110  std::vector<double> m_AcceptanceRateVector;
111  unsigned int m_NumberOfSamples;
112  std::vector<unsigned int> m_NumberOfSamplesVector;
113  RandomImageSamplerMode m_SamplingMode;
114  };
115 } //END mitk namespace
116 #endif
Superclass of all classes generating some kind of mitk::BaseData.
DataCollection - Class to facilitate loading/accessing structured data.
void SetNumberOfSamplesVector(std::vector< unsigned int > arg)
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
Superclass of all classes having one or more Images as input and generating Images as output...
#define MITKCLUTILITIES_EXPORT
void SetAcceptanceRateVector(std::vector< double > arg)