ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkVectorConfidenceConnectedImageFilter.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 __itkVectorConfidenceConnectedImageFilter_h
19 #define __itkVectorConfidenceConnectedImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
23 
24 namespace itk
25 {
58 template< class TInputImage, class TOutputImage >
60  public ImageToImageFilter< TInputImage, TOutputImage >
61 {
62 public:
68 
70  itkNewMacro(Self);
71 
75 
76  typedef TInputImage InputImageType;
77  typedef typename InputImageType::Pointer InputImagePointer;
78  typedef typename InputImageType::RegionType InputImageRegionType;
79  typedef typename InputImageType::PixelType InputImagePixelType;
80  typedef typename InputImageType::IndexType IndexType;
81  typedef typename InputImageType::SizeType SizeType;
82 
83  typedef TOutputImage OutputImageType;
84  typedef typename OutputImageType::Pointer OutputImagePointer;
85  typedef typename OutputImageType::RegionType OutputImageRegionType;
86  typedef typename OutputImageType::PixelType OutputImagePixelType;
87 
88  typedef std::vector< IndexType > SeedsContainerType;
89 
93 
96 
98 
99  void PrintSelf(std::ostream & os, Indent indent) const;
100 
102  void SetSeed(const IndexType & seed);
103 
105  void AddSeed(const IndexType & seed);
106 
108  void ClearSeeds();
109 
112  itkSetMacro(Multiplier, double);
113  itkGetConstMacro(Multiplier, double);
115 
117  itkSetMacro(NumberOfIterations, unsigned int);
118  itkGetConstMacro(NumberOfIterations, unsigned int);
120 
122  itkSetMacro(ReplaceValue, OutputImagePixelType);
123  itkGetConstMacro(ReplaceValue, OutputImagePixelType);
125 
128  itkSetMacro(InitialNeighborhoodRadius, unsigned int);
129  itkGetConstReferenceMacro(InitialNeighborhoodRadius, unsigned int);
131 
133  const MeanVectorType & GetMean() const;
134 
136  const CovarianceMatrixType & GetCovariance() const;
137 
139  virtual const SeedsContainerType &GetSeeds() const;
140 
141 
142 #ifdef ITK_USE_CONCEPT_CHECKING
143 
144  itkConceptMacro( OutputEqualityComparableCheck,
146  itkConceptMacro( InputHasNumericTraitsCheck,
148  itkConceptMacro( OutputOStreamWritableCheck,
150 
152 #endif
153 
154 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  VectorConfidenceConnectedImageFilter(const Self &); //purposely not
167  // implemented
168  void operator=(const Self &); //purposely not
169 
170  // implemented
171 
173  double m_Multiplier;
174  unsigned int m_NumberOfIterations;
177 
179 };
180 } // end namespace itk
181 
182 #ifndef ITK_MANUAL_INSTANTIATION
183 #include "itkVectorConfidenceConnectedImageFilter.hxx"
184 #endif
185 
186 #endif
187