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 unsigned short TMark;
35 typedef itk::Image< TMark, I::ImageDimension > TMarkImage;
38 typedef typename Superclass::TEndEvent TEndEvent;
39 typedef typename Superclass::TBacktrackingEvent TBacktrackingEvent;
40 typedef typename Superclass::TEndBacktrackingEvent TEndBacktrackingEvent;
43 typedef std::pair< TCost, TVertex > _TCandidate;
44 typedef std::multimap< TCost, TVertex > _TCandidates;
45 typedef typename Superclass::_TNode _TNode;
47 typedef typename I::PixelType _TPixel;
48 typedef typename I::RegionType _TRegion;
49 typedef typename I::SizeType _TSize;
53 itkTypeMacro( DijkstraWithSphereBacktracking, Dijkstra );
55 itkGetConstMacro( FinalTree, TTree );
56 itkGetConstMacro( EndPoints, TVertices );
57 itkGetConstMacro( BifurcationPoints, TVertices );
58 itkGetConstMacro( NumberOfBranches, TMark );
61 TMarkImage* GetOutputMarkImage( );
62 const TMarkImage* GetOutputMarkImage( ) const;
65 DijkstraWithSphereBacktracking( );
66 virtual ~DijkstraWithSphereBacktracking( );
68 virtual void _BeforeMainLoop( );
69 virtual void _AfterMainLoop( );
70 virtual bool _UpdateNeigh( _TNode& nn, const _TNode& n );
71 virtual bool _UpdateResult( _TNode& n );
73 _TRegion _Region( const TVertex& c, const double& r );
76 DijkstraWithSphereBacktracking( const Self& other );
77 Self& operator=( const Self& other );
80 _TCandidates m_Candidates;
82 TVertices m_BifurcationPoints;
83 TVertices m_EndPoints;
84 TMark m_NumberOfBranches;
91 #include <fpa/Image/DijkstraWithSphereBacktracking.hxx>
93 #endif // __FPA__IMAGE__DIJKSTRAWITHSPHEREBACKTRACKING__H__