]> Creatis software - FrontAlgorithms.git/blobdiff - tests/image/RegionGrow_Tautology.cxx
...
[FrontAlgorithms.git] / tests / image / RegionGrow_Tautology.cxx
diff --git a/tests/image/RegionGrow_Tautology.cxx b/tests/image/RegionGrow_Tautology.cxx
deleted file mode 100644 (file)
index db60d0a..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#include "BaseFunctions.h"
-#include <itkImage.h>
-#include <fpa/Image/RegionGrow.h>
-#include <fpa/Base/Functors/RegionGrow/Tautology.h>
-
-// -------------------------------------------------------------------------
-const unsigned int Dim = 2;
-typedef unsigned char TPixel;
-
-typedef itk::Image< TPixel, Dim >                            TImage;
-typedef fpa::Image::RegionGrow< TImage, TImage >             TFilter;
-typedef fpa::Base::Functors::RegionGrow::Tautology< TPixel > TPredicate;
-
-// -------------------------------------------------------------------------
-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
-  TImage::Pointer image;
-  fpa::tests::image::CreateImage( image, 0, width, height, 1.0, 1.0 );
-
-  // Prepare predicate
-  TPredicate::Pointer predicate = TPredicate::New( );
-
-  // Prepare filter
-  TFilter::Pointer filter = TFilter::New( );
-  filter->SetInput( image );
-  filter->SetPredicate( predicate );
-  filter->SetInsideValue( 255 );
-  filter->SetOutsideValue( 0 );
-
-  // Get all seeds
-  for( int i = 5; i < argc; i += 2 )
-  {
-    if( i + 1 < argc )
-    {
-      TImage::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$