ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkImplicitManifoldNormalVectorFilter.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 __itkImplicitManifoldNormalVectorFilter_h
19 #define __itkImplicitManifoldNormalVectorFilter_h
20 
24 #include "itkVector.h"
25 
26 namespace itk
27 {
72 template< typename TInputImage, typename TSparseOutputImage >
74  public FiniteDifferenceSparseImageFilter< TInputImage, TSparseOutputImage >
75 {
76 public:
77 
81  TInputImage,
82  TSparseOutputImage > Superclass;
83 
86 
90 
92  itkNewMacro(Self);
93 
95  itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension);
96 
99  typedef typename Superclass::IndexType IndexType;
104 
108 
111 
115 
117  typedef typename FiniteDifferenceFunctionType::RadiusType RadiusType;
118 
121 
122  itkSetMacro(MaxIteration, unsigned int);
123  itkGetConstMacro(MaxIteration, unsigned int);
124  itkSetMacro(IsoLevelLow, NodeValueType);
125  itkGetConstMacro(IsoLevelLow, NodeValueType);
126  itkSetMacro(IsoLevelHigh, NodeValueType);
127  itkGetConstMacro(IsoLevelHigh, NodeValueType);
128  itkSetMacro(MinVectorNorm, NodeValueType);
129  itkGetConstMacro(MinVectorNorm, NodeValueType);
130  itkSetMacro(UnsharpMaskingFlag, bool);
131  itkGetConstMacro(UnsharpMaskingFlag, bool);
132  itkSetMacro(UnsharpMaskingWeight, NodeValueType);
133  itkGetConstMacro(UnsharpMaskingWeight, NodeValueType);
134 
135 protected:
138  void PrintSelf(std::ostream & os, Indent indent) const;
139 
141  virtual void Initialize();
142 
144  void SetNormalBand();
145 
149  const InputImageIteratorType & it);
150 
153  virtual void CopyInputToOutput() {}
154 
157  virtual bool Halt()
158  {
159  if ( this->GetElapsedIterations() == m_MaxIteration )
160  {
161  return true;
162  }
163  else
164  {
165  return false;
166  }
167  }
169 
170 protected:
173  {
174  return ( data / ( m_MinVectorNorm + data.GetNorm() ) );
175  }
176 
180  virtual void PostProcessOutput();
181 
182 private:
183  ImplicitManifoldNormalVectorFilter(const Self &); //purposely not implemented
184  void operator=(const Self &); //purposely not implemented
185 
188 
190  unsigned int m_MaxIteration;
191 
195 
198 
201 
205 
207  unsigned long m_Indicator[itkGetStaticConstMacro(ImageDimension)];
208  unsigned int m_NumVertex;
212 };
213 } // end namespace itk
214 
215 #ifndef ITK_MANUAL_INSTANTIATION
216 #include "itkImplicitManifoldNormalVectorFilter.hxx"
217 #endif
218 
219 #endif
Light weight base class for most itk classes.
void InitializeNormalBandNode(NormalBandNodeType *node, const InputImageIteratorType &it)
ConstNeighborhoodIterator< InputImageType > InputImageIteratorType
virtual NormalVectorType DataConstraint(const NormalVectorType &data) const
unsigned long m_Indicator[itkGetStaticConstMacro(ImageDimension)]
This class defines the common functionality for Sparse Image neighborhoods of unit vectors...
This class implements the filter for computing the normal vectors from a scalar implicit function (i...
FiniteDifferenceSparseImageFilter< TInputImage, TSparseOutputImage > Superclass
NormalVectorFunctionBase< SparseOutputImageType > NormalFunctionType
void PrintSelf(std::ostream &os, Indent indent) const
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
Superclass::FiniteDifferenceFunctionType FiniteDifferenceFunctionType
FiniteDifferenceFunctionType::RadiusType RadiusType
void SetNormalFunction(NormalFunctionType *nf)
This class implements a multi-threaded base class for Image to SparseImage finite difference processe...
Control indentation during Print() invocation.
Definition: itkIndent.h:49