+// =========================================================================
+// @author Leonardo Florez Valencia
+// @email florez-l@javeriana.edu.co
+// =========================================================================
+
#ifndef __fpa__Base__MinimumSpanningTree__h__
#define __fpa__Base__MinimumSpanningTree__h__
-#include <fpa/Config.h>
#include <vector>
-#include <utility>
-#include <itkObject.h>
namespace fpa
{
{
/**
*/
- template< class _TVertex, class _TPath, class _TSuperclass >
+ template< class _TVertex, class _Superclass >
class MinimumSpanningTree
- : public _TSuperclass
+ : public _Superclass
{
public:
typedef MinimumSpanningTree Self;
- typedef _TSuperclass Superclass;
+ typedef _Superclass Superclass;
typedef itk::SmartPointer< Self > Pointer;
typedef itk::SmartPointer< const Self > ConstPointer;
typedef _TVertex TVertex;
- typedef _TPath TPath;
- typedef std::pair< _TVertex, bool > TCollision;
+ typedef std::pair< TVertex, bool > TCollision;
typedef std::vector< TCollision > TCollisionsRow;
typedef std::vector< TCollisionsRow > TCollisions;
+ typedef std::vector< TVertex > TVertices;
protected:
typedef std::vector< unsigned long > _TRow;
typedef std::vector< _TRow > _TMatrix;
public:
- itkTypeMacro( MinimumSpanningTree, _TSuperclass );
+ itkTypeMacro( fpa::Base::MinimumSpanningTree, _Superclass );
public:
const TCollisions& GetCollisions( ) const;
void SetCollisions( const TCollisions& collisions );
void ClearSeeds( );
- void AddSeed( const _TVertex& seed );
+ void AddSeed( const TVertex& seed );
- virtual _TVertex GetParent( const _TVertex& v ) const = 0;
- virtual void SetParent( const _TVertex& v, const _TVertex& p ) = 0;
+ virtual TVertex GetParent( const TVertex& v ) const = 0;
+ virtual void SetParent( const TVertex& v, const TVertex& p ) = 0;
- virtual void GetPath(
- typename _TPath::Pointer& path, const _TVertex& a
- ) const;
- virtual void GetPath(
- typename _TPath::Pointer& path, const _TVertex& a, const _TVertex& b
- ) const;
+ virtual TVertices GetPath( const TVertex& a ) const;
+ virtual TVertices GetPath( const TVertex& a, const TVertex& b ) const;
protected:
MinimumSpanningTree( );
virtual ~MinimumSpanningTree( );
private:
- // Purposely not defined
MinimumSpanningTree( const Self& other );
Self& operator=( const Self& other );
protected:
TCollisions m_Collisions;
_TMatrix m_FrontPaths;
- std::vector< _TVertex > m_Seeds;
+ std::vector< TVertex > m_Seeds;
};
} // ecapseman