00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkAntiAliasBinaryImageFilter_h_
00018 #define __itkAntiAliasBinaryImageFilter_h_
00019 #include "itkSparseFieldLevelSetImageFilter.h"
00020 #include "itkCurvatureFlowFunction.h"
00021
00022 namespace itk {
00023
00099 template <class TInputImage, class TOutputImage>
00100 class ITK_EXPORT AntiAliasBinaryImageFilter
00101 : public SparseFieldLevelSetImageFilter<TInputImage, TOutputImage>
00102 {
00103 public:
00105 typedef AntiAliasBinaryImageFilter Self;
00106 typedef SparseFieldLevelSetImageFilter<TInputImage, TOutputImage> Superclass;
00107 typedef SmartPointer<Self> Pointer;
00108 typedef SmartPointer<const Self> ConstPointer;
00109
00111 typedef typename Superclass::ValueType ValueType;
00112 typedef typename Superclass::IndexType IndexType;
00113 typedef typename Superclass::TimeStepType TimeStepType;
00114 typedef typename Superclass::OutputImageType OutputImageType;
00115 typedef typename Superclass::InputImageType InputImageType;
00116
00117
00119 typedef CurvatureFlowFunction<OutputImageType> CurvatureFunctionType;
00120
00122 typedef typename TInputImage::ValueType BinaryValueType;
00123
00125 itkNewMacro(Self);
00126
00128 itkTypeMacro(AntiAliasBinaryImageFilter, SparseFieldLevelSetImageFilter);
00129
00131 itkGetMacro(UpperBinaryValue, BinaryValueType);
00132 itkGetMacro(LowerBinaryValue, BinaryValueType);
00133
00136 void SetMaximumIterations (unsigned int i)
00137 {
00138 itkWarningMacro("SetMaximumIterations is deprecated. Please use SetNumberOfIterations instead.");
00139 this->SetNumberOfIterations(i);
00140 }
00141 unsigned int GetMaximumIterations()
00142 {
00143 itkWarningMacro("GetMaximumIterations is deprecated. Please use GetNumberOfIterations instead.");
00144 return this->GetNumberOfIterations();
00145 }
00146 protected:
00147 AntiAliasBinaryImageFilter();
00148 ~AntiAliasBinaryImageFilter() {}
00149 virtual void PrintSelf(std::ostream& os, Indent indent) const;
00150
00153 inline virtual ValueType CalculateUpdateValue(const IndexType &idx,
00154 const TimeStepType &dt,
00155 const ValueType &value,
00156 const ValueType &change);
00157
00160 void GenerateData();
00161
00162 private:
00163 AntiAliasBinaryImageFilter(const Self&);
00164 void operator=(const Self&);
00165
00166 BinaryValueType m_UpperBinaryValue;
00167 BinaryValueType m_LowerBinaryValue;
00168 typename CurvatureFunctionType::Pointer m_CurvatureFunction;
00169 const TInputImage * m_InputImage;
00170
00171 };
00172
00173 }
00174
00175 #ifndef ITK_MANUAL_INSTANTIATION
00176 #include "itkAntiAliasBinaryImageFilter.txx"
00177 #endif
00178
00179 #endif