]> Creatis software - FrontAlgorithms.git/blobdiff - tests/image/Dijkstra_Identity.cxx
...
[FrontAlgorithms.git] / tests / image / Dijkstra_Identity.cxx
diff --git a/tests/image/Dijkstra_Identity.cxx b/tests/image/Dijkstra_Identity.cxx
deleted file mode 100644 (file)
index 54d1511..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#include "BaseFunctions.h"
-#include <itkImage.h>
-#include <fpa/Image/Dijkstra.h>
-#include <fpa/Image/Functors/Dijkstra/Identity.h>
-
-// -------------------------------------------------------------------------
-const unsigned int Dim = 2;
-typedef unsigned char TPixel;
-typedef float         TScalar;
-
-typedef itk::Image< TPixel, Dim >                                    TInputImage;
-typedef itk::Image< TScalar, Dim >                                  TScalarImage;
-typedef fpa::Image::Dijkstra< TInputImage, TScalarImage >                TFilter;
-typedef fpa::Image::Functors::Dijkstra::Identity< TInputImage, TScalar > TWeight;
-
-// -------------------------------------------------------------------------
-int main( int argc, char* argv[] )
-{
-  // Get arguments
-  if( argc < 5 )
-  {
-    std::cerr
-      << "Usage: " << argv[ 0 ]
-      << " output_image output_marks width height ..."
-      << std::endl;
-    return( 1 );
-
-  } // fi
-  std::string output_image_filename = argv[ 1 ];
-  std::string output_marks_filename = argv[ 2 ];
-  int width = std::atoi( argv[ 3 ] );
-  int height = std::atoi( argv[ 4 ] );
-
-  // Create image
-  TInputImage::Pointer image;
-  fpa::tests::image::CreateImage( image, 1, width, height, 1.0, 1.0 );
-
-  // Prepare weight
-  TWeight::Pointer weight = TWeight::New( );
-
-  // Prepare filter
-  TFilter::Pointer filter = TFilter::New( );
-  filter->SetInput( image );
-  filter->SetWeightFunction( weight );
-
-  // Get all seeds
-  for( int i = 5; i < argc; i += 2 )
-  {
-    if( i + 1 < argc )
-    {
-      TInputImage::IndexType seed;
-      seed[ 0 ] = std::atoi( argv[ i ] );
-      seed[ 1 ] = std::atoi( argv[ i + 1 ] );
-      filter->AddSeed( seed );
-
-    } // fi
-
-  } // rof
-
-  // Execute filter
-  filter->Update( );
-
-  // Save results
-  std::string err1 =
-    fpa::tests::image::Write( filter->GetOutput( ), output_image_filename );
-  std::string err2 =
-    fpa::tests::image::Write( filter->GetMarks( ), output_marks_filename );
-  if( err1 != "" ) std::cerr << err1 << std::endl;
-  if( err2 != "" ) std::cerr << err2 << std::endl;
-
-  return( 0 );
-}
-
-// eof - $RCSfile$