20 std::cout <<
"Linear Contrast example using Raster Processing module." << std::endl << std::endl;
23 std::map<std::string, std::string> rinfo;
24 rinfo[
"URI"] = TERRALIB_DATA_DIR
"/geotiff/cbers2b_rgb342_crop.tif";
28 bool executeok =
false;
31 std::cout <<
"Using Linear Contrast" << std::endl;
34 std::map<std::string, std::string> orinfo;
35 orinfo[
"URI"] = TERRALIB_DATA_DIR
"/geotiff/cbers2b_rgb342_crop_linear_contrast.tif";
55 initok = continstance.
initialize(contInputParameters );
58 executeok = continstance.
execute( contOutputParameters );
61 std::cout <<
"Problems in linear contrast." << std::endl;
68 std::cout <<
"Done!" << std::endl << std::endl;
70 std::cout <<
"Problems in contrast." << std::endl;
72 catch(
const std::exception& e)
74 std::cout << std::endl <<
"An exception has occurred in Contrast(): " << e.what() << std::endl;
78 std::cout << std::endl <<
"An unexpected exception has occurred in Contrast()!" << std::endl;
This file contains include headers for the memory data source of TerraLib.
These routines show how to use the RP (raster processing) module.
An abstract class for raster data strucutures.
virtual std::size_t getNumberOfBands() const =0
Returns the number of bands (dimension of cells attribute values) in the raster.
This file contains include headers for the TerraLib Raster Processing module.
bool initialize(const AlgorithmInputParameters &inputParams)
Initialize the algorithm instance making it ready for execution.
bool execute(AlgorithmOutputParameters &outputParams)
Executes the algorithm using the supplied parameters.
std::string m_createdOutRasterDSType
Output raster data source type (as described in te::raster::RasterFactory ), leave empty if the resul...
This file contains include headers for the Vector Geometry model of TerraLib.
This file contains include headers for the Data Access module of TerraLib.
Contrast output parameters.
std::map< std::string, std::string > m_createdOutRasterInfo
The necessary information to create the raster (as described in te::raster::RasterFactory), leave empty if the result must be written to the raster pointed m_outRasterPtr.
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.