ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
00001 /*========================================================================= 00002 * 00003 * Copyright Insight Software Consortium 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0.txt 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 * 00017 *=========================================================================*/ 00018 #ifndef __itkUnsharpMaskLevelSetImageFilter_h 00019 #define __itkUnsharpMaskLevelSetImageFilter_h 00020 00021 #include "itkSparseFieldFourthOrderLevelSetImageFilter.h" 00022 00023 namespace itk 00024 { 00066 template< class TInputImage, class TOutputImage > 00067 class ITK_EXPORT UnsharpMaskLevelSetImageFilter: 00068 public SparseFieldFourthOrderLevelSetImageFilter< TInputImage, TOutputImage > 00069 { 00070 public: 00071 00073 typedef UnsharpMaskLevelSetImageFilter Self; 00074 typedef SparseFieldFourthOrderLevelSetImageFilter< TInputImage, 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 itkGetConstMacro(MaxFilterIteration, unsigned int); 00096 itkSetMacro(MaxFilterIteration, unsigned int); 00097 protected: 00098 UnsharpMaskLevelSetImageFilter(); 00099 ~UnsharpMaskLevelSetImageFilter() {} 00100 virtual void PrintSelf(std::ostream & os, Indent indent) const; 00101 00103 typename FunctionType::Pointer m_Function; 00104 00106 unsigned int m_MaxFilterIteration; 00107 00109 virtual bool Halt() 00110 { 00111 if ( this->GetElapsedIterations() == m_MaxFilterIteration ) 00112 { 00113 return true; 00114 } 00115 else 00116 { 00117 return false; 00118 } 00119 } 00121 00122 private: 00123 UnsharpMaskLevelSetImageFilter(const Self &); 00124 //purposely not implemented 00125 void operator=(const Self &); //purposely not implemented 00126 }; 00127 } // end namespace itk 00128 00129 #ifndef ITK_MANUAL_INSTANTIATION 00130 #include "itkUnsharpMaskLevelSetImageFilter.hxx" 00131 #endif 00132 00133 #endif 00134