ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
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);
81
83 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
84 static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
85
87 itkConceptMacro(IntConvertibleToOutputCheck, (Concept::Convertible<int, OutputPixelType>));
88
89protected:
91 ~VoronoiPartitioningImageFilter() override = default;
92 void
93 PrintSelf(std::ostream & os, Indent indent) const override;
94
95 // Classify all the voronoi cells as interior , exterior or boundary.
96 void
97 ClassifyDiagram() override;
98
99 // Generate the seeds to be added by dividing the boundary cells.
100 void
102
103 // Are the pixels specified in the index list homogeneous?
104 bool
105 TestHomogeneity(IndexList & Plist) override;
106
107 // Threshold for homogeneity criterion
108 double m_SigmaThreshold{ 10 };
109};
110} // namespace itk
111
112#ifndef ITK_MANUAL_INSTANTIATION
113# include "itkVoronoiPartitioningImageFilter.hxx"
114#endif
115
116#endif
Control indentation during Print() invocation.
Definition itkIndent.h:50
Implements transparent reference counting.
bool TestHomogeneity(IndexList &Plist) override
~VoronoiPartitioningImageFilter() override=default
VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage > Superclass
void PrintSelf(std::ostream &os, Indent indent) const override
typename VoronoiDiagram::VoronoiEdgeIterator EdgeIterator
typename VoronoiDiagram::CellAutoPointer CellAutoPointer
typename VoronoiDiagram::NeighborIdIterator NeighborIdIterator
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....