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 unsigned short TMark;
32 typedef itk::Image< TMark, I::ImageDimension > TMarkImage;
34 typedef typename Superclass::TTraits::TVertexCmp TVertexCmp;
35 typedef std::pair< TVertex, TMark > TTreeNode;
36 typedef std::map< TVertex, TTreeNode, TVertexCmp > TTree;
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( FullTree, TTree );
56 itkGetConstMacro( ReducedTree, TTree );
57 itkGetConstMacro( EndPoints, TVertices );
58 itkGetConstMacro( BifurcationPoints, TVertices );
59 itkGetConstMacro( NumberOfBranches, TMark );
62 TMarkImage* GetOutputMarkImage( );
63 const TMarkImage* GetOutputMarkImage( ) const;
66 DijkstraWithSphereBacktracking( );
67 virtual ~DijkstraWithSphereBacktracking( );
69 virtual void _BeforeMainLoop( );
70 virtual void _AfterMainLoop( );
71 virtual bool _UpdateNeigh( _TNode& nn, const _TNode& n );
72 virtual bool _UpdateResult( _TNode& n );
74 _TRegion _Region( const TVertex& c, const double& r );
77 DijkstraWithSphereBacktracking( const Self& other );
78 Self& operator=( const Self& other );
81 _TCandidates m_Candidates;
84 TVertices m_BifurcationPoints;
85 TVertices m_EndPoints;
86 TMark m_NumberOfBranches;
93 #include <fpa/Image/DijkstraWithSphereBacktracking.hxx>
95 #endif // __FPA__IMAGE__DIJKSTRAWITHSPHEREBACKTRACKING__H__