ITK  6.0.0
Insight Toolkit
itkVoronoiPartitioningImageFilter.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 itkVoronoiPartitioningImageFilter_h
19#define itkVoronoiPartitioningImageFilter_h
20
22
23namespace itk
24{
32template <typename TInputImage, typename TOutputImage>
33class ITK_TEMPLATE_EXPORT VoronoiPartitioningImageFilter
34 : public VoronoiSegmentationImageFilterBase<TInputImage, TOutputImage>
35{
36public:
37 ITK_DISALLOW_COPY_AND_MOVE(VoronoiPartitioningImageFilter);
38
44
46 itkNewMacro(Self);
47
49 itkOverrideGetNameOfClassMacro(VoronoiPartitioningImageFilter);
50
52 using typename Superclass::BinaryObjectImage;
53 using typename Superclass::IndexList;
54 using typename Superclass::IndexType;
55 using typename Superclass::RegionType;
56 using typename Superclass::InputImageType;
57 using typename Superclass::OutputImageType;
58 using typename Superclass::OutputPixelType;
59
60 using typename Superclass::PointType;
61 using typename Superclass::PointTypeDeque;
62 using typename Superclass::PointIdIterator;
63 using typename Superclass::CellAutoPointer;
64 using typename Superclass::EdgeIterator;
65 using typename Superclass::NeighborIdIterator;
66
68 void
70
71 void
73
78 itkSetMacro(SigmaThreshold, double);
79 itkGetConstMacro(SigmaThreshold, double);
83 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
84 static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
85
86#ifdef ITK_USE_CONCEPT_CHECKING
87 // Begin concept checking
89 itkConceptMacro(IntConvertibleToOutputCheck, (Concept::Convertible<int, OutputPixelType>));
90 // End concept checking
91#endif
92
93protected:
95 ~VoronoiPartitioningImageFilter() override = default;
96 void
97 PrintSelf(std::ostream & os, Indent indent) const override;
98
99 // Classify all the voronoi cells as interior , exterior or boundary.
100 void
101 ClassifyDiagram() override;
102
103 // Generate the seeds to be added by dividing the boundary cells.
104 void
106
107 // Are the pixels specified in the index list homogeneous?
108 bool
109 TestHomogeneity(IndexList & Plist) override;
110
111 // Threshold for homogeneity criterion
112 double m_SigmaThreshold{ 10 };
113};
114} // namespace itk
115
116#ifndef ITK_MANUAL_INSTANTIATION
117# include "itkVoronoiPartitioningImageFilter.hxx"
118#endif
119
120#endif
Base class for all process objects that output image data.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
bool TestHomogeneity(IndexList &Plist) override
~VoronoiPartitioningImageFilter() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
Base class for VoronoiSegmentationImageFilter.
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....