00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkUnsharpMaskLevelSetImageFilter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2009-04-23 03:53:37 $ 00007 Version: $Revision: 1.7 $ 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 __itkUnsharpMaskLevelSetImageFilter_h 00018 #define __itkUnsharpMaskLevelSetImageFilter_h 00019 00020 #include "itkLevelSetFunctionWithRefitTerm.h" 00021 #include "itkSparseFieldFourthOrderLevelSetImageFilter.h" 00022 00023 namespace itk { 00024 00065 template <class TInputImage, class TOutputImage> 00066 class ITK_EXPORT UnsharpMaskLevelSetImageFilter 00067 : public SparseFieldFourthOrderLevelSetImageFilter <TInputImage, TOutputImage> 00068 { 00069 public: 00070 00072 typedef UnsharpMaskLevelSetImageFilter Self; 00073 typedef SparseFieldFourthOrderLevelSetImageFilter <TInputImage,TOutputImage> 00074 Superclass; 00075 typedef SmartPointer<Self> Pointer; 00076 typedef SmartPointer<const Self> ConstPointer; 00077 00079 itkTypeMacro(UnsharpMaskLevelSetImageFilter, 00080 SparseFieldFourthOrderLevelSetImageFilter); 00081 00083 itkNewMacro( Self ); 00084 00086 typedef typename Superclass::SparseImageType SparseImageType; 00087 00090 typedef LevelSetFunctionWithRefitTerm <TOutputImage,SparseImageType> FunctionType; 00091 00093 typedef typename FunctionType::RadiusType RadiusType; 00094 00095 itkGetConstMacro(MaxFilterIteration,unsigned int); 00096 itkSetMacro(MaxFilterIteration,unsigned int); 00097 00098 protected: 00099 UnsharpMaskLevelSetImageFilter(); 00100 ~UnsharpMaskLevelSetImageFilter() {}; 00101 virtual void PrintSelf(std::ostream& os, Indent indent) const; 00102 00104 typename FunctionType::Pointer m_Function; 00105 00107 unsigned int m_MaxFilterIteration; 00108 00110 virtual bool Halt() 00111 { 00112 if (this->GetElapsedIterations() == m_MaxFilterIteration) 00113 { 00114 return true; 00115 } 00116 else 00117 { 00118 return false; 00119 } 00120 } 00122 00123 private: 00124 UnsharpMaskLevelSetImageFilter(const Self&); 00125 //purposely not implemented 00126 void operator=(const Self&); //purposely not implemented 00127 }; 00128 00129 } // end namespace itk 00130 00131 #ifndef ITK_MANUAL_INSTANTIATION 00132 #include "itkUnsharpMaskLevelSetImageFilter.txx" 00133 #endif 00134 00135 #endif 00136