ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkVoronoiSegmentationImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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  * http://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_ASSIGN(VoronoiSegmentationImageFilter);
58 
61  using Superclass = VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage,
62  TBinaryPriorImage >;
65 
67  itkNewMacro(Self);
68 
70  itkTypeMacro(VoronoiSegmentationImageFilter,
72 
74  using BinaryObjectImage = typename Superclass::BinaryObjectImage;
75  using IndexList = typename Superclass::IndexList;
76  using IndexType = typename Superclass::IndexType;
78  using InputImageType = typename Superclass::InputImageType;
79 
81  itkSetMacro(Mean, double);
82  itkGetConstMacro(Mean, double);
84 
87  itkSetMacro(STD, double);
88  itkGetConstMacro(STD, double);
90 
92  itkSetMacro(MeanTolerance, double);
93  itkGetConstMacro(MeanTolerance, double);
95 
97  itkSetMacro(STDTolerance, double);
98 
100  itkGetConstMacro(STDTolerance, double);
101 
103  void SetMeanPercentError(double x);
104 
105  itkGetConstMacro(MeanPercentError, double);
106 
108  itkGetConstMacro(STDPercentError, double);
109  void SetSTDPercentError(double x);
111 
114  void TakeAPrior(const BinaryObjectImage *aprior) override;
115 
117  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
118  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
119 
120 #ifdef ITK_USE_CONCEPT_CHECKING
121  // Begin concept checking
122  itkConceptMacro( SameDimensionCheck,
124  itkConceptMacro( IntConvertibleToOutputCheck,
126  // End concept checking
127 #endif
128 
129 protected:
130  VoronoiSegmentationImageFilter() = default;
131  ~VoronoiSegmentationImageFilter() override = default;
132  void 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 TestHomogeneity(IndexList & Plist) override;
143 };
144 } //end namespace
145 
146 #ifndef ITK_MANUAL_INSTANTIATION
147 #include "itkVoronoiSegmentationImageFilter.hxx"
148 #endif
149 
150 #endif
typename Superclass::BinaryObjectImage BinaryObjectImage
Base class for VoronoiSegmentationImageFilter.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)