#ifndef __FPA__IMAGE__DIJKSTRAWITHENDPOINTDETECTION__H__
#define __FPA__IMAGE__DIJKSTRAWITHENDPOINTDETECTION__H__
+#include <map>
#include <itkImage.h>
#include <fpa/Image/Dijkstra.h>
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 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;
+ typedef std::set< TVertex, TVertexCompare > TUniqueVertices;
+ typedef std::map< TVertex, TLabel, TVertexCompare > TBranch;
+ typedef std::map< TVertex, TBranch, TVertexCompare > TBranches;
+
protected:
typedef typename Superclass::_TVertices _TVertices;
typedef typename Superclass::_TCollision _TCollision;
itkNewMacro( Self );
itkTypeMacro( DijkstraWithEndPointDetection, Dijkstra );
- itkGetConstMacro( EndPoints, TVertices );
- itkGetConstMacro( BifurcationPoints, TVertices );
+ itkGetConstMacro( EndPoints, TUniqueVertices );
+ itkGetConstMacro( BifurcationPoints, TUniqueVertices );
itkGetConstMacro( NumberOfBranches, unsigned long );
+ itkGetConstMacro( Branches, TBranches );
public:
TLabelImage* GetLabelImage( );
_TRegion _Region( const TVertex& c, const double& r );
+ template< class _T >
+ TVertex _MaxInRegion(
+ const _T* image, const TVertex& v, const double& r
+ );
+
+ void _Label( const TVertex& v, const TLabel& l );
+
private:
// Purposely not implemented
DijkstraWithEndPointDetection( const Self& other );
protected:
unsigned int m_LabelImageIndex;
- _TCandidates m_Candidates;
- TVertices m_BifurcationPoints;
- TVertices m_EndPoints;
- unsigned long m_NumberOfBranches;
+ _TCandidates m_Candidates;
+ TUniqueVertices m_BifurcationPoints;
+ TUniqueVertices m_EndPoints;
+ unsigned long m_NumberOfBranches;
+ TBranches m_Branches;
};
} // ecapseman