Commit 1120b0d9 authored by Rashad Kanavath's avatar Rashad Kanavath

Merge branches 'develop' and 'app_domain_transform' of...

Merge branches 'develop' and 'app_domain_transform' of https://git.orfeo-toolbox.org/git/otb into app_domain_transform
parents d3651dc7 2bfceddc
......@@ -169,6 +169,11 @@ set(OTB_MODULES_ENABLED "")
set(OTB_MODULES_DISABLED "")
foreach(otb-module ${OTB_MODULES_ALL})
if(${otb-module}_ENABLED)
# check cxx11 requirement after all enable/disable macros have been passed
if(OTB_MODULE_${otb-module}_REQUIRES_CXX11 AND NOT OTB_HAS_CXX11)
message(FATAL_ERROR "Module ${otb-module} requires C++11 support. Consider adding --std=c++11 to your compiler flags or disabling it.")
endif()
list(APPEND OTB_MODULES_ENABLED ${otb-module})
# We will sort modules according to their dependency graph,
......
......@@ -336,7 +336,5 @@ macro(otb_module_target _name)
endmacro()
macro(otb_module_requires_cxx11)
if(${otb-module}_ENABLED AND NOT ${OTB_HAS_CXX11})
message(FATAL_ERROR "Module ${otb-module} requires C++11 support. Consider adding --std=c++11 to your compiler flags or disabling it.")
endif()
set(OTB_MODULE_${otb-module}_REQUIRES_CXX11 1)
endmacro()
......@@ -385,8 +385,6 @@ $ make install
\hline
\textbf{OTB\_USE\_MUPARSERX} & OTBMuParserX & OTBMathParserX OTBAppMathParserX \\
\hline
\textbf{OTB\_USE\_OPENJPEG} & OTBOpenJPEG & OTBIOJPEG2000 \\
\hline
\textbf{OTB\_USE\_CURL} & OTBCurl & \\
\hline
\textbf{OTB\_USE\_MUPARSER} & OTBMuParser & OTBMathParser OTBDempsterShafer OTBAppClassification OTBAppMathParser OTBAppStereo OTBAppProjection OTBAppSegmentation OTBAppClassification OTBRoadExtraction OTBRCC8 OTBCCOBIA OTBAppSegmentation OTBMeanShift OTBAppSegmentation OTBMeanShift OTBAppSegmentation \\
......
......@@ -22,6 +22,7 @@
#include "otbStatisticsXMLFileWriter.h"
#include "otbGeometriesProjectionFilter.h"
#include "otbGeometriesSet.h"
#include "otbWrapperElevationParametersHandler.h"
namespace otb
{
......@@ -104,7 +105,9 @@ private:
SetParameterDescription("layer", "Layer index to read in the input vector file.");
MandatoryOff("layer");
SetDefaultParameterInt("layer",0);
ElevationParametersHandler::AddElevationParameters(this, "elev");
AddRAMParameter();
// Doc example parameter settings
......@@ -125,6 +128,8 @@ private:
otb::ogr::DataSource::New(this->GetParameterString("vec"));
std::string fieldName = this->GetParameterString("field");
otb::Wrapper::ElevationParametersHandler::SetupDEMHandlerFromElevationParameters(this,"elev");
// Reproject geometries
FloatVectorImageType::Pointer inputImg = this->GetParameterImage("in");
std::string imageProjectionRef = inputImg->GetProjectionRef();
......
......@@ -23,6 +23,7 @@
#include "otbRandomSampler.h"
#include "otbGeometriesProjectionFilter.h"
#include "otbGeometriesSet.h"
#include "otbWrapperElevationParametersHandler.h"
namespace otb
{
......@@ -204,6 +205,8 @@ private:
MandatoryOff("layer");
SetDefaultParameterInt("layer",0);
ElevationParametersHandler::AddElevationParameters(this, "elev");
AddRAMParameter();
AddRANDParameter();
......@@ -227,6 +230,8 @@ private:
m_Periodic->GetFilter()->ClearOutputs();
m_Random->GetFilter()->ClearOutputs();
otb::Wrapper::ElevationParametersHandler::SetupDEMHandlerFromElevationParameters(this,"elev");
// Setup ram
m_Periodic->GetStreamer()->SetAutomaticAdaptativeStreaming(GetParameterInt("ram"));
m_Random->GetStreamer()->SetAutomaticAdaptativeStreaming(GetParameterInt("ram"));
......
......@@ -145,6 +145,7 @@ int otbWrapperApplicationDocTest(int argc, char* argv[])
}
}
}
ApplicationRegistry::CleanRegistry();
if( !isOK )
return EXIT_FAILURE;
......
......@@ -650,23 +650,6 @@ otb_add_test(NAME ioTvMultiChannelROI_p1_06_JPEG2000_2_TIF_res0 COMMAND otbIma
${TEMP}/ioExtractROI_JPEG2K_2_TIF_p1_06_OUT.tif
)
# Only do the following test if we are using the OTB Openjpeg driver,
# because gdal does not report jpeg2000 overview with size < 128
# pixel, and will therefore interpolate.
if(OTB_USE_OPENJPEG)
# Read an area inside one tile at resolution 4 (jpeg2000 conformance file with
# specific tile size at different resolution).
otb_add_test(NAME ioTvMultiChannelROI_p1_06_JPEG2000_2_TIF_res4 COMMAND otbImageBaseTestDriver
--compare-image ${EPSILON_9} ${BASELINE}/ioExtractROI_JPEG2K_2_TIF_p1_06_res4.tif
${TEMP}/ioExtractROI_JPEG2K_2_TIF_p1_06_res4_OUT.tif
otbMultiChannelExtractROI
${INPUTDATA}/jpeg2000_conf_p1_06.j2k?&resol=4
${TEMP}/ioExtractROI_JPEG2K_2_TIF_p1_06_res4_OUT.tif
)
endif()
# Read an area inside one tile at resolution 0 (quite similar coding parameter with pleiade
# except it a lossless image with no quatization style).
otb_add_test(NAME ioTvMultiChannelROI_lena_JPEG2000_2_TIF_res0 COMMAND otbImageBaseTestDriver
......
......@@ -203,26 +203,22 @@ PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType
labelListSample->SetMeasurementVectorSize(m_ThreadLabelListSample[0]->GetMeasurementVectorSize());
// Copy the first thread elements into lists
if( this->GetNumberOfThreads() > 1 )
ListSampleType* threadListSample = m_ThreadListSample[0];
LabelListSampleType* threadLabelListSample = m_ThreadLabelListSample[0];
SamplesPositionType& threadSamplesPosition = m_ThreadSamplesPosition[0];
for (unsigned int i = 0; i < threadListSample->Size(); ++i)
{
ListSampleType* threadListSample = m_ThreadListSample[0];
LabelListSampleType* threadLabelListSample = m_ThreadLabelListSample[0];
SamplesPositionType& threadSamplesPosition = m_ThreadSamplesPosition[0];
for (unsigned int i = 0; i < threadListSample->Size(); ++i)
{
listSample->PushBack( threadListSample->GetMeasurementVector(i) );
labelListSample->PushBack( threadLabelListSample->GetMeasurementVector(i) );
samplesPosition.push_back( threadSamplesPosition[i] );
}
listSample->PushBack( threadListSample->GetMeasurementVector(i) );
labelListSample->PushBack( threadLabelListSample->GetMeasurementVector(i) );
samplesPosition.push_back( threadSamplesPosition[i] );
}
// Add the other thread element checking if the point dosn't already exist
for (itk::ThreadIdType threadId = 1; threadId < this->GetNumberOfThreads(); ++threadId )
{
ListSampleType* threadListSample = m_ThreadListSample[threadId];
LabelListSampleType* threadLabelListSample = m_ThreadLabelListSample[threadId];
SamplesPositionType& threadSamplesPosition = m_ThreadSamplesPosition[threadId];
threadListSample = m_ThreadListSample[threadId];
threadLabelListSample = m_ThreadLabelListSample[threadId];
threadSamplesPosition = m_ThreadSamplesPosition[threadId];
for (unsigned int i = 0; i < threadListSample->Size(); ++i)
{
......
......@@ -186,6 +186,9 @@ OverlapSaveConvolutionImageFilter<TInputImage, TOutputImage, TBoundaryCondition>
unsigned int leftskip = static_cast<unsigned int>(std::max(0L, inputIndex[0] - pieceIndex[0]));
unsigned int topskip = pieceSize[0] * static_cast<unsigned int>(std::max(0L, inputIndex[1] - pieceIndex[1]));
// zero filling
memset(inputPiece,0,pieceNbOfPixel * sizeof(InputPixelType));
// Filling the buffer with image values
for (l = 0; l < inputSize[1]; ++l)
{
......@@ -205,6 +208,9 @@ OverlapSaveConvolutionImageFilter<TInputImage, TOutputImage, TBoundaryCondition>
filterPieceFFT,
FFTW_MEASURE);
// zero filling
memset(resampledFilterPiece,0,pieceNbOfPixel * sizeof(InputPixelType));
k = 0;
// Filling the buffer with filter values
for (j = 0; j < sizeOfFilter[1]; ++j)
......
project(OTBIOJPEG2000)
set(OTBIOJPEG2000_LIBRARIES OTBIOJPEG2000)
otb_module_impl()
/*=========================================================================
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.
=========================================================================*/
#ifndef otbJPEG2000ImageIO_h
#define otbJPEG2000ImageIO_h
#include "otbImageIOBase.h"
#include "itkMultiThreader.h"
#include <boost/shared_ptr.hpp>
namespace otb
{
class JPEG2000InternalReader;
class JPEG2000TileCache;
/** \class JPEG2000ImageIO
*
* \brief ImageIO object for reading and writing JPEG2000 format images
*
* The streaming (read and write) is implemented.
*
* \ingroup IOFilters
*
*
* \ingroup OTBIOJPEG2000
*/
class ITK_EXPORT JPEG2000ImageIO : public otb::ImageIOBase
{
public:
/** Standard class typedefs. */
typedef JPEG2000ImageIO Self;
typedef otb::ImageIOBase Superclass;
typedef itk::SmartPointer<Self> Pointer;
/** Method for creation through the object factory. */
itkNewMacro(Self);
/** Run-time type information (and related methods). */
itkTypeMacro(JPEG2000ImageIO, otb::ImageIOBase);
/*-------- This part of the interface deals with reading data. ------ */
/** Determine the file type. Returns true if this ImageIO can read the
* file specified. */
bool CanReadFile(const char*) ITK_OVERRIDE;
/** Determine the file type. Returns true if the ImageIO can stream read the specified file */
bool CanStreamRead() ITK_OVERRIDE
{
return true;
}
/** Set the spacing and dimension information for the set filename. */
void ReadImageInformation() ITK_OVERRIDE;
/** Get description about overviews available into the file specified */
std::vector<std::string> GetOverviewsInfo() ITK_OVERRIDE;
/** Provide hist about the output container to deal with complex pixel
* type (Not used here) */
void SetOutputImagePixelType( bool itkNotUsed(isComplexInternalPixelType),
bool itkNotUsed(isVectorImage)) ITK_OVERRIDE{}
/** Get number of available overviews in the jpeg2000 file
* ( if return = 0 => no overviews available because only one resolution
* is encoded in the file) */
unsigned int GetOverviewsCount() ITK_OVERRIDE;
/** Reads the data from disk into the memory buffer provided. */
void Read(void* buffer) ITK_OVERRIDE;
/** Reads 3D data from multiple files assuming one slice per file. */
virtual void ReadVolume(void* buffer);
/*-------- This part of the interfaces deals with writing data. ----- */
/** Determine the file type. Returns true if this ImageIO can read the
* file specified. */
bool CanWriteFile(const char*) ITK_OVERRIDE;
/** Determine the file type. Returns true if the ImageIO can stream write the specified file */
bool CanStreamWrite() ITK_OVERRIDE
{
return true;
}
/** Writes the spacing and dimensions of the image.
* Assumes SetFileName has been called with a valid file name. */
void WriteImageInformation() ITK_OVERRIDE;
/** Writes the data to disk from the memory buffer provided. Make sure
* that the IORegion has been set properly. */
void Write(const void* buffer) ITK_OVERRIDE;
/** Return the multithreader used by this class. */
itk::MultiThreader * GetMultiThreader()
{return m_Threader; }
itkSetMacro(ResolutionFactor, unsigned int);
itkGetMacro(ResolutionFactor, unsigned int);
itkSetMacro(CacheSizeInByte, unsigned int);
itkGetMacro(CacheSizeInByte, unsigned int);
protected:
/** Constructor.*/
JPEG2000ImageIO();
/** Destructor.*/
~JPEG2000ImageIO() ITK_OVERRIDE;
void PrintSelf(std::ostream& os, itk::Indent indent) const ITK_OVERRIDE;
typedef std::vector<boost::shared_ptr<JPEG2000InternalReader> > ReaderVectorType;
ReaderVectorType m_InternalReaders;
boost::shared_ptr<JPEG2000TileCache> m_TileCache;
private:
JPEG2000ImageIO(const Self &); //purposely not implemented
void operator =(const Self&); //purposely not implemented
/** Compute the tile index list from the GetRegion*/
std::vector<unsigned int> ComputeTileList();
/** pixel nb of octets */
unsigned int m_BytePerPixel;
/** Resolution factor*/
unsigned int m_ResolutionFactor;
/** Size of the cache used to reduce number of decoding operations*/
unsigned int m_CacheSizeInByte;
/** Load data from a tile into the buffer. 2nd argument is a
* pointer to opj_image_t, hidden in void * to avoid forward declaration. */
void LoadTileData(void * buffer, void * tile);
/** Support processing data in multiple threads. Used by subclasses
* (e.g., ImageSource). */
itk::MultiThreader::Pointer m_Threader;
int m_NumberOfThreads;
/** Static function used as a "callback" by the MultiThreader. The threading
* library will call this routine for each thread, which will delegate the
* control to ThreadedGenerateData(). */
static ITK_THREAD_RETURN_TYPE ThreaderCallback( void *arg );
/** Configure cache manager */
void ConfigureCache();
};
} // end namespace otb
#endif // otbJPEG2000ImageIO_h
/*=========================================================================
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.
=========================================================================*/
#ifndef otbJPEG2000ImageIOFactory_h
#define otbJPEG2000ImageIOFactory_h
#include "itkObjectFactoryBase.h"
namespace otb
{
/** \class JPEG2000ImageIOFactory
* \brief Create instances of JPEG2000ImageIO objects using an object factory.
*
* \ingroup OTBIOJPEG2000
*/
class ITK_EXPORT JPEG2000ImageIOFactory : public itk::ObjectFactoryBase
{
public:
/** Standard class typedefs. */
typedef JPEG2000ImageIOFactory Self;
typedef itk::ObjectFactoryBase Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
/** Class methods used to interface with the registered factories. */
const char* GetITKSourceVersion(void) const ITK_OVERRIDE;
const char* GetDescription(void) const ITK_OVERRIDE;
/** Method for class instantiation. */
itkFactorylessNewMacro(Self);
static JPEG2000ImageIOFactory * FactoryNew() { return new JPEG2000ImageIOFactory; }
/** Run-time type information (and related methods). */
itkTypeMacro(JPEG2000ImageIOFactory, itk::ObjectFactoryBase);
/** Register one factory of this type */
static void RegisterOneFactory(void)
{
JPEG2000ImageIOFactory::Pointer JPEG2000Factory = JPEG2000ImageIOFactory::New();
itk::ObjectFactoryBase::RegisterFactory(JPEG2000Factory);
}
protected:
JPEG2000ImageIOFactory();
~JPEG2000ImageIOFactory() ITK_OVERRIDE;
private:
JPEG2000ImageIOFactory(const Self &); //purposely not implemented
void operator =(const Self&); //purposely not implemented
};
} // end namespace otb
#endif
set(DOCUMENTATION "This module contains features to read and write JPEG2000
format images.")
otb_module(OTBIOJPEG2000
DEPENDS
OTBITK
OTBImageBase
OTBOSSIMAdapters
OTBCommon
OTBTinyXML
OTBOpenJPEG
OTBBoost
OTBGDAL
TEST_DEPENDS
OTBTestKernel
OTBImageIO
OTBImageManipulation
DESCRIPTION
"${DOCUMENTATION}"
)
set(OTBIOJPEG2000_SRC
otbJPEG2000ImageIO.cxx
otbJPEG2000ImageIOFactory.cxx
)
add_library(OTBIOJPEG2000 ${OTBIOJPEG2000_SRC})
target_link_libraries(OTBIOJPEG2000
${OTBTinyXML_LIBRARIES}
${OTBImageBase_LIBRARIES}
${OTBOSSIMAdapters_LIBRARIES}
${OTBCommon_LIBRARIES}
${OTBOpenJPEG_LIBRARIES}
${OTBBoost_LIBRARIES}
${OTBGDAL_LIBRARIES}
)
otb_module_target(OTBIOJPEG2000)
This diff is collapsed.
/*=========================================================================
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 "otbJPEG2000ImageIOFactory.h"
#include "itkCreateObjectFunction.h"
#include "otbJPEG2000ImageIO.h"
#include "itkVersion.h"
namespace otb
{
JPEG2000ImageIOFactory::JPEG2000ImageIOFactory()
{
this->RegisterOverride("otbImageIOBase",
"otbJPEG2000ImageIO",
"JPEG2000 Image IO",
1,
itk::CreateObjectFunction<JPEG2000ImageIO>::New());
}
JPEG2000ImageIOFactory::~JPEG2000ImageIOFactory()
{
}
const char*
JPEG2000ImageIOFactory::GetITKSourceVersion(void) const
{
return ITK_SOURCE_VERSION;
}
const char*
JPEG2000ImageIOFactory::GetDescription() const
{
return "JPEG2000 ImageIO Factory, allows the loading of JPEG2000 images into insight";
}
// Undocumented API used to register during static initialization.
// DO NOT CALL DIRECTLY.
static bool JPEG2000ImageIOFactoryHasBeenRegistered;
void JPEG2000ImageIOFactoryRegister__Private(void)
{
if( ! JPEG2000ImageIOFactoryHasBeenRegistered )
{
JPEG2000ImageIOFactoryHasBeenRegistered = true;
JPEG2000ImageIOFactory::RegisterOneFactory();
}
}
} // end namespace otb
otb_module_test()
set(OTBIOJPEG2000Tests
otbIOJPEG2000TestDriver.cxx
otbJPEG2000ImageIOTestCanWrite.cxx
otbJPEG2000ImageIOTestCanRead.cxx
otbGenerateClassicalQLWithJPEG2000.cxx
)
add_executable(otbIOJPEG2000TestDriver ${OTBIOJPEG2000Tests})
target_link_libraries(otbIOJPEG2000TestDriver ${OTBIOJPEG2000-Test_LIBRARIES})
otb_module_target_label(otbIOJPEG2000TestDriver)
# Tests Declaration
otb_add_test(NAME ioTuJP2ImageIOCanRead COMMAND otbIOJPEG2000TestDriver
otbJPEG2000ImageIOTestCanRead
LARGEINPUT{JPEG2000/QB_multicomp.jpx}
)
otb_add_test(NAME ioTuJ2KImageIOCanRead COMMAND otbIOJPEG2000TestDriver
otbJPEG2000ImageIOTestCanRead
${INPUTDATA}/bretagne.j2k
)
otb_add_test(NAME ioTvJPEG2000ImageIO_CacheSize_500 COMMAND otbIOJPEG2000TestDriver
--compare-image ${EPSILON_9}
${BASELINE}/ioClassicalQLJPEG2K_bretagne.tif
${TEMP}/ioClassicalQLJPEG2K_bretagne_500.tif
otbGenerateClassicalQLWithJPEG2000
${INPUTDATA}/bretagne.j2k
${TEMP}/ioClassicalQLJPEG2K_bretagne_500.tif
500)
otb_add_test(NAME ioTvJPEG2000ImageIO_CacheSize_5000 COMMAND otbIOJPEG2000TestDriver
--compare-image ${EPSILON_9}
${BASELINE}/ioClassicalQLJPEG2K_bretagne.tif
${TEMP}/ioClassicalQLJPEG2K_bretagne_5000.tif
otbGenerateClassicalQLWithJPEG2000
${INPUTDATA}/bretagne.j2k
${TEMP}/ioClassicalQLJPEG2K_bretagne_5000.tif
5000)
otb_add_test(NAME ioTvJPEG2000ImageIO_CacheSize_1000 COMMAND otbIOJPEG2000TestDriver
--compare-image ${EPSILON_9}
${BASELINE}/ioClassicalQLJPEG2K_bretagne.tif
${TEMP}/ioClassicalQLJPEG2K_bretagne_1000.tif
otbGenerateClassicalQLWithJPEG2000
${INPUTDATA}/bretagne.j2k
${TEMP}/ioClassicalQLJPEG2K_bretagne_1000.tif
1000)
otb_add_test(NAME ioTvJPEG2000ImageIO_CacheSize_25000 COMMAND otbIOJPEG2000TestDriver
--compare-image ${EPSILON_9}
${BASELINE}/ioClassicalQLJPEG2K_bretagne.tif
${TEMP}/ioClassicalQLJPEG2K_bretagne_OUT.tif
otbGenerateClassicalQLWithJPEG2000
${INPUTDATA}/bretagne.j2k
${TEMP}/ioClassicalQLJPEG2K_bretagne_OUT.tif)
if(OTB_DATA_USE_LARGEINPUT)
set( GenericTestPHR_TESTNB 0)
foreach( current_file ${GenericTestPHR_DATA_INPUTS} )
list(GET GenericTestPHR_DATA_TYPES ${GenericTestPHR_TESTNB} current_type )
math(EXPR GenericTestPHR_TESTNB "${GenericTestPHR_TESTNB} + 1")
string(REGEX MATCH "TIFF" PHR_TIFF_FILE ${current_type})
if(NOT PHR_TIFF_FILE)
# CanRead
otb_add_test(NAME ioTuJ2KImageIOCanRead_${current_type} COMMAND otbIOJPEG2000TestDriver
otbJPEG2000ImageIOTestCanRead
${current_file}
)
endif()
endforeach()
endif()
/*=========================================================================
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 "otbImageFileReader.h"
#include "otbImageFileWriter.h"
#include "otbVectorImage.h"
#include "otbStreamingShrinkImageFilter.h"
#include "otbJPEG2000ImageIO.h"
int otbGenerateClassicalQLWithJPEG2000(int argc, char * argv[])
{
char * inputFilename = argv[1];
char * outputFilename = argv[2];
unsigned int cacheSize = 0;
if (argc == 4)
cacheSize = atoi(argv[3]) * 1000;
const unsigned int Dimension = 2;
typedef unsigned int PixelType;
typedef otb::VectorImage<PixelType, Dimension> ImageType;
typedef otb::ImageFileReader<ImageType> ReaderType;
typedef otb::ImageFileWriter<ImageType> WriterType;
typedef otb::StreamingShrinkImageFilter<ImageType, ImageType> ShrinkType;
ReaderType::Pointer reader = ReaderType::New();
ShrinkType::Pointer shrink = ShrinkType::New();
WriterType::Pointer writer = WriterType::New();
reader->SetFileName(inputFilename);
otb::JPEG2000ImageIO::Pointer imageIO = otb::JPEG2000ImageIO::New();
reader->SetImageIO(imageIO);
imageIO->SetCacheSizeInByte(cacheSize);
reader->GenerateOutputInformation();
writer->SetFileName(outputFilename);
shrink->SetShrinkFactor(10);
shrink->SetInput(reader->GetOutput());
shrink->Update();
writer->SetInput(shrink->GetOutput());
writer->Update();
return EXIT_SUCCESS;
}
#include "otbTestMain.h"
void RegisterTests()
{
REGISTER_TEST(otbJPEG2000ImageIOTestCanWrite);
REGISTER_TEST(otbJPEG2000ImageIOTestCanRead);
REGISTER_TEST(otbGenerateClassicalQLWithJPEG2000);
}
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$