27 #include "../Config.h" 32 #define BOOST_TEST_NO_MAIN 33 #include <boost/test/unit_test.hpp> 41 std::map<std::string, std::string> auxRasterInfo;
43 auxRasterInfo[
"URI"] = TERRALIB_DATA_DIR
"/geotiff/cbers2b_rgb342_crop.tif";
46 BOOST_CHECK( lowResRasterPtr.get() );
48 auxRasterInfo[
"URI"] = TERRALIB_DATA_DIR
"/geotiff/cbers2b_hrc_crop.tif";
51 BOOST_CHECK( highResRasterPtr.get() );
58 algoInputParams.m_lowResRasterRedBandIndex = 0;
59 algoInputParams.m_lowResRasterGreenBandIndex = 1;
60 algoInputParams.m_lowResRasterBlueBandIndex = 2;
61 algoInputParams.m_highResRasterPtr = highResRasterPtr.get();
62 algoInputParams.m_highResRasterBand = 0;
63 algoInputParams.m_enableProgress =
false;
65 algoInputParams.m_RGBMin = 0;
66 algoInputParams.m_RGBMax = 0;
70 algoOutputParams.
m_rInfo[
"URI"] =
71 "terralib_unittest_rp_fusion_ihs.tif";
72 algoOutputParams.
m_rType =
"GDAL";
78 BOOST_CHECK( algorithmInstance.
initialize( algoInputParams ) );
79 BOOST_CHECK( algorithmInstance.
execute( algoOutputParams ) );
86 std::map<std::string, std::string> auxRasterInfo;
88 auxRasterInfo[
"URI"] = TERRALIB_DATA_DIR
"/geotiff/cbers2b_rgb342_crop.tif";
91 BOOST_CHECK( lowResRasterPtr.get() );
93 auxRasterInfo[
"URI"] = TERRALIB_DATA_DIR
"/geotiff/cbers2b_hrc_crop.tif";
96 BOOST_CHECK( highResRasterPtr.get() );
103 algoInputParams.m_lowResRasterBands.push_back( 0 );
104 algoInputParams.m_lowResRasterBands.push_back( 1 );
105 algoInputParams.m_lowResRasterBands.push_back( 2 );
106 algoInputParams.m_highResRasterPtr = highResRasterPtr.get();
107 algoInputParams.m_highResRasterBand = 0;
108 algoInputParams.m_enableProgress =
true;
109 algoInputParams.m_enableThreadedProcessing =
false;
114 algoOutputParams.
m_rInfo[
"URI"] =
115 "terralib_unittest_rp_fusion_pca.tif";
116 algoOutputParams.
m_rType =
"GDAL";
122 BOOST_CHECK( algorithmInstance.
initialize( algoInputParams ) );
123 BOOST_CHECK( algorithmInstance.
execute( algoOutputParams ) );
130 std::map<std::string, std::string> auxRasterInfo;
132 auxRasterInfo[
"URI"] = TERRALIB_DATA_DIR
"/geotiff/cbers2b_rgb342_crop.tif";
135 BOOST_CHECK( lowResRasterPtr.get() );
137 auxRasterInfo[
"URI"] = TERRALIB_DATA_DIR
"/geotiff/cbers2b_hrc_crop.tif";
140 BOOST_CHECK( highResRasterPtr.get() );
147 algoInputParams.m_lowResRasterBands.push_back( 0 );
148 algoInputParams.m_lowResRasterBands.push_back( 1 );
149 algoInputParams.m_lowResRasterBands.push_back( 2 );
153 algoInputParams.m_highResRasterPtr = highResRasterPtr.get();
154 algoInputParams.m_highResRasterBand = 0;
156 algoInputParams.m_hiResRasterWaveletLevels = 0;
157 algoInputParams.m_enableProgress =
true;
163 algoOutputParams.
m_rInfo[
"URI"] =
164 "terralib_unittest_rp_fusion_wisper.tif";
165 algoOutputParams.
m_rType =
"GDAL";
171 BOOST_CHECK( algorithmInstance.
initialize( algoInputParams ) );
172 BOOST_CHECK( algorithmInstance.
execute( algoOutputParams ) );
175 BOOST_AUTO_TEST_SUITE_END()
bool execute(AlgorithmOutputParameters &outputParams)
Executes the algorithm using the supplied parameters.
Near neighborhood interpolation method.
std::map< std::string, std::string > m_rInfo
The necessary information to create the output rasters (as described in te::raster::RasterFactory).
std::string m_rType
Output raster data source type (as described in te::raster::RasterFactory ).
Fusion of a low-resolution multi-band image with a high resolution image using the WiSpeR method...
Fusion of a low-resolution multi-band image with a high resolution image using the IHS method...
IHSFusion output parameters.
std::string m_rType
Output raster data source type (as described in te::raster::RasterFactory ).
BOOST_AUTO_TEST_SUITE(fusion_tests) BOOST_AUTO_TEST_CASE(ihs_test)
bool initialize(const AlgorithmInputParameters &inputParams)
Initialize the algorithm instance making it ready for execution.
PCAFusion output parameters.
Fusion of a low-resolution multi-band image with a high resolution image using the PCA (Principal com...
WisperFusion output parameters.
BOOST_AUTO_TEST_CASE(pca_test)
bool execute(AlgorithmOutputParameters &outputParams)
Executes the algorithm using the supplied parameters.
bool execute(AlgorithmOutputParameters &outputParams)
Executes the algorithm using the supplied parameters.
bool initialize(const AlgorithmInputParameters &inputParams)
Initialize the algorithm instance making it ready for execution.
This file contains include headers for the TerraLib Raster Processing module.
std::map< std::string, std::string > m_rInfo
The necessary information to create the output rasters (as described in te::raster::RasterFactory).
std::map< std::string, std::string > m_rInfo
The necessary information to create the output rasters (as described in te::raster::RasterFactory).
std::string m_rType
Output raster data source type (as described in te::raster::RasterFactory ).
bool initialize(const AlgorithmInputParameters &inputParams)
Initialize the algorithm instance making it ready for execution.
static Raster * open(const std::map< std::string, std::string > &rinfo, te::common::AccessPolicy p=te::common::RAccess)
It opens a raster with the given parameters and default raster driver.