#ifndef __FPA__IMAGE__DIJKSTRAWITHENDPOINTDETECTION__H__ #define __FPA__IMAGE__DIJKSTRAWITHENDPOINTDETECTION__H__ #include #include namespace fpa { namespace Image { /** * @param I Input image type * @param O Output image type */ template< class I, class O > class DijkstraWithEndPointDetection : public Dijkstra< I, O > { public: typedef DijkstraWithEndPointDetection Self; typedef Dijkstra< I, O > Superclass; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer< const Self > ConstPointer; typedef typename Superclass::TInputImage TInputImage; typedef typename Superclass::TOutputImage TOutputImage; typedef typename Superclass::TVertex TVertex; typedef typename Superclass::TValue TValue; typedef typename Superclass::TResult TResult; typedef typename Superclass::TCostFunction TCostFunction; typedef typename Superclass::TConversionFunction TConversionFunction; typedef typename Superclass::_TVertices TVertices; typedef typename Superclass::TStartEvent TStartEvent; typedef typename Superclass::TStartLoopEvent TStartLoopEvent; typedef typename Superclass::TEndEvent TEndEvent; typedef typename Superclass::TEndLoopEvent TEndLoopEvent; typedef typename Superclass::TAliveEvent TAliveEvent; typedef typename Superclass::TFrontEvent TFrontEvent; typedef typename Superclass::TFreezeEvent TFreezeEvent; typedef typename Superclass::TStartBacktrackingEvent TStartBacktrackingEvent; typedef typename Superclass::TEndBacktrackingEvent TEndBacktrackingEvent; typedef typename Superclass::TBacktrackingEvent TBacktrackingEvent; typedef unsigned short TLabel; typedef itk::Image< TLabel, I::ImageDimension > TLabelImage; protected: typedef typename Superclass::_TVertices _TVertices; typedef typename Superclass::_TCollision _TCollision; typedef typename Superclass::_TCollisionsRow _TCollisionsRow; typedef typename Superclass::_TCollisions _TCollisions; typedef typename Superclass::_TNode _TNode; typedef typename Superclass::_TNodes _TNodes; typedef typename I::PixelType _TPixel; typedef typename I::RegionType _TRegion; typedef typename I::SizeType _TSize; typedef std::pair< TResult, TVertex > _TCandidate; typedef std::multimap< TResult, TVertex > _TCandidates; public: itkNewMacro( Self ); itkTypeMacro( DijkstraWithEndPointDetection, Dijkstra ); itkGetConstMacro( EndPoints, TVertices ); itkGetConstMacro( BifurcationPoints, TVertices ); itkGetConstMacro( NumberOfBranches, unsigned long ); public: TLabelImage* GetLabelImage( ); const TLabelImage* GetLabelImage( ) const; void GraftLabelImage( itk::DataObject* obj ); protected: DijkstraWithEndPointDetection( ); virtual ~DijkstraWithEndPointDetection( ); virtual void _BeforeGenerateData( ); virtual void _AfterGenerateData( ); virtual void _SetResult( const TVertex& v, const _TNode& n ); _TRegion _Region( const TVertex& c, const double& r ); private: // Purposely not implemented DijkstraWithEndPointDetection( const Self& other ); Self& operator=( const Self& other ); protected: unsigned int m_LabelImageIndex; _TCandidates m_Candidates; TVertices m_BifurcationPoints; TVertices m_EndPoints; unsigned long m_NumberOfBranches; }; } // ecapseman } // ecapseman #include #endif // __FPA__IMAGE__DIJKSTRAWITHENDPOINTDETECTION__H__ // eof - $RCSfile$