ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkVoronoiPartitioningImageFilter.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 itkVoronoiPartitioningImageFilter_h
19 #define itkVoronoiPartitioningImageFilter_h
20 
22 
23 namespace itk
24 {
32 template< typename TInputImage, typename TOutputImage >
33 class ITK_TEMPLATE_EXPORT VoronoiPartitioningImageFilter:
34  public VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage >
35 {
36 public:
42 
44  itkNewMacro(Self);
45 
47  itkTypeMacro(VoronoiPartitioningImageFilter,
49 
51  typedef typename Superclass::BinaryObjectImage BinaryObjectImage;
52  typedef typename Superclass::IndexList IndexList;
53  typedef typename Superclass::IndexType IndexType;
54  typedef typename Superclass::RegionType RegionType;
55  typedef typename Superclass::InputImageType InputImageType;
56  typedef typename Superclass::OutputImageType OutputImageType;
57  typedef typename Superclass::OutputPixelType OutputPixelType;
58 
59  typedef typename Superclass::PointType PointType;
60  typedef typename Superclass::PointTypeDeque PointTypeDeque;
61  typedef typename Superclass::PointIdIterator PointIdIterator;
62  typedef typename Superclass::CellAutoPointer CellAutoPointer;
63  typedef typename Superclass::EdgeIterator EdgeIterator;
64  typedef typename Superclass::NeighborIdIterator NeighborIdIterator;
65 
67  virtual void MakeSegmentBoundary(void) ITK_OVERRIDE;
68 
69  virtual void MakeSegmentObject(void) ITK_OVERRIDE;
70 
75  itkSetMacro(SigmaThreshold, double);
76  itkGetConstMacro(SigmaThreshold, double);
78 
80  itkStaticConstMacro(InputImageDimension, unsigned int,
81  TInputImage::ImageDimension);
82  itkStaticConstMacro(OutputImageDimension, unsigned int,
83  TOutputImage::ImageDimension);
85 
86 #ifdef ITK_USE_CONCEPT_CHECKING
87  // Begin concept checking
88  itkConceptMacro( SameDimensionCheck,
90  itkConceptMacro( IntConvertibleToOutputCheck,
92  // End concept checking
93 #endif
94 
95 protected:
97  ~VoronoiPartitioningImageFilter() ITK_OVERRIDE;
98  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
99 
100  // Classify all the voronoi cells as interior , exterior or boundary.
101  virtual void ClassifyDiagram(void) ITK_OVERRIDE;
102 
103  // Generate the seeds to be added by dividing the boundary cells.
104  virtual void GenerateAddingSeeds(void) ITK_OVERRIDE;
105 
106  // Are the pixels specified in the index list homogeneous?
107  virtual bool TestHomogeneity(IndexList & Plist) ITK_OVERRIDE;
108 
109  // Threshold for homogeneity criterion
110  double m_SigmaThreshold;
111 
112 private:
113  ITK_DISALLOW_COPY_AND_ASSIGN(VoronoiPartitioningImageFilter);
114 };
115 } //end namespace
116 
117 #ifndef ITK_MANUAL_INSTANTIATION
118 #include "itkVoronoiPartitioningImageFilter.hxx"
119 #endif
120 
121 #endif
Base class for VoronoiSegmentationImageFilter.
Base class for all process objects that output image data.
VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage > Superclass
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)