]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Image/Dijkstra.hxx
...
[FrontAlgorithms.git] / lib / fpa / Image / Dijkstra.hxx
index bf6b5f09d67f99382f012d75b129d0921adf12bc..1f21dc4335cddbe310c8fe5ef0e9d6ee65c1f9f2 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __fpa__Image__Dijkstra__hxx__
 #define __fpa__Image__Dijkstra__hxx__
 
-#include <fpa/Image/Functors/SimpleDijkstraCost.h>
+#include <fpa/Image/Functors/VertexCost.h>
 
 // -------------------------------------------------------------------------
 template< class _TInputImage, class _TOutputImage >
@@ -9,12 +9,9 @@ fpa::Image::Dijkstra< _TInputImage, _TOutputImage >::
 Dijkstra( )
   : Superclass( )
 {
-  typedef
-    fpa::Image::Functors::SimpleDijkstraCost< _TInputImage, TOutput >
-    _TCost;
-
+  typedef fpa::Image::Functors::VertexCost< _TInputImage, TOutput > _TCost;
   typename _TCost::Pointer cost = _TCost::New( );
-  this->SetCostFunction( cost );
+  this->SetVertexFunction( cost );
 }
 
 // -------------------------------------------------------------------------
@@ -24,20 +21,6 @@ fpa::Image::Dijkstra< _TInputImage, _TOutputImage >::
 {
 }
 
-// -------------------------------------------------------------------------
-template< class _TInputImage, class _TOutputImage >
-void fpa::Image::Dijkstra< _TInputImage, _TOutputImage >::
-_BeforeGenerateData( )
-{
-  this->Superclass::_BeforeGenerateData( );
-
-  TCostFunction* cost =
-    dynamic_cast< TCostFunction* >( this->GetCostFunction( ) );
-  if( cost == NULL )
-    itkExceptionMacro( << "CostFunction not well defined." );
-  cost->SetImage( this->GetInput( ) );
-}
-
 #endif // __fpa__Image__Dijkstra__hxx__
 
 // eof - $RCSfile$