]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Image/MinimumSpanningTree.h
...
[FrontAlgorithms.git] / lib / fpa / Image / MinimumSpanningTree.h
index 652547d62debf33c7ecb79d27d809f5f54efb4a6..7d3941d23bbe57d904389af0161cffb74002f20a 100644 (file)
@@ -1,8 +1,9 @@
-#ifndef __FPA__IMAGE__MINIMUMSPANNINGTREE__H__
-#define __FPA__IMAGE__MINIMUMSPANNINGTREE__H__
+#ifndef __fpa__Image__MinimumSpanningTree__h__
+#define __fpa__Image__MinimumSpanningTree__h__
 
-#include <itkImage.h>
 #include <fpa/Base/MinimumSpanningTree.h>
+#include <cpExtensions/DataStructures/PolyLineParametricPath.h>
+#include <itkImage.h>
 
 namespace fpa
 {
@@ -10,35 +11,43 @@ namespace fpa
   {
     /**
      */
-    template< class V, class N, class C, unsigned int D, unsigned long L >
+    template< unsigned int _VDim >
     class MinimumSpanningTree
-      : public fpa::Base::MinimumSpanningTree< V, C, itk::Image< N, D > >
+      : public fpa::Base::MinimumSpanningTree< itk::Index< _VDim >, cpExtensions::DataStructures::PolyLineParametricPath< _VDim >, itk::Image< itk::Offset< _VDim >, _VDim > >
     {
     public:
-      typedef fpa::Base::MinimumSpanningTree< V, C, itk::Image< N, D > > Superclass;
-      typedef MinimumSpanningTree             Self;
-      typedef itk::SmartPointer< Self >       Pointer;
-      typedef itk::SmartPointer< const Self > ConstPointer;
-
-      typedef V TVertex;
-      typedef C TCollisions;
-
-    protected:
-      typedef N _TNode;
+      typedef itk::Index< _VDim >                               TVertex;
+      typedef cpExtensions::DataStructures::PolyLineParametricPath< _VDim > TPath;
+      typedef itk::Offset< _VDim >                                     TOffset;
+      typedef itk::Image< TOffset, _VDim >                             TImage;
+      typedef fpa::Base::MinimumSpanningTree< TVertex, TPath, TImage > Superclass;
+      typedef MinimumSpanningTree                                      Self;
+      typedef itk::SmartPointer< Self >                                Pointer;
+      typedef itk::SmartPointer< const Self >                          ConstPointer;
 
     public:
       itkNewMacro( Self );
-      itkTypeMacro( MinimumSpanningTree, fpa_Base_MinimumSpanningTree );
+      itkTypeMacro(
+        fpa::Image::MinimumSpanningTree, fpa::Base::MinimumSpanningTree
+        );
+
+    public:
+      virtual TVertex GetParent( const TVertex& v ) const override;
+      virtual void SetParent( const TVertex& v, const TVertex& p ) override;
+
+      virtual void GetPath(
+        typename TPath::Pointer& path, const TVertex& a
+        ) const override;
+      virtual void GetPath(
+        typename TPath::Pointer& path, const TVertex& a, const TVertex& b
+        ) const override;
 
     protected:
       MinimumSpanningTree( );
       virtual ~MinimumSpanningTree( );
 
-      virtual long _FrontId( const V& v ) const;
-      virtual V _Parent( const V& v ) const;
-
     private:
-      // Purposely not implemented
+      // Purposely not defined
       MinimumSpanningTree( const Self& other );
       Self& operator=( const Self& other );
     };
@@ -47,8 +56,10 @@ namespace fpa
 
 } // ecapseman
 
-#include <fpa/Image/MinimumSpanningTree.hxx>
+#ifndef ITK_MANUAL_INSTANTIATION
+#  include <fpa/Image/MinimumSpanningTree.hxx>
+#endif // ITK_MANUAL_INSTANTIATION
 
-#endif // __FPA__IMAGE__MINIMUMSPANNINGTREE__H__
+#endif // __fpa__Image__MinimumSpanningTree__h__
 
 // eof - $RCSfile$