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::TVertexCompare TVertexCompare;
29 typedef typename Superclass::TValue TValue;
30 typedef typename Superclass::TResult TResult;
31 typedef typename Superclass::TCostFunction TCostFunction;
32 typedef typename Superclass::TConversionFunction TConversionFunction;
33 typedef typename Superclass::_TVertices TVertices;
35 typedef typename Superclass::TStartEvent TStartEvent;
36 typedef typename Superclass::TStartLoopEvent TStartLoopEvent;
37 typedef typename Superclass::TEndEvent TEndEvent;
38 typedef typename Superclass::TEndLoopEvent TEndLoopEvent;
39 typedef typename Superclass::TAliveEvent TAliveEvent;
40 typedef typename Superclass::TFrontEvent TFrontEvent;
41 typedef typename Superclass::TFreezeEvent TFreezeEvent;
43 typedef typename Superclass::TStartBacktrackingEvent TStartBacktrackingEvent;
44 typedef typename Superclass::TEndBacktrackingEvent TEndBacktrackingEvent;
45 typedef typename Superclass::TBacktrackingEvent TBacktrackingEvent;
47 typedef unsigned short TLabel;
48 typedef itk::Image< TLabel, I::ImageDimension > TLabelImage;
51 typedef typename Superclass::_TVertices _TVertices;
52 typedef typename Superclass::_TCollision _TCollision;
53 typedef typename Superclass::_TCollisionsRow _TCollisionsRow;
54 typedef typename Superclass::_TCollisions _TCollisions;
55 typedef typename Superclass::_TNode _TNode;
56 typedef typename Superclass::_TNodes _TNodes;
58 typedef typename I::PixelType _TPixel;
59 typedef typename I::RegionType _TRegion;
60 typedef typename I::SizeType _TSize;
62 typedef std::pair< TResult, TVertex > _TCandidate;
63 typedef std::multimap< TResult, TVertex > _TCandidates;
67 itkTypeMacro( DijkstraWithEndPointDetection, Dijkstra );
69 itkGetConstMacro( EndPoints, TVertices );
70 itkGetConstMacro( BifurcationPoints, TVertices );
71 itkGetConstMacro( NumberOfBranches, unsigned long );
74 TLabelImage* GetLabelImage( );
75 const TLabelImage* GetLabelImage( ) const;
76 void GraftLabelImage( itk::DataObject* obj );
79 DijkstraWithEndPointDetection( );
80 virtual ~DijkstraWithEndPointDetection( );
82 virtual void _BeforeGenerateData( );
83 virtual void _AfterGenerateData( );
84 virtual void _SetResult( const TVertex& v, const _TNode& n );
86 _TRegion _Region( const TVertex& c, const double& r );
89 // Purposely not implemented
90 DijkstraWithEndPointDetection( const Self& other );
91 Self& operator=( const Self& other );
94 unsigned int m_LabelImageIndex;
96 _TCandidates m_Candidates;
97 TVertices m_BifurcationPoints;
98 TVertices m_EndPoints;
99 unsigned long m_NumberOfBranches;
106 #include <fpa/Image/DijkstraWithEndPointDetection.hxx>
108 #endif // __FPA__IMAGE__DIJKSTRAWITHENDPOINTDETECTION__H__