ITK  4.3.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< class TInputImage, class TOutputImage, class TBinaryPriorImage = Image< unsigned char, 2 > >
54  public VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage, TBinaryPriorImage >
55 {
56 public:
59  typedef VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage,
60  TBinaryPriorImage > Superclass;
63 
65  itkNewMacro(Self);
66 
68  itkTypeMacro(VoronoiSegmentationImageFilter,
70 
72  typedef typename Superclass::BinaryObjectImage BinaryObjectImage;
73  typedef typename Superclass::IndexList IndexList;
74  typedef typename Superclass::IndexType IndexType;
75  typedef typename Superclass::RegionType RegionType;
76  typedef typename Superclass::InputImageType InputImageType;
77 
79  itkSetMacro(Mean, double);
80  itkGetConstMacro(Mean, double);
82 
85  itkSetMacro(STD, double);
86  itkGetConstMacro(STD, double);
88 
90  itkSetMacro(MeanTolerance, double);
91  itkGetConstMacro(MeanTolerance, double);
93 
95  itkSetMacro(STDTolerance, double);
96 
98  itkGetConstMacro(STDTolerance, double);
99 
101  void SetMeanPercentError(double x);
102 
103  itkGetConstMacro(MeanPercentError, double);
104 
106  itkGetConstMacro(STDPercentError, double);
107  void SetSTDPercentError(double x);
109 
112  void TakeAPrior(const BinaryObjectImage *aprior);
113 
115  itkStaticConstMacro(InputImageDimension, unsigned int,
116  TInputImage::ImageDimension);
117  itkStaticConstMacro(OutputImageDimension, unsigned int,
118  TOutputImage::ImageDimension);
120 
121 #ifdef ITK_USE_CONCEPT_CHECKING
122 
123  itkConceptMacro( SameDimensionCheck,
125  itkConceptMacro( IntConvertibleToOutputCheck,
127 
129 #endif
130 
131 protected:
134  virtual void PrintSelf(std::ostream & os, Indent indent) const;
135 
136 private:
137  double m_Mean;
138  double m_STD;
143 
144  virtual bool TestHomogeneity(IndexList & Plist);
145 
146 private:
147  VoronoiSegmentationImageFilter(const Self &); //purposely not implemented
148  void operator=(const Self &); //purposely not implemented
149 };
150 } //end namespace
151 
152 #ifndef ITK_MANUAL_INSTANTIATION
153 #include "itkVoronoiSegmentationImageFilter.hxx"
154 #endif
155 
156 #endif
157