12 #ifndef mitkRandomImageSampler_h
13 #define mitkRandomImageSampler_h
45 itkFactorylessNewMacro(Self);
50 itkSetMacro(AcceptanceRate,
double);
51 itkGetConstMacro(AcceptanceRate,
double);
59 m_AcceptanceRateVector = arg;
62 itkGetConstMacro(AcceptanceRateVector, std::vector<double>);
64 itkSetMacro(NumberOfSamples,
unsigned int);
65 itkGetConstMacro(NumberOfSamples,
unsigned int);
73 m_NumberOfSamplesVector = arg;
76 itkGetConstMacro(NumberOfSamplesVector, std::vector<unsigned int>);
91 void GenerateOutputInformation()
override;
96 void GenerateData()
override;
101 template<
typename TPixel,
unsigned int VImageDimension>
102 void ItkImageProcessing(
const itk::Image<TPixel, VImageDimension>* itkImage);
107 template<
typename TPixel,
unsigned int VImageDimension>
108 void ItkImageProcessingClassDependendSampling(
const itk::Image<TPixel, VImageDimension>* itkImage);
113 template<
typename TPixel,
unsigned int VImageDimension>
114 void ItkImageProcessingFixedNumberSampling(
const itk::Image<TPixel, VImageDimension>* itkImage);
119 template<
typename TPixel,
unsigned int VImageDimension>
120 void ItkImageProcessingClassDependendNumberSampling(
const itk::Image<TPixel, VImageDimension>* itkImage);
122 double m_AcceptanceRate;
123 std::vector<double> m_AcceptanceRateVector;
124 unsigned int m_NumberOfSamples;
125 std::vector<unsigned int> m_NumberOfSamplesVector;
#define MITKCLUTILITIES_EXPORT
Superclass of all classes having one or more Images as input and generating Images as output.
Randomly samples voxels from a label image using configurable strategies.
mitkClassMacro(RandomImageSampler, ImageToImageFilter)
void SetNumberOfSamplesVector(std::vector< unsigned int > arg)
Set per-class sample counts for CLASS_DEPENDEND_NUMBER_OF_ACCEPTANCE mode.
void SetAcceptanceRateVector(std::vector< double > arg)
Set per-class acceptance rates for CLASS_DEPENDEND_ACCEPTANCE_RATE mode.
Find image slices visible on a given plane.
RandomImageSamplerMode
Enumeration of sampling modes for RandomImageSampler.
@ CLASS_DEPENDEND_ACCEPTANCE_RATE
Sample each class with an individual acceptance rate.
@ SINGLE_ACCEPTANCE_RATE
Sample all labels with a single acceptance rate.
@ CLASS_DEPENDEND_NUMBER_OF_ACCEPTANCE
Draw a fixed number of samples per class.
@ SINGLE_NUMBER_OF_ACCEPTANCE
Draw a fixed total number of samples.