]> Creatis software - FrontAlgorithms.git/blobdiff - tests/image/Dijkstra_Identity.cxx
...
[FrontAlgorithms.git] / tests / image / Dijkstra_Identity.cxx
index 57f35935a965ffe8926742b088eae85f60e0aebd..54d1511bdaf15022c618296f3f85ecbae10f5766 100644 (file)
@@ -17,11 +17,11 @@ typedef fpa::Image::Functors::Dijkstra::Identity< TInputImage, TScalar > TWeight
 int main( int argc, char* argv[] )
 {
   // Get arguments
-  if( argc < 6 )
+  if( argc < 5 )
   {
     std::cerr
       << "Usage: " << argv[ 0 ]
-      << " output_image output_marks width height visual_debug ..."
+      << " output_image output_marks width height ..."
       << std::endl;
     return( 1 );
 
@@ -30,21 +30,11 @@ int main( int argc, char* argv[] )
   std::string output_marks_filename = argv[ 2 ];
   int width = std::atoi( argv[ 3 ] );
   int height = std::atoi( argv[ 4 ] );
-  bool visual_debug = ( argv[ 5 ][ 0 ] == '1' );
 
   // Create image
   TInputImage::Pointer image;
   fpa::tests::image::CreateImage( image, 1, width, height, 1.0, 1.0 );
 
-  // Interact with image
-  fpa::tests::image::Viewer< TFilter > viewer( image );
-  if( visual_debug )
-  {
-    viewer.ActivateSeedWidget( );
-    viewer.Show( );
-
-  } // fi
-
   // Prepare weight
   TWeight::Pointer weight = TWeight::New( );
 
@@ -54,7 +44,7 @@ int main( int argc, char* argv[] )
   filter->SetWeightFunction( weight );
 
   // Get all seeds
-  for( int i = 6; i < argc; i += 2 )
+  for( int i = 5; i < argc; i += 2 )
   {
     if( i + 1 < argc )
     {
@@ -66,11 +56,8 @@ int main( int argc, char* argv[] )
     } // fi
 
   } // rof
-  viewer.AssociateSeedsTo( filter );
 
-  // Prepare visual debug and update
-  if( visual_debug )
-    viewer.ObserveFilter( filter );
+  // Execute filter
   filter->Update( );
 
   // Save results