Skip to content
Snippets Groups Projects
Commit 5c85ce0f authored by Julien Michel's avatar Julien Michel
Browse files

ENH: (Visu Refactoring) Additional layer generator tests

parent c911feed
No related branches found
No related tags found
No related merge requests found
......@@ -164,6 +164,11 @@ ${INPUTDATA}/couleurs.tif
1
)
ADD_TEST(vrTvImageLayerGeneratorVector ${VISUREFAC_TESTS1}
otbImageLayerGeneratorVector
${INPUTDATA}/couleurs.tif
1
)
# Testing srcs
SET(VisuRefac_SRCS1
......@@ -186,6 +191,7 @@ otbBlendingImageFilter.cxx
otbImageViewerModelNew.cxx
otbImageLayerGeneratorNew.cxx
otbImageLayerGeneratorScalar.cxx
otbImageLayerGeneratorVector.cxx
)
# Building testing executables
......
/*=========================================================================
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 "otbImageLayerGenerator.h"
#include "otbImageLayer.h"
#include "otbVectorImage.h"
#include "otbImageFileReader.h"
int otbImageLayerGeneratorVector( int argc, char * argv[] )
{
typedef otb::VectorImage<double,2> ImageType;
typedef otb::ImageFileReader<ImageType> ReaderType;
typedef otb::ImageLayer<ImageType> LayerType;
typedef otb::ImageLayerGenerator<LayerType> GeneratorType;
// Reading input image
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName(argv[1]);
// Generator
GeneratorType::Pointer generator = GeneratorType::New();
generator->SetImage(reader->GetOutput());
generator->SetGenerateQuicklook(atoi(argv[2]));
std::cout<<"Advised quicklook susbsampling rate: "<<generator->GetOptimalSubSamplingRate()<<std::endl;
generator->GenerateLayer();
return EXIT_SUCCESS;
}
......@@ -45,4 +45,5 @@ void RegisterTests()
REGISTER_TEST(otbImageViewerModelNew);
REGISTER_TEST(otbImageLayerGeneratorNew);
REGISTER_TEST(otbImageLayerGeneratorScalar);
REGISTER_TEST(otbImageLayerGeneratorVector);
}
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