]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/Algorithms/GulsunTekMedialness.h
yet another refactoring
[cpPlugins.git] / lib / cpExtensions / Algorithms / GulsunTekMedialness.h
diff --git a/lib/cpExtensions/Algorithms/GulsunTekMedialness.h b/lib/cpExtensions/Algorithms/GulsunTekMedialness.h
new file mode 100644 (file)
index 0000000..15add9e
--- /dev/null
@@ -0,0 +1,76 @@
+#ifndef __CPEXTENSIONS__ALGORITHMS__GULSUNTEKMEDIALNESS__H__
+#define __CPEXTENSIONS__ALGORITHMS__GULSUNTEKMEDIALNESS__H__
+
+#include <cpExtensions/Algorithms/GradientImageFunctionBase.h>
+
+namespace cpExtensions
+{
+  namespace Algorithms
+  {
+    /**
+     */
+    template< class _TGradient, class _TMask = itk::Image< unsigned char, _TGradient::ImageDimension > >
+    class GulsunTekMedialness
+      : public GradientImageFunctionBase< _TGradient, _TMask >
+    {
+    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
+
+#ifndef ITK_MANUAL_INSTANTIATION
+#  include <cpExtensions/Algorithms/GulsunTekMedialness.hxx>
+#endif // ITK_MANUAL_INSTANTIATION
+
+#endif // __CPEXTENSIONS__ALGORITHMS__GULSUNTEKMEDIALNESS__H__
+
+// eof - $RCSfile$