Skip to content
Snippets Groups Projects
Commit 0c7e1fe6 authored by Patrick Imbo's avatar Patrick Imbo
Browse files

No commit message

No commit message
parent 5f846817
No related branches found
No related tags found
No related merge requests found
......@@ -199,9 +199,6 @@ ADD_TEST(coTuDrawLineSpatialObjectList ${COMMON_TESTS}
ADD_TEST(coTuImageToLineSpatialObjectListNew ${COMMON_TESTS}
otbImageToLineSpatialObjectListNew)
ADD_TEST(coVectorInterpolateImageFunctionTest ${COMMON_TESTS} otbVectorInterpolateImageFunctionTest)
ADD_TEST(coVectorLinearInterpolateImageFunctionTestNew ${COMMON_TESTS} otbVectorLinearInterpolateImageFunctionTestNew)
# ------- Fichiers sources CXX -----------------------------------
SET(BasicCommon_SRCS
......@@ -223,8 +220,6 @@ otbDrawLineSpatialObject.cxx
otbDrawLineSpatialObjectListNew.cxx
otbDrawLineSpatialObjectList.cxx
otbImageToLineSpatialObjectListNew.cxx
otbVectorInterpolateImageFunctionTest.cxx
otbVectorLinearInterpolateImageFunctionTestNew.cxx
)
......
......@@ -26,6 +26,4 @@ REGISTER_TEST(otbDrawLineSpatialObject);
REGISTER_TEST(otbDrawLineSpatialObjectListNew);
REGISTER_TEST(otbDrawLineSpatialObjectList);
REGISTER_TEST(otbImageToLineSpatialObjectListNew);
REGISTER_TEST(otbVectorLinearInterpolateImageFunctionTestNew);
REGISTER_TEST(otbVectorInterpolateImageFunctionTest);
}
/*=========================================================================
Programme : OTB (ORFEO ToolBox)
Auteurs : CS - T.Feuvrier
Language : C++
Date : 11 janvier 2005
Version :
Role : Test l'extraction d'une ROI dans une image mono canal, dont les valeurs sont codes en "unsigned char"
$Id$
=========================================================================*/
#include <iostream>
#include "itkExceptionObject.h"
#include "otbCommandLineArgumentParser.h"
int otbTestCommandLineArgumentParserWithError( int argc, char ** argv )
{
try
{
// Parse command line parameters
typedef otb::CommandLineArgumentParser ParserType;
ParserType::Pointer parser = ParserType::New();
parser->AddOption("-help","Help","-h",0,false);
parser->AddOption("-image","Nom d'une image","-i",1,true);
parser->AddOption("-entier","Une Valeur entiere (obligatoire)","-e");
parser->AddOption("-deuxentiers","Deux Valeurs entieres non obligatoire","-dede",2,false);
parser->AddOption("-double", "Valeur relle double", "-d");
typedef otb::CommandLineArgumentParseResult ParserResultType;
ParserResultType::Pointer parseResult = ParserResultType::New();
parser->ParseCommandLine(argc,argv,parseResult) ;
std::cout << "Image : "<<parseResult->GetStringParameter("-image")<<std::endl;
unsigned int lEntier = parseResult->GetParameter<unsigned int>("-entier");
std::cout << "Entier : "<<lEntier<<std::endl;
if( parseResult->IsOptionPresent("-deuxentiers"))
{
unsigned int lEntierDeux = parseResult->GetParameter<unsigned int>("-deuxentiers",1);
std::cout << "Entier : "<<lEntier<<std::endl;
}
double lDouble = parseResult->GetParameter<double>("-double");
std::cout << "Double : "<<lDouble<<std::endl;
}
catch( itk::ExceptionObject & err )
{
return EXIT_SUCCESS;
}
catch( ... )
{
std::cout << "Exception levee inconnue !" << std::endl;
return EXIT_FAILURE;
}
return EXIT_FAILURE;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment