]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Image/MinimumSpanningTree.h
...
[FrontAlgorithms.git] / lib / fpa / Image / MinimumSpanningTree.h
index 371664c3b10b9e7e0eca1f9b89b5f917086e70ef..22f7904f5b28549cbf5c619076ee06ffdfe69c50 100644 (file)
@@ -1,8 +1,14 @@
+// =========================================================================
+// @author Leonardo Florez Valencia
+// @email florez-l@javeriana.edu.co
+// =========================================================================
+
 #ifndef __fpa__Image__MinimumSpanningTree__h__
 #define __fpa__Image__MinimumSpanningTree__h__
 
 #include <fpa/Base/MinimumSpanningTree.h>
 #include <itkImage.h>
+#include <fpa/Image/PolyLineParametricPath.h>
 
 namespace fpa
 {
@@ -15,37 +21,46 @@ namespace fpa
       : public fpa::Base::MinimumSpanningTree< itk::Index< _VDim >, itk::Image< itk::Offset< _VDim >, _VDim > >
     {
     public:
-      typedef itk::Index< _VDim >                               TVertex;
-      typedef itk::Offset< _VDim >                              TOffset;
-      typedef itk::Image< TOffset, _VDim >                      TImage;
-      typedef fpa::Base::MinimumSpanningTree< TVertex, TImage > Superclass;
-      typedef MinimumSpanningTree                               Self;
-      typedef itk::SmartPointer< Self >                         Pointer;
-      typedef itk::SmartPointer< const Self >                   ConstPointer;
-
-      typedef typename Superclass::TVertices TVertices;
-      typedef typename TImage::PointType TPoint;
-      typedef std::deque< TPoint > TPoints;
+      typedef itk::Index< _VDim > TVertex;
+      typedef itk::Image< itk::Offset< _VDim >, _VDim > TBaseImage;
+
+      typedef MinimumSpanningTree             Self;
+      typedef itk::SmartPointer< Self >       Pointer;
+      typedef itk::SmartPointer< const Self > ConstPointer;
+      typedef fpa::Base::MinimumSpanningTree< TVertex, TBaseImage > Superclass;
+
+      typedef typename Superclass::TCollision     TCollision;
+      typedef typename Superclass::TCollisionsRow TCollisionsRow;
+      typedef typename Superclass::TCollisions    TCollisions;
+      typedef typename Superclass::TVertices      TVertices;
+
+      typedef fpa::Image::PolyLineParametricPath< _VDim > TPolyLineParametricPath;
 
     public:
       itkNewMacro( Self );
       itkTypeMacro(
-        fpa::Image::MinimumSpanningTree, fpa::Base::MinimumSpanningTree
+        fpa::Image::MinimumSpanningTree,
+        fpa::Base::MinimumSpanningTree
         );
 
     public:
-      virtual TVertex GetParent( const TVertex& v ) const fpa_OVERRIDE;
-      virtual void SetParent( const TVertex& v, const TVertex& p ) fpa_OVERRIDE;
+      virtual TVertex GetParent( const TVertex& v ) const override;
+      virtual void SetParent( const TVertex& v, const TVertex& p ) override;
 
-      TPoints GetEuclideanPath( const TVertex& a ) const;
-      TPoints GetEuclideanPath( const TVertex& a, const TVertex& b ) const;
+      void GetPolyLineParametricPath(
+        typename TPolyLineParametricPath::Pointer& path,
+        const TVertex& a
+        ) const;
+      void GetPolyLineParametricPath(
+        typename TPolyLineParametricPath::Pointer& path,
+        const TVertex& a, const TVertex& b
+        ) const;
 
     protected:
       MinimumSpanningTree( );
       virtual ~MinimumSpanningTree( );
 
     private:
-      // Purposely not defined
       MinimumSpanningTree( const Self& other );
       Self& operator=( const Self& other );
     };