itkAntiAliasBinaryImageFilter.h
Go to the documentation of this file.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:
00104
00106 typedef AntiAliasBinaryImageFilter Self;
00107 typedef SparseFieldLevelSetImageFilter<TInputImage, TOutputImage> Superclass;
00108 typedef SmartPointer<Self> Pointer;
00109 typedef SmartPointer<const Self> ConstPointer;
00110
00112 typedef typename Superclass::ValueType ValueType;
00113 typedef typename Superclass::IndexType IndexType;
00114 typedef typename Superclass::TimeStepType TimeStepType;
00115 typedef typename Superclass::OutputImageType OutputImageType;
00116 typedef typename Superclass::InputImageType InputImageType;
00117
00118
00120 typedef CurvatureFlowFunction<OutputImageType> CurvatureFunctionType;
00121
00123 typedef typename TInputImage::ValueType BinaryValueType;
00124
00126 itkNewMacro(Self);
00127
00129 itkTypeMacro(AntiAliasBinaryImageFilter, SparseFieldLevelSetImageFilter);
00130
00132 itkGetConstMacro(UpperBinaryValue, BinaryValueType);
00133 itkGetConstMacro(LowerBinaryValue, BinaryValueType);
00135
00138 void SetMaximumIterations (unsigned int i)
00139 {
00140 itkWarningMacro("SetMaximumIterations is deprecated. Please use SetNumberOfIterations instead.");
00141 this->SetNumberOfIterations(i);
00142 }
00143 unsigned int GetMaximumIterations()
00144 {
00145 itkWarningMacro("GetMaximumIterations is deprecated. Please use GetNumberOfIterations instead.");
00146 return this->GetNumberOfIterations();
00147 }
00149
00150 #ifdef ITK_USE_CONCEPT_CHECKING
00151
00152 itkConceptMacro(DoubleConvertibleToOutputCheck,
00153 (Concept::Convertible<double, typename TOutputImage::PixelType>));
00154 itkConceptMacro(InputOStreamWritableCheck,
00155 (Concept::OStreamWritable<typename TInputImage::PixelType>));
00156
00158 #endif
00159
00160 protected:
00161 AntiAliasBinaryImageFilter();
00162 ~AntiAliasBinaryImageFilter() {}
00163 virtual void PrintSelf(std::ostream& os, Indent indent) const;
00164
00167 inline virtual ValueType CalculateUpdateValue(const IndexType &idx,
00168 const TimeStepType &dt,
00169 const ValueType &value,
00170 const ValueType &change);
00171
00174 void GenerateData();
00175
00176 private:
00177 AntiAliasBinaryImageFilter(const Self&);
00178 void operator=(const Self&);
00179
00180 BinaryValueType m_UpperBinaryValue;
00181 BinaryValueType m_LowerBinaryValue;
00182 typename CurvatureFunctionType::Pointer m_CurvatureFunction;
00183 const TInputImage * m_InputImage;
00184
00185 };
00186
00187 }
00188
00189 #ifndef ITK_MANUAL_INSTANTIATION
00190 #include "itkAntiAliasBinaryImageFilter.txx"
00191 #endif
00192
00193 #endif
00194