00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkUnsharpMaskLevelSetImageFilter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:28:40 $ 00007 Version: $Revision: 1.5 $ 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, 00074 TOutputImage> 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 itkGetMacro(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) return true; 00113 else return false; 00114 } 00116 00117 private: 00118 UnsharpMaskLevelSetImageFilter(const Self&); 00119 //purposely not implemented 00120 void operator=(const Self&); //purposely not implemented 00121 }; 00122 00123 } // end namespace itk 00124 00125 #ifndef ITK_MANUAL_INSTANTIATION 00126 #include "itkUnsharpMaskLevelSetImageFilter.txx" 00127 #endif 00128 00129 #endif 00130