ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkConfidenceConnectedImageFilter.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 __itkConfidenceConnectedImageFilter_h
19 #define __itkConfidenceConnectedImageFilter_h
20 
21 #include "itkImage.h"
22 #include "itkImageToImageFilter.h"
23 
24 namespace itk
25 {
62 template< class TInputImage, class TOutputImage >
64  public ImageToImageFilter< TInputImage, TOutputImage >
65 {
66 public:
72 
74  itkNewMacro(Self);
75 
77  itkTypeMacro(ConfidenceConnectedImageFilter,
79 
80  typedef TInputImage InputImageType;
81  typedef typename InputImageType::Pointer InputImagePointer;
82  typedef typename InputImageType::RegionType InputImageRegionType;
83  typedef typename InputImageType::PixelType InputImagePixelType;
84  typedef typename InputImageType::IndexType IndexType;
85  typedef typename InputImageType::SizeType SizeType;
86 
87  typedef TOutputImage OutputImageType;
88  typedef typename OutputImageType::Pointer OutputImagePointer;
89  typedef typename OutputImageType::RegionType OutputImageRegionType;
90  typedef typename OutputImageType::PixelType OutputImagePixelType;
91 
92  typedef std::vector< IndexType > SeedsContainerType;
93 
94  typedef typename NumericTraits<
96 
97  void PrintSelf(std::ostream & os, Indent indent) const;
98 
100  void SetSeed(const IndexType & seed);
101 
103  void ClearSeeds();
104 
106  void AddSeed(const IndexType & seed);
107 
110  itkSetMacro(Multiplier, double);
111  itkGetConstMacro(Multiplier, double);
113 
115  itkSetMacro(NumberOfIterations, unsigned int);
116  itkGetConstMacro(NumberOfIterations, unsigned int);
118 
120  itkSetMacro(ReplaceValue, OutputImagePixelType);
121  itkGetConstMacro(ReplaceValue, OutputImagePixelType);
123 
126  itkSetMacro(InitialNeighborhoodRadius, unsigned int);
127  itkGetConstReferenceMacro(InitialNeighborhoodRadius, unsigned int);
129 
133  itkGetConstReferenceMacro(Mean, InputRealType);
134 
138  itkGetConstReferenceMacro(Variance, InputRealType);
139 
141  virtual const SeedsContainerType &GetSeeds() const;
142 
143 #ifdef ITK_USE_CONCEPT_CHECKING
144 
145  itkConceptMacro( InputHasNumericTraitsCheck,
147  itkConceptMacro( OutputHasNumericTraitsCheck,
149 
151 #endif
152 
153 protected:
156 
157  // Override since the filter needs all the data for the algorithm
158  void GenerateInputRequestedRegion();
159 
160  // Override since the filter produces the entire dataset
161  void EnlargeOutputRequestedRegion(DataObject *output);
162 
163  void GenerateData();
164 
165 private:
166  ConfidenceConnectedImageFilter(const Self &); //purposely not implemented
167  void operator=(const Self &); //purposely not implemented
168 
170  double m_Multiplier;
171  unsigned int m_NumberOfIterations;
176 };
177 } // end namespace itk
178 
179 #ifndef ITK_MANUAL_INSTANTIATION
180 #include "itkConfidenceConnectedImageFilter.hxx"
181 #endif
182 
183 #endif
184