18 #ifndef itkVoronoiSegmentationRGBImageFilter_h
19 #define itkVoronoiSegmentationRGBImageFilter_h
53 template <
typename TInputImage,
typename TOutputImage>
73 using typename Superclass::BinaryObjectImage;
74 using typename Superclass::IndexList;
77 using typename Superclass::PixelType;
78 using typename Superclass::InputImagePointer;
79 using typename Superclass::InputImageType;
85 SetMeanPercentError(
const double x[6]);
87 SetSTDPercentError(
const double x[6]);
91 for (
int i = 0; i < 6; ++i)
93 x[i] = m_MeanPercentError[i];
99 for (
int i = 0; i < 6; ++i)
101 x[i] = m_STDPercentError[i];
107 for (
int i = 0; i < 6; ++i)
115 for (
int i = 0; i < 6; ++i)
123 for (
int i = 0; i < 6; ++i)
131 for (
int i = 0; i < 6; ++i)
139 for (
int i = 0; i < 6; ++i)
141 x[i] = m_MeanTolerance[i];
147 for (
int i = 0; i < 6; ++i)
149 x[i] = m_STDTolerance[i];
157 itkSetMacro(MaxValueOfRGB,
double);
158 itkGetConstMacro(MaxValueOfRGB,
double);
172 SetTestSTD(
unsigned int t1,
unsigned int t2,
unsigned int t3)
182 x[0] = m_TestMean[0];
183 x[1] = m_TestMean[1];
184 x[2] = m_TestMean[2];
196 TakeAPrior(
const BinaryObjectImage * aprior)
override;
198 using Superclass::SetInput;
200 SetInput(
const InputImageType * input)
override;
203 SetInput(
unsigned int,
const InputImageType * input)
override;
206 static constexpr
unsigned int InputImageDimension = TInputImage::ImageDimension;
207 static constexpr
unsigned int OutputImageDimension = TOutputImage::ImageDimension;
209 #ifdef ITK_USE_CONCEPT_CHECKING
221 PrintSelf(std::ostream & os,
Indent indent)
const override;
226 double m_MeanTolerance[6]{};
227 double m_STDTolerance[6]{};
228 double m_MeanPercentError[6]{};
229 double m_STDPercentError[6]{};
230 double m_MaxValueOfRGB{};
231 unsigned int m_TestMean[3]{};
232 unsigned int m_TestSTD[3]{};
236 TestHomogeneity(IndexList & Plist)
override;
240 #ifndef ITK_MANUAL_INSTANTIATION
241 # include "itkVoronoiSegmentationRGBImageFilter.hxx"