Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
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 
41  itkSetMacro(SamplingMode, RandomImageSamplerMode);
42  itkGetConstMacro(SamplingMode, RandomImageSamplerMode);
43 
44  itkSetMacro(AcceptanceRate, double);
45  itkGetConstMacro(AcceptanceRate, double);
46 
47  //itkSetMacro(AcceptanceRateVector, std::vector<double>);
48  void SetAcceptanceRateVector(std::vector<double> arg)
49  {
50  m_AcceptanceRateVector = arg;
51  }
52 
53  itkGetConstMacro(AcceptanceRateVector, std::vector<double>);
54 
55  itkSetMacro(NumberOfSamples, unsigned int);
56  itkGetConstMacro(NumberOfSamples, unsigned int);
57 
58  //itkSetMacro(NumberOfSamplesVector, std::vector<unsigned int>);
59  void SetNumberOfSamplesVector(std::vector<unsigned int> arg)
60  {
61  m_NumberOfSamplesVector = arg;
62  }
63 
64  itkGetConstMacro(NumberOfSamplesVector, std::vector<unsigned int>);
65 
66  private:
74  ~RandomImageSampler() override;
79  void GenerateOutputInformation() override;
84  void GenerateData() override;
85 
89  template<typename TPixel, unsigned int VImageDimension>
90  void ItkImageProcessing(const itk::Image<TPixel, VImageDimension>* itkImage);
91 
95  template<typename TPixel, unsigned int VImageDimension>
96  void ItkImageProcessingClassDependendSampling(const itk::Image<TPixel, VImageDimension>* itkImage);
97 
101  template<typename TPixel, unsigned int VImageDimension>
102  void ItkImageProcessingFixedNumberSampling(const itk::Image<TPixel, VImageDimension>* itkImage);
103 
107  template<typename TPixel, unsigned int VImageDimension>
108  void ItkImageProcessingClassDependendNumberSampling(const itk::Image<TPixel, VImageDimension>* itkImage);
109 
110  double m_AcceptanceRate;
111  std::vector<double> m_AcceptanceRateVector;
112  unsigned int m_NumberOfSamples;
113  std::vector<unsigned int> m_NumberOfSamplesVector;
114  RandomImageSamplerMode m_SamplingMode;
115  };
116 } //END mitk namespace
117 #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)