Skip to content
Snippets Groups Projects
Commit 27082a71 authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

MRG

parents 237ace1c bbfae417
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,7 @@ namespace otb
{
/** \class FltkFilterWatcher
* \brief This class implements the progress mechanim
* \brief This class implements the progress mechanism
* on pipeline filtering execution
*
*/
......
This diff is collapsed.
......@@ -161,6 +161,29 @@ ADD_TEST(ioTvImageFileReaderShortLUM2LUM ${IO_TESTS1}
${INPUTDATA}/poupees_I2.lum
${TEMP}/ioImageFileReaderI2_LUM2LUM.lum )
# ------- otb::MWImageIO ------------------------------
# CanRead()
ADD_TEST(ioTuMWImageIOCanRead ${IO_TESTS1} otbMWImageIOTestCanRead
${BASELINE}/QB_Toulouse_Ortho_PAN.img)
ADD_TEST(ioTvImageFileReaderMW2TIF ${IO_TESTS1}
--compare-image ${TOL} ${BASELINE}/QB_Toulouse_Ortho_PAN.img
${TEMP}/ioImageFileReaderMW2TIF.tif
otbImageFileReaderTest
${INPUTDATA}/QB_Toulouse_Ortho_PAN.tif
${TEMP}/ioImageFileReaderMW2TIF.tif )
# CanWrite()
ADD_TEST(ioTuMWImageIOCanWrite ${IO_TESTS1} otbMWImageIOTestCanWrite
${TEMP}/QB_Toulouse_Ortho_PAN.img)
ADD_TEST(ioTvImageFileReaderTIF2MW ${IO_TESTS1}
--compare-image ${TOL} ${INPUTDATA}/QB_Toulouse_Ortho_PAN.tif
${TEMP}/ioImageFileReaderTIF2MW.img
otbImageFileReaderTest
${BASELINE}/QB_Toulouse_Ortho_PAN.img
${TEMP}/ioImageFileReaderTIF2MW.img )
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbIOTests2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......@@ -1555,6 +1578,8 @@ SET(BasicIO_SRCS1
otbImageFileReaderERS.cxx
otbLUMImageIOTestCanRead.cxx
otbLUMImageIOTestCanWrite.cxx
otbMWImageIOTestCanRead.cxx
otbMWImageIOTestCanWrite.cxx
otbImageFileReaderTest.cxx
otbShortImageIOTest.cxx
)
......
......@@ -31,6 +31,8 @@ void RegisterTests()
REGISTER_TEST(otbImageFileReaderERS);
REGISTER_TEST(otbLUMImageIOTestCanRead);
REGISTER_TEST(otbLUMImageIOTestCanWrite);
REGISTER_TEST(otbMWImageIOTestCanRead);
REGISTER_TEST(otbMWImageIOTestCanWrite);
REGISTER_TEST(otbImageFileReaderTest);
REGISTER_TEST(otbShortImageIOTest);
}
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#if defined(_MSC_VER)
#pragma warning ( disable : 4786 )
#endif
#include "otbMWImageIO.h"
#include "itkExceptionObject.h"
#include <iostream>
int otbMWImageIOTestCanRead(int argc, char* argv[])
{
otb::MWImageIO::Pointer lMWImageIO = otb::MWImageIO::New();
bool lCanRead = lMWImageIO->CanReadFile(argv[1]);
if ( lCanRead == false)
{
std::cerr << "Error otb::MWImageIO : impossible to read MW image "<<argv[1]<<"."<<std::endl;
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#if defined(_MSC_VER)
#pragma warning ( disable : 4786 )
#endif
#include "otbMWImageIO.h"
#include "itkExceptionObject.h"
#include <iostream>
int otbMWImageIOTestCanWrite(int argc, char* argv[])
{
otb::MWImageIO::Pointer lMWImageIO = otb::MWImageIO::New();
bool lCanRead = lMWImageIO->CanWriteFile(argv[1]);
if ( lCanRead == false)
{
std::cerr << "Error image "<<argv[1]<<" is not a MW image."<<std::endl;
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
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