#ifndef __FPA__BASE__TREEEXTRACTOR__H__ #define __FPA__BASE__TREEEXTRACTOR__H__ #include #include namespace fpa { namespace Base { /** */ template< class A > class TreeExtractor : public A { public: /// Standard class typdedefs typedef TreeExtractor Self; typedef A Superclass; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer< const Self > ConstPointer; typedef A TAlgorithm; typedef typename A::TCost TCost; typedef typename A::TVertex TVertex; typedef std::vector< TVertex > TVertices; typedef typename A::TTraits::TVertexCmp TVertexCmp; typedef std::map< TVertex, TVertex, TVertexCmp > TTree; protected: typedef typename A::_TFrontId _TFrontId; typedef typename A::_TNode _TNode; typedef typename A::_TCollisionSitesRow _TCollisionSitesRow; typedef typename A::_TCollisionSites _TCollisionSites; typedef std::vector< unsigned long > _TRow; typedef std::vector< _TRow > _TMatrix; public: itkNewMacro( Self ); itkTypeMacro( TreeExtractor, TAlgorithm ); itkGetConstMacro( Root, TVertex ); itkGetConstMacro( Tree, TTree ); itkSetMacro( Root, TVertex ); public: unsigned int AddLeaf( const TVertex& leaf ); unsigned int GetNumberOfLeafs( ) const; const TVertex& GetLeaf( const unsigned int& id ) const; protected: TreeExtractor( ); virtual ~TreeExtractor( ); virtual void _BeforeMainLoop( ); virtual void _AfterMainLoop( ); TVertices _Path( const TVertex& s, const TVertex& e ); private: // Purporsely not implemented TreeExtractor( const Self& ); void operator=( const Self& ); protected: TVertex m_Root; TVertices m_Leafs; TTree m_Tree; _TMatrix m_FrontPaths; static const unsigned long INF_VALUE; }; } // ecapseman } // ecapseman #include #endif // __FPA__BASE__TREEEXTRACTOR__H__ // eof - $RCSfile$