X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FAlgorithms%2FGradientImageFunctionBase.h;fp=lib%2FcpExtensions%2FAlgorithms%2FGradientImageFunctionBase.h;h=0000000000000000000000000000000000000000;hb=2e142df11d6f312a2a2b5097b8da73571ed523e8;hp=73504954b9870664b98f460d9a048c3d56a5b6c1;hpb=61b3659afe961ed248f30e26f9ca8f28fcfafddc;p=cpPlugins.git diff --git a/lib/cpExtensions/Algorithms/GradientImageFunctionBase.h b/lib/cpExtensions/Algorithms/GradientImageFunctionBase.h deleted file mode 100644 index 7350495..0000000 --- a/lib/cpExtensions/Algorithms/GradientImageFunctionBase.h +++ /dev/null @@ -1,79 +0,0 @@ -#ifndef __CPEXTENSIONS__ALGORITHMS__GRADIENTIMAGEFUNCTIONBASE__H__ -#define __CPEXTENSIONS__ALGORITHMS__GRADIENTIMAGEFUNCTIONBASE__H__ - -#include -#include -#include - -namespace cpExtensions -{ - namespace Algorithms - { - /** - * Base class to compute values based on image gradients (vector). - */ - template< class _TGradient, class _TMask = itk::Image< unsigned char, _TGradient::ImageDimension > > - class GradientImageFunctionBase - : public itk::ImageFunction< _TGradient, typename _TGradient::PixelType::ValueType, typename _TGradient::PixelType::ValueType > - { - public: - // Types from input arguments - typedef _TGradient TGradient; - typedef _TMask TMask; - typedef typename _TGradient::PixelType TVector; - typedef typename TVector::ValueType TScalar; - itkStaticConstMacro( - Dimension, unsigned int, _TGradient::ImageDimension - ); - - // Standard itk types - typedef GradientImageFunctionBase Self; - typedef itk::ImageFunction< _TGradient, TScalar, TScalar > Superclass; - typedef itk::SmartPointer< Self > Pointer; - typedef itk::SmartPointer< const Self > ConstPointer; - - // Types from base itk::ImageFunction - typedef typename Superclass::InputType TInput; - typedef typename Superclass::OutputType TOutput; - typedef typename Superclass::PointType TPoint; - typedef typename Superclass::ContinuousIndexType TContIndex; - typedef typename Superclass::IndexType TIndex; - - public: - itkTypeMacro( GradientImageFunctionBase, itkImageFunction ); - - itkGetConstObjectMacro( Mask, TMask ); - itkSetConstObjectMacro( Mask, TMask ); - - public: - virtual void Prepare( ) const; - virtual TOutput Evaluate( const TPoint& p ) const cpExtensions_OVERRIDE; - virtual TOutput EvaluateAtIndex( const TIndex& i ) const cpExtensions_OVERRIDE; - virtual TOutput EvaluateAtContinuousIndex( const TContIndex& i ) const cpExtensions_OVERRIDE; - - protected: - GradientImageFunctionBase( ); - virtual ~GradientImageFunctionBase( ); - - virtual TOutput _Evaluate( const TIndex& i ) const = 0; - - private: - // Purposely not implemented. - GradientImageFunctionBase( const Self& ); - void operator=( const Self& ); - - protected: - typename _TMask::ConstPointer m_Mask; - }; - - } // ecapseman - -} // ecapseman - -#ifndef ITK_MANUAL_INSTANTIATION -# include -#endif // ITK_MANUAL_INSTANTIATION - -#endif // __CPEXTENSIONS__ALGORITHMS__GRADIENTIMAGEFUNCTIONBASE__H__ - -// eof - $RCSfile$