1 #ifndef __FPA__IMAGE__DIJKSTRAWITHSPHEREBACKTRACKING__H__
2 #define __FPA__IMAGE__DIJKSTRAWITHSPHEREBACKTRACKING__H__
7 #include <fpa/Image/Dijkstra.h>
14 * @param I Input image type
16 template< class I, class C >
17 class DijkstraWithSphereBacktracking
18 : public fpa::Image::Dijkstra< I, C >
21 typedef DijkstraWithSphereBacktracking Self;
22 typedef fpa::Image::Dijkstra< I, C > Superclass;
23 typedef itk::SmartPointer< Self > Pointer;
24 typedef itk::SmartPointer< const Self > ConstPointer;
26 typedef typename Superclass::TCost TCost;
27 typedef typename Superclass::TVertex TVertex;
28 typedef typename Superclass::InputImageType TImage;
29 typedef std::deque< TVertex > TVertices;
31 typedef typename Superclass::TTraits::TVertexCmp TVertexCmp;
32 typedef std::map< TVertex, TVertex, TVertexCmp > TTree;
34 typedef typename Superclass::TEndEvent TEndEvent;
35 typedef typename Superclass::TBacktrackingEvent TBacktrackingEvent;
36 typedef typename Superclass::TEndBacktrackingEvent TEndBacktrackingEvent;
39 typedef std::pair< TCost, TVertex > _TCandidate;
40 typedef std::multimap< TCost, TVertex > _TCandidates;
41 typedef typename Superclass::_TNode _TNode;
43 typedef typename I::PixelType _TPixel;
44 typedef typename I::RegionType _TRegion;
45 typedef typename I::SizeType _TSize;
49 itkTypeMacro( DijkstraWithSphereBacktracking, Dijkstra );
51 itkGetConstMacro( FinalTree, TTree );
52 itkGetConstMacro( EndPoints, TVertices );
53 itkGetConstMacro( BifurcationPoints, TVertices );
56 DijkstraWithSphereBacktracking( );
57 virtual ~DijkstraWithSphereBacktracking( );
59 virtual void _BeforeMainLoop( );
60 virtual void _AfterMainLoop( );
61 virtual bool _UpdateNeigh( _TNode& nn, const _TNode& n );
62 virtual bool _UpdateResult( _TNode& n );
64 _TRegion _Region( const TVertex& c, const double& r );
67 DijkstraWithSphereBacktracking( const Self& other );
68 Self& operator=( const Self& other );
71 _TCandidates m_Candidates;
73 TVertices m_BifurcationPoints;
74 TVertices m_EndPoints;
81 #include <fpa/Image/DijkstraWithSphereBacktracking.hxx>
83 #endif // __FPA__IMAGE__DIJKSTRAWITHSPHEREBACKTRACKING__H__