Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkImplicitManifoldNormalVectorFilter.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkImplicitManifoldNormalVectorFilter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:28:50 $ 00007 Version: $Revision: 1.3 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 #ifndef __itkImplicitManifoldNormalVectorFilter_h_ 00018 #define __itkImplicitManifoldNormalVectorFilter_h_ 00019 00020 #include "itkConstNeighborhoodIterator.h" 00021 #include "itkNormalVectorFunctionBase.h" 00022 #include "itkFiniteDifferenceSparseImageFilter.h" 00023 #include "itkVector.h" 00024 00025 namespace itk { 00026 00070 template <class TInputImage, class TSparseOutputImage> 00071 class ImplicitManifoldNormalVectorFilter 00072 : public FiniteDifferenceSparseImageFilter <TInputImage, TSparseOutputImage> 00073 { 00074 public: 00076 typedef ImplicitManifoldNormalVectorFilter Self; 00077 typedef FiniteDifferenceSparseImageFilter <TInputImage, 00078 TSparseOutputImage> Superclass; 00079 typedef SmartPointer<Self> Pointer; 00080 typedef SmartPointer<const Self> ConstPointer; 00081 00083 itkTypeMacro(ImplicitManifoldNormalVectorFilter, 00084 FiniteDifferenceSparseImageFilter); 00085 00087 itkNewMacro(Self); 00088 00090 itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension); 00091 00093 typedef typename Superclass::InputImageType InputImageType; 00094 typedef typename Superclass::IndexType IndexType; 00095 typedef typename Superclass::NodeDataType NormalVectorType; 00096 typedef typename Superclass::NodeValueType NodeValueType; 00097 typedef typename Superclass::FiniteDifferenceFunctionType 00098 FiniteDifferenceFunctionType; 00099 typedef typename Superclass::SparseOutputImageType SparseOutputImageType; 00100 typedef typename Superclass::OutputNodeType NormalBandNodeType; 00101 typedef typename Superclass::NodeListType NodeListType; 00102 00104 typedef ConstNeighborhoodIterator <InputImageType> InputImageIteratorType; 00105 00108 typedef NormalVectorFunctionBase <SparseOutputImageType> NormalFunctionType; 00109 00111 typedef typename FiniteDifferenceFunctionType::RadiusType RadiusType; 00112 00114 void SetNormalFunction( NormalFunctionType *nf ); 00115 00116 itkSetMacro(MaxIteration, unsigned int); 00117 itkGetMacro(MaxIteration, unsigned int); 00118 itkSetMacro(IsoLevelLow, NodeValueType); 00119 itkGetMacro(IsoLevelLow, NodeValueType); 00120 itkSetMacro(IsoLevelHigh, NodeValueType); 00121 itkGetMacro(IsoLevelHigh, NodeValueType); 00122 itkSetMacro(MinVectorNorm, NodeValueType); 00123 itkGetMacro(MinVectorNorm, NodeValueType); 00124 itkSetMacro(UnsharpMaskingFlag, bool); 00125 itkGetMacro(UnsharpMaskingFlag, bool); 00126 itkSetMacro(UnsharpMaskingWeight, NodeValueType); 00127 itkGetMacro(UnsharpMaskingWeight, NodeValueType); 00128 00129 protected: 00130 ImplicitManifoldNormalVectorFilter(); 00131 ~ImplicitManifoldNormalVectorFilter() {}; 00132 void PrintSelf(std::ostream& os, Indent indent) const; 00133 00135 virtual void Initialize(); 00136 00138 void SetNormalBand(); 00139 00141 void InitializeNormalBandNode( NormalBandNodeType *node, 00142 const InputImageIteratorType &it ); 00143 00146 virtual void CopyInputToOutput() {}; 00147 00148 private: 00149 ImplicitManifoldNormalVectorFilter(const Self&); //purposely not implemented 00150 void operator=(const Self&); //purposely not implemented 00151 00153 NormalFunctionType *m_NormalFunction; 00154 00156 unsigned int m_MaxIteration; 00157 00160 NodeValueType m_IsoLevelLow, m_IsoLevelHigh; 00161 00163 NodeValueType m_MinVectorNorm; 00164 00166 bool m_UnsharpMaskingFlag; 00167 00170 NodeValueType m_UnsharpMaskingWeight; 00171 00173 unsigned long m_Indicator [itkGetStaticConstMacro(ImageDimension)]; 00174 unsigned int m_NumVertex; 00175 NodeValueType m_DimConst, m_DimConst2; 00176 RadiusType m_ManifoldRadius; 00177 00178 protected: 00180 virtual NormalVectorType DataConstraint( const NormalVectorType &data ) const 00181 { 00182 return (data / (m_MinVectorNorm + data.GetNorm())); 00183 } 00184 00188 virtual void PostProcessOutput(); 00189 00190 public: 00193 virtual bool Halt() 00194 { 00195 if (this->GetElapsedIterations()==m_MaxIteration) return true; 00196 else return false; 00197 } 00198 }; 00199 00200 }// end namespace itk 00201 00202 #ifndef ITK_MANUAL_INSTANTIATION 00203 #include "itkImplicitManifoldNormalVectorFilter.txx" 00204 #endif 00205 00206 #endif

Generated at Sun Apr 1 02:35:58 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000