X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=lib%2FcpExtensions%2FAlgorithms%2FGulsunTekMedialness.h;h=15add9eacd806149d0b399f32cc60a1d8c5e2b7a;hb=a422d88602e9b49085ccfab0ef0f9f2d93fb6a1e;hp=7ecdce9a6aa1455196c9c74fcdeea230f53d762a;hpb=2361f4f97631e09d88d8a5510a369817dcaa19db;p=cpPlugins.git diff --git a/lib/cpExtensions/Algorithms/GulsunTekMedialness.h b/lib/cpExtensions/Algorithms/GulsunTekMedialness.h index 7ecdce9..15add9e 100644 --- a/lib/cpExtensions/Algorithms/GulsunTekMedialness.h +++ b/lib/cpExtensions/Algorithms/GulsunTekMedialness.h @@ -1,82 +1,75 @@ -// ------------------------------------------------------------------------- -// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) -// ------------------------------------------------------------------------- - #ifndef __CPEXTENSIONS__ALGORITHMS__GULSUNTEKMEDIALNESS__H__ #define __CPEXTENSIONS__ALGORITHMS__GULSUNTEKMEDIALNESS__H__ -#include -#include +#include namespace cpExtensions +{ + namespace Algorithms { - namespace Algorithms + /** + */ + template< class _TGradient, class _TMask = itk::Image< unsigned char, _TGradient::ImageDimension > > + class GulsunTekMedialness + : public GradientImageFunctionBase< _TGradient, _TMask > { - /** - */ - template< class G > - class GulsunTekMedialness - : public GradientFunctionBase< G > - { - public: - // Standard itk types - typedef GulsunTekMedialness Self; - typedef GradientFunctionBase< G > Superclass; - typedef itk::SmartPointer< Self > Pointer; - typedef itk::SmartPointer< const Self > ConstPointer; - - // Types from superclass - typedef typename Superclass::TGradient TGradient; - typedef typename Superclass::TVector TVector; - typedef typename Superclass::TScalar TScalar; - typedef typename Superclass::TInput TInput; - typedef typename Superclass::TOutput TOutput; - typedef typename Superclass::TPoint TPoint; - typedef typename Superclass::TContIndex TContIndex; - typedef typename Superclass::TIndex TIndex; - typedef typename Superclass::TBuffer TBuffer; - - typedef typename TIndex::OffsetType TOffset; - typedef std::vector< double > TProfile; - typedef std::vector< TOffset > TOffsets; - - public: - itkNewMacro( Self ); - itkTypeMacro( GulsunTekMedialness, GradientFunctionBase ); - - itkGetConstMacro( MinRadius, double ); - itkGetConstMacro( MaxRadius, double ); - itkGetConstMacro( ProfileSampling, unsigned int ); - itkGetConstMacro( RadialSampling, unsigned int ); - - itkSetMacro( MinRadius, double ); - itkSetMacro( MaxRadius, double ); - itkSetMacro( ProfileSampling, unsigned int ); - itkSetMacro( RadialSampling, unsigned int ); - - protected: - GulsunTekMedialness( ); - virtual ~GulsunTekMedialness( ); - - virtual TOutput _Evaluate( const TIndex& i ) const; - - private: - // Purposely not implemented. - GulsunTekMedialness( const Self& ); - void operator=( const Self& ); - - protected: - double m_MinRadius; - double m_MaxRadius; - unsigned int m_ProfileSampling; - unsigned int m_RadialSampling; - }; - - } // ecapseman + public: + typedef GulsunTekMedialness Self; + typedef GradientImageFunctionBase< _TGradient, _TMask > Superclass; + typedef itk::SmartPointer< Self > Pointer; + typedef itk::SmartPointer< const Self > ConstPointer; + + itkStaticConstMacro( Dimension, unsigned int, Superclass::Dimension ); + + typedef typename Superclass::TOutput TOutput; + typedef typename Superclass::TScalar TScalar; + typedef typename Superclass::TIndex TIndex; + typedef typename Superclass::TVector TVector; + typedef typename Superclass::TPoint TPoint; + typedef typename TIndex::OffsetType TOffset; + + typedef std::vector< double > TProfile; + typedef std::vector< TOffset > TOffsets; + + public: + itkNewMacro( Self ); + itkTypeMacro( GulsunTekMedialness, GradientImageFunctionBase ); + + itkGetConstMacro( MinRadius, double ); + itkGetConstMacro( MaxRadius, double ); + itkGetConstMacro( ProfileSampling, unsigned int ); + itkGetConstMacro( RadialSampling, unsigned int ); + + itkSetMacro( MinRadius, double ); + itkSetMacro( MaxRadius, double ); + itkSetMacro( ProfileSampling, unsigned int ); + itkSetMacro( RadialSampling, unsigned int ); + + protected: + GulsunTekMedialness( ); + virtual ~GulsunTekMedialness( ); + + virtual TOutput _Evaluate( const TIndex& i ) const cpExtensions_OVERRIDE; + + private: + // Purposely not implemented. + GulsunTekMedialness( const Self& ); + void operator=( const Self& ); + + protected: + double m_MinRadius; + double m_MaxRadius; + unsigned int m_ProfileSampling; + unsigned int m_RadialSampling; + }; + + } // ecapseman } // ecapseman -#include +#ifndef ITK_MANUAL_INSTANTIATION +# include +#endif // ITK_MANUAL_INSTANTIATION #endif // __CPEXTENSIONS__ALGORITHMS__GULSUNTEKMEDIALNESS__H__