1 #ifndef __FPA__IMAGE__DIJKSTRAWITHENDPOINTDETECTION__H__
2 #define __FPA__IMAGE__DIJKSTRAWITHENDPOINTDETECTION__H__
5 #include <fpa/Image/Dijkstra.h>
12 * @param I Input image type
13 * @param O Output image type
15 template< class I, class O >
16 class DijkstraWithEndPointDetection
17 : public Dijkstra< I, O >
20 typedef DijkstraWithEndPointDetection Self;
21 typedef Dijkstra< I, O > Superclass;
22 typedef itk::SmartPointer< Self > Pointer;
23 typedef itk::SmartPointer< const Self > ConstPointer;
25 typedef typename Superclass::TInputImage TInputImage;
26 typedef typename Superclass::TOutputImage TOutputImage;
27 typedef typename Superclass::TVertex TVertex;
28 typedef typename Superclass::TValue TValue;
29 typedef typename Superclass::TResult TResult;
30 typedef typename Superclass::TCostFunction TCostFunction;
31 typedef typename Superclass::TConversionFunction TConversionFunction;
32 typedef typename Superclass::_TVertices TVertices;
34 typedef typename Superclass::TStartEvent TStartEvent;
35 typedef typename Superclass::TStartLoopEvent TStartLoopEvent;
36 typedef typename Superclass::TEndEvent TEndEvent;
37 typedef typename Superclass::TEndLoopEvent TEndLoopEvent;
38 typedef typename Superclass::TAliveEvent TAliveEvent;
39 typedef typename Superclass::TFrontEvent TFrontEvent;
40 typedef typename Superclass::TFreezeEvent TFreezeEvent;
42 typedef typename Superclass::TStartBacktrackingEvent TStartBacktrackingEvent;
43 typedef typename Superclass::TEndBacktrackingEvent TEndBacktrackingEvent;
44 typedef typename Superclass::TBacktrackingEvent TBacktrackingEvent;
46 typedef unsigned short TLabel;
47 typedef itk::Image< TLabel, I::ImageDimension > TLabelImage;
50 typedef typename Superclass::_TVertices _TVertices;
51 typedef typename Superclass::_TCollision _TCollision;
52 typedef typename Superclass::_TCollisionsRow _TCollisionsRow;
53 typedef typename Superclass::_TCollisions _TCollisions;
54 typedef typename Superclass::_TNode _TNode;
55 typedef typename Superclass::_TNodes _TNodes;
57 typedef typename I::PixelType _TPixel;
58 typedef typename I::RegionType _TRegion;
59 typedef typename I::SizeType _TSize;
61 typedef std::pair< TResult, TVertex > _TCandidate;
62 typedef std::multimap< TResult, TVertex > _TCandidates;
66 itkTypeMacro( DijkstraWithEndPointDetection, Dijkstra );
68 itkGetConstMacro( EndPoints, TVertices );
69 itkGetConstMacro( BifurcationPoints, TVertices );
70 itkGetConstMacro( NumberOfBranches, unsigned long );
73 TLabelImage* GetLabelImage( );
74 const TLabelImage* GetLabelImage( ) const;
75 void GraftLabelImage( itk::DataObject* obj );
78 DijkstraWithEndPointDetection( );
79 virtual ~DijkstraWithEndPointDetection( );
81 virtual void _BeforeGenerateData( );
82 virtual void _AfterGenerateData( );
83 virtual void _SetResult( const TVertex& v, const _TNode& n );
85 _TRegion _Region( const TVertex& c, const double& r );
88 // Purposely not implemented
89 DijkstraWithEndPointDetection( const Self& other );
90 Self& operator=( const Self& other );
93 unsigned int m_LabelImageIndex;
95 _TCandidates m_Candidates;
96 TVertices m_BifurcationPoints;
97 TVertices m_EndPoints;
98 unsigned long m_NumberOfBranches;
105 #include <fpa/Image/DijkstraWithEndPointDetection.hxx>
107 #endif // __FPA__IMAGE__DIJKSTRAWITHENDPOINTDETECTION__H__