ITK  4.2.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< class TInputImage, class TOutputImage >
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);
68 
69  virtual void MakeSegmentObject(void);
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 
88  itkConceptMacro( SameDimensionCheck,
90  itkConceptMacro( IntConvertibleToOutputCheck,
92 
94 #endif
95 protected:
98  void PrintSelf(std::ostream & os, Indent indent) const;
100 
101  // Classify all the voronoi cells as interior , exterior or boundary.
102  virtual void ClassifyDiagram(void);
103 
104  // Generate the seeds to be added by dividing the boundary cells.
105  virtual void GenerateAddingSeeds(void);
106 
107  // Are the pixels specified in the index list homogeneous?
108  virtual bool TestHomogeneity(IndexList & Plist);
109 
110  // Threshold for homogeneity criterion
112 private:
113  VoronoiPartitioningImageFilter(const Self &); //purposely not implemented
114  void operator=(const Self &); //purposely not implemented
115 };
116 } //end namespace
117 
118 #ifndef ITK_MANUAL_INSTANTIATION
119 #include "itkVoronoiPartitioningImageFilter.hxx"
120 #endif
121 
122 #endif
123