From 706bead7fad11016b6e52a62d17c8b19ff9dc004 Mon Sep 17 00:00:00 2001 From: Manuel Grizonnet <manuel.grizonnet@gmail.com> Date: Mon, 30 Nov 2009 15:13:36 +0100 Subject: [PATCH] TEST:test link with libjpg in libotbVisu --- Testing/Fa/0000132-jpg.cxx | 48 ++++++++++++++++++++++++++++++++++++++ Testing/Fa/CMakeLists.txt | 5 ++++ 2 files changed, 53 insertions(+) create mode 100644 Testing/Fa/0000132-jpg.cxx diff --git a/Testing/Fa/0000132-jpg.cxx b/Testing/Fa/0000132-jpg.cxx new file mode 100644 index 0000000000..126fda2718 --- /dev/null +++ b/Testing/Fa/0000132-jpg.cxx @@ -0,0 +1,48 @@ +/*========================================================================= + + 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. + +=========================================================================*/ + +#include "otbVectorImage.h" +#include "otbImageFileReader.h" + +//Code adapted from submission from Jordi INGLADA +// http://bugs.orfeo-toolbox.org/view.php?id=132 + +int main( int argc, char *argv[] ) +{ + if (argc < 1) + { + std::cout << "Usage : inputImage" << std::endl ; + return EXIT_FAILURE; + } + + char * filename = argv[1]; + + typedef double PixelType; + typedef otb::VectorImage< PixelType > ImageType; + typedef otb::ImageFileReader<ImageType> ReaderType; + + // check for input images + ReaderType::Pointer reader = ReaderType::New(); + reader->SetFileName(inputFilename); + reader->UpdateOutputInformation(); + std::cout << reader << std::endl; + + return EXIT_SUCCESS; +} + + diff --git a/Testing/Fa/CMakeLists.txt b/Testing/Fa/CMakeLists.txt index fc70358d0b..33a539640a 100644 --- a/Testing/Fa/CMakeLists.txt +++ b/Testing/Fa/CMakeLists.txt @@ -215,6 +215,8 @@ ADD_TEST(FA-0000041-mean_shift2 ${CXX_TEST_PATH}/0000041-mean_shift ${TEMP}/boundary_of_labelled_image2.tif ) +ADD_TEST(FA-0000132-jpg ${INPUTDATA}/toulouse_auat.jpg + ) # ------- Vectorization issue ----------------------------------- # FIXME Desactivated until http://bugs.orfeo-toolbox.org/view.php?id=94 # has somebody working on it @@ -236,6 +238,9 @@ TARGET_LINK_LIBRARIES(StreamingStat OTBFeatureExtraction OTBIO OTBCommon) ADD_EXECUTABLE(0000041-mean_shift 0000041-mean_shift.cxx) TARGET_LINK_LIBRARIES(0000041-mean_shift OTBIO OTBCommon OTBBasicFilters) +ADD_EXECUTABLE(0000132-jpg 0000132-jpg.cxx ) +TARGET_LINK_LIBRARIES(0000132-jpg OTBIO OTBVisu) + ADD_EXECUTABLE(PolygonsVectorization PolygonsVectorization.cxx) TARGET_LINK_LIBRARIES(PolygonsVectorization OTBIO OTBCommon) -- GitLab