diff --git a/Testing/Code/FeatureExtraction/otbFrostFilter.cxx b/Testing/Code/FeatureExtraction/otbFrostFilter.cxx deleted file mode 100644 index 0defb958d739ace49fcebf8ec36d85fe8b5c3a81..0000000000000000000000000000000000000000 --- a/Testing/Code/FeatureExtraction/otbFrostFilter.cxx +++ /dev/null @@ -1,94 +0,0 @@ -/*========================================================================= - - Programme : OTB (ORFEO ToolBox) - Auteurs : CS - P.Imbo - Language : C++ - Date : 26 janvier 2005 - Version : - Role : Test la classe qui filtre un image a partir de l'algorithme de FROST - $Id$ - -=========================================================================*/ -#if defined(_MSC_VER) -#pragma warning ( disable : 4786 ) -#endif - -#define MAIN - -#include "itkExceptionObject.h" -#include "itkImage.h" -#include "itkImageFileWriter.h" -#include <iostream> - -// A supprimer -//#ifndef __otbCAIImageIO_h -//#define __otbCAIImageIO_h -//#endif -//#include "otbCAIImageIO.h" - -#include "otbImageFileReader.h" -#include "otbFrostImageFilter.h" - - -int otbFrostFilter( int argc, char ** argv ) -{ - try - { - const char * inputFilename = argv[1]; - const char * outputFilename = argv[2]; - - unsigned int RadiusX((unsigned int)::atoi(argv[3])); - unsigned int RadiusY((unsigned int)::atoi(argv[4])); - double Deramp ((double)::atof(argv[5])); - - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; - const unsigned int Dimension = 2; - - typedef itk::Image< InputPixelType, Dimension > InputImageType; - typedef itk::Image< OutputPixelType, Dimension > OutputImageType; - - typedef otb::ImageFileReader< InputImageType > ReaderType; - typedef itk::ImageFileWriter< OutputImageType > WriterType; - - typedef otb::FrostImageFilter< InputImageType,OutputImageType > FilterType; - - FilterType::SizeType Radius; - Radius[0]= RadiusX; - Radius[1]= RadiusY; - - FilterType::Pointer filtreFrost = FilterType::New(); - - filtreFrost->SetRadius( Radius ); - filtreFrost->SetDeramp( Deramp ); - - ReaderType::Pointer reader = ReaderType::New(); - WriterType::Pointer writer = WriterType::New(); - - reader->SetFileName( inputFilename ); - writer->SetFileName( outputFilename ); - - filtreFrost->SetInput( reader->GetOutput() ); - writer->SetInput( filtreFrost->GetOutput() ); - - writer->Update(); - - } - catch( itk::ExceptionObject & err ) - { - std::cout << "Exception itk::ExceptionObject levee !" << std::endl; - std::cout << err << std::endl; - return EXIT_FAILURE; - } - catch( ... ) - { - std::cout << "Exception levee inconnue !" << std::endl; - return EXIT_FAILURE; - } - // Software Guide : EndCodeSnippet - -//#endif - return EXIT_SUCCESS; -} - - diff --git a/Testing/Code/FeatureExtraction/otbLeeFilter.cxx b/Testing/Code/FeatureExtraction/otbLeeFilter.cxx deleted file mode 100755 index da82829e4262c0f2634a224fffa8d7ad3ad05e23..0000000000000000000000000000000000000000 --- a/Testing/Code/FeatureExtraction/otbLeeFilter.cxx +++ /dev/null @@ -1,95 +0,0 @@ -/*========================================================================= - - Programme : OTB (ORFEO ToolBox) - Auteurs : CS - P.Imbo - Language : C++ - Date : 23 janvier 2005 - Version : - Role : Test la classe qui filtre un image a partir de l'algorithme de J.S. LEE - $Id$ - -=========================================================================*/ -#if defined(_MSC_VER) -#pragma warning ( disable : 4786 ) -#endif - -#define MAIN - -#include "itkExceptionObject.h" -#include "itkImage.h" -#include "itkImageFileWriter.h" -#include <iostream> - -// A supprimer -#include "otbCAIImageIO.h" - -//#ifndef __otbCAIImageIO_h -//#define __otbCAIImageIO_h -//#endif - -#include "otbImageFileReader.h" -#include "otbLeeImageFilter.h" - - -int otbLeeFilter( int argc, char ** argv ) -{ - try - { - const char * inputFilename = argv[1]; - const char * outputFilename = argv[2]; - - unsigned int RadiusX((unsigned int)::atoi(argv[3])); - unsigned int RadiusY((unsigned int)::atoi(argv[4])); - double NbVues ((double)::atof(argv[5])); - - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; - const unsigned int Dimension = 2; - - typedef itk::Image< InputPixelType, Dimension > InputImageType; - typedef itk::Image< OutputPixelType, Dimension > OutputImageType; - - typedef otb::ImageFileReader< InputImageType > ReaderType; - typedef itk::ImageFileWriter< OutputImageType > WriterType; - - typedef otb::LeeImageFilter< InputImageType,OutputImageType > FilterType; - - FilterType::SizeType Radius; - Radius[0]= RadiusX; - Radius[1]= RadiusY; - - FilterType::Pointer filtreLee = FilterType::New(); - - filtreLee->SetRadius( Radius ); - filtreLee->SetNbVues(NbVues); - - ReaderType::Pointer reader = ReaderType::New(); - WriterType::Pointer writer = WriterType::New(); - - reader->SetFileName( inputFilename ); - writer->SetFileName( outputFilename ); - - filtreLee->SetInput( reader->GetOutput() ); - writer->SetInput( filtreLee->GetOutput() ); - - writer->Update(); - - } - catch( itk::ExceptionObject & err ) - { - std::cout << "Exception itk::ExceptionObject levee !" << std::endl; - std::cout << err << std::endl; - return EXIT_FAILURE; - } - catch( ... ) - { - std::cout << "Exception levee inconnue !" << std::endl; - return EXIT_FAILURE; - } - // Software Guide : EndCodeSnippet - -//#endif - return EXIT_SUCCESS; -} - -