ITK  6.0.0
Insight Toolkit
itkVoronoiSegmentationImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * https://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkVoronoiSegmentationImageFilter_h
19 #define itkVoronoiSegmentationImageFilter_h
20 
22 
23 namespace itk
24 {
52 template <typename TInputImage, typename TOutputImage, typename TBinaryPriorImage = Image<unsigned char, 2>>
53 class ITK_TEMPLATE_EXPORT VoronoiSegmentationImageFilter
54  : public VoronoiSegmentationImageFilterBase<TInputImage, TOutputImage, TBinaryPriorImage>
55 {
56 public:
57  ITK_DISALLOW_COPY_AND_MOVE(VoronoiSegmentationImageFilter);
58 
64 
66  itkNewMacro(Self);
67 
69  itkOverrideGetNameOfClassMacro(VoronoiSegmentationImageFilter);
70 
72  using typename Superclass::BinaryObjectImage;
73  using typename Superclass::IndexList;
74  using typename Superclass::IndexType;
75  using typename Superclass::RegionType;
76  using typename Superclass::InputImageType;
77 
79  itkSetMacro(Mean, double);
80  itkGetConstMacro(Mean, double);
85  itkSetMacro(STD, double);
86  itkGetConstMacro(STD, double);
90  itkSetMacro(MeanTolerance, double);
91  itkGetConstMacro(MeanTolerance, double);
95  itkSetMacro(STDTolerance, double);
96 
98  itkGetConstMacro(STDTolerance, double);
99 
101  void
102  SetMeanPercentError(double x);
103 
104  itkGetConstMacro(MeanPercentError, double);
105 
107  itkGetConstMacro(STDPercentError, double);
108  void
109  SetSTDPercentError(double x);
114  void
115  TakeAPrior(const BinaryObjectImage * aprior) override;
116 
118  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
119  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
120 
121 #ifdef ITK_USE_CONCEPT_CHECKING
122  // Begin concept checking
125  // End concept checking
126 #endif
127 
128 protected:
129  VoronoiSegmentationImageFilter() = default;
130  ~VoronoiSegmentationImageFilter() override = default;
131  void
132  PrintSelf(std::ostream & os, Indent indent) const override;
133 
134 private:
135  double m_Mean{ 0.0 };
136  double m_STD{ 0.0 };
137  double m_MeanTolerance{ 0.0 };
138  double m_STDTolerance{ 0.0 };
139  double m_MeanPercentError{ 0.10 };
140  double m_STDPercentError{ 1.5 };
141 
142  bool
143  TestHomogeneity(IndexList & Plist) override;
144 };
145 } // namespace itk
146 
147 #ifndef ITK_MANUAL_INSTANTIATION
148 # include "itkVoronoiSegmentationImageFilter.hxx"
149 #endif
150 
151 #endif
itkVoronoiSegmentationImageFilterBase.h
itk::VoronoiSegmentationImageFilter
Definition: itkVoronoiSegmentationImageFilter.h:53
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::Concept::SameDimension
Definition: itkConceptChecking.h:697
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::VoronoiSegmentationImageFilterBase
Base class for VoronoiSegmentationImageFilter.
Definition: itkVoronoiSegmentationImageFilterBase.h:59
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:65
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:139
itk::Concept::Convertible
Definition: itkConceptChecking.h:217
itk::VoronoiSegmentationImageFilterBase::BinaryObjectImage
TBinaryPriorImage BinaryObjectImage
Definition: itkVoronoiSegmentationImageFilterBase.h:105