]> Creatis software - FrontAlgorithms.git/blobdiff - appli/examples/example_ImageAlgorithmRegionGrow_00.cxx
...
[FrontAlgorithms.git] / appli / examples / example_ImageAlgorithmRegionGrow_00.cxx
diff --git a/appli/examples/example_ImageAlgorithmRegionGrow_00.cxx b/appli/examples/example_ImageAlgorithmRegionGrow_00.cxx
deleted file mode 100644 (file)
index 149977a..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-#include <iostream>
-#include <itkImage.h>
-
-#include <fpa/Image/RegionGrow.h>
-#include <fpa/Image/Functors/RegionGrowAllBelongsFunction.h>
-
-// -------------------------------------------------------------------------
-const unsigned int Dim = 2;
-typedef unsigned char TPixel;
-typedef itk::Image< TPixel, Dim > TImage;
-
-typedef fpa::Image::RegionGrow< TImage > TFrontAlgorithm;
-typedef
-fpa::Image::Functors::RegionGrowAllBelongsFunction< TImage >
-TMembershipFunction;
-
-// -------------------------------------------------------------------------
-int main( int argc, char* argv[] )
-{
-  // Create a dummy image
-  TImage::SizeType imageSize;
-  imageSize.Fill( 10 );
-
-  TImage::SpacingType imageSpacing;
-  imageSpacing.Fill( 1 );
-
-  TImage::Pointer image = TImage::New( );
-  image->SetRegions( imageSize );
-  image->SetSpacing( imageSpacing );
-  image->Allocate( );
-  image->FillBuffer( TPixel( 1 ) );
-
-  // Seed
-  TImage::IndexType seed;
-  seed.Fill( 5 );
-
-  // Configure membership function
-  TMembershipFunction::Pointer membership = TMembershipFunction::New( );
-
-  // Configure algorithm
-  TFrontAlgorithm::Pointer algorithm = TFrontAlgorithm::New( );
-  algorithm->AddSeed( seed, 0 );
-  algorithm->SetInput( image );
-  algorithm->SetNeighborhoodOrder( 1 );
-  algorithm->SetMembershipFunction( membership );
-  algorithm->Update( );
-
-  return( 0 );
-}
-
-// eof - $RCSfile$