-#ifndef __FPA__IMAGE__DIJKSTRA__H__
-#define __FPA__IMAGE__DIJKSTRA__H__
+#ifndef __fpa__Image__Dijkstra__h__
+#define __fpa__Image__Dijkstra__h__
#include <fpa/Base/Dijkstra.h>
#include <fpa/Image/Algorithm.h>
+#include <fpa/Image/MinimumSpanningTree.h>
+#include <fpa/Image/Functors/Base.h>
namespace fpa
{
{
/**
*/
- template< class _TInputImage, class _TOutputImage = _TInputImage >
+ template< class _TInputImage, class _TOutputImage >
class Dijkstra
- : public fpa::Base::Dijkstra< fpa::Image::Algorithm< _TInputImage, _TOutputImage > >
+ : public fpa::Base::Dijkstra< fpa::Image::Algorithm< _TInputImage, _TOutputImage >, fpa::Image::MinimumSpanningTree< _TInputImage::ImageDimension > >
{
public:
- typedef fpa::Base::Dijkstra< fpa::Image::Algorithm< _TInputImage, _TOutputImage > > Superclass;
- typedef Dijkstra Self;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
+ typedef Dijkstra Self;
+ typedef fpa::Image::Algorithm< _TInputImage, _TOutputImage > TAlgorithm;
+ typedef fpa::Image::MinimumSpanningTree< _TInputImage::ImageDimension > TMST;
+ typedef fpa::Base::Dijkstra< TAlgorithm, TMST > Superclass;
+ typedef itk::SmartPointer< Self > Pointer;
+ typedef itk::SmartPointer< const Self > ConstPointer;
- // Template arguments
- typedef typename Superclass::TVertex TVertex;
- typedef typename Superclass::TScalar TScalar;
- typedef typename Superclass::TFilter TFilter;
- typedef typename Superclass::TVertexCompare TVertexCompare;
- typedef typename Superclass::TFrontId TFrontId;
- typedef typename Superclass::TCollision TCollision;
- typedef typename Superclass::TCollisionsRow TCollisionsRow;
- typedef typename Superclass::TCollisions TCollisions;
- typedef typename Superclass::TNodeLabel TNodeLabel;
- typedef typename Superclass::TNode TNode;
- typedef typename Superclass::TNodes TNodes;
- typedef typename Superclass::TVertices TVertices;
+ typedef typename Superclass::TOutput TOutput;
+ typedef typename Superclass::TVertex TVertex;
+
+ typedef fpa::Image::Functors::Base< _TInputImage, fpa::Base::DijkstraCostFunctionBase< TVertex, TOutput > > TCostFunction;
public:
itkNewMacro( Self );
- itkTypeMacro( Dijkstra, fpa::Base::Dijkstra );
-
- itkBooleanMacro( UseImageSpacing );
- itkGetConstMacro( UseImageSpacing, bool );
- itkSetMacro( UseImageSpacing, bool );
+ itkTypeMacro( fpa::Image::Dijkstra, fpa::Base::Dijkstra );
protected:
Dijkstra( );
virtual ~Dijkstra( );
- // Dijkstra methods to be overloaded
- virtual TScalar _Cost(
- const TVertex& a, const TVertex& b
- ) const fpa_OVERRIDE;
+ virtual void _BeforeGenerateData( ) override;
private:
- // Purposely not implemented
+ // Purposely not defined
Dijkstra( const Self& other );
Self& operator=( const Self& other );
-
- protected:
- bool m_UseImageSpacing;
};
} // ecapseman
#ifndef ITK_MANUAL_INSTANTIATION
# include <fpa/Image/Dijkstra.hxx>
-#endif
+#endif // ITK_MANUAL_INSTANTIATION
-#endif // __FPA__IMAGE__DIJKSTRA__H__
+#endif // __fpa__Image__Dijkstra__h__
// eof - $RCSfile$