ITK  4.13.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< typename TInputImage, typename TOutputImage, typename TBinaryPriorImage = Image< unsigned char, 2 > >
53 class ITK_TEMPLATE_EXPORT VoronoiSegmentationImageFilter:
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) ITK_OVERRIDE;
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  // Begin concept checking
123  itkConceptMacro( SameDimensionCheck,
125  itkConceptMacro( IntConvertibleToOutputCheck,
127  // End concept checking
128 #endif
129 
130 protected:
132  ~VoronoiSegmentationImageFilter() ITK_OVERRIDE;
133  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
134 
135 private:
136  double m_Mean;
137  double m_STD;
138  double m_MeanTolerance;
139  double m_STDTolerance;
140  double m_MeanPercentError;
141  double m_STDPercentError;
142 
143  virtual bool TestHomogeneity(IndexList & Plist) ITK_OVERRIDE;
144 
145 private:
146  ITK_DISALLOW_COPY_AND_ASSIGN(VoronoiSegmentationImageFilter);
147 };
148 } //end namespace
149 
150 #ifndef ITK_MANUAL_INSTANTIATION
151 #include "itkVoronoiSegmentationImageFilter.hxx"
152 #endif
153 
154 #endif
Base class for VoronoiSegmentationImageFilter.
Base class for all process objects that output image data.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)
VoronoiSegmentationImageFilterBase< TInputImage, TOutputImage, TBinaryPriorImage > Superclass