Raster processing auxiliary functions. More...

Enumerations

enum  te::rp::WaveletAtrousFilterType { te::rp::InvalidWAFilter, te::rp::B3SplineWAFilter, te::rp::TriangleWAFilter }
 Wavelet Atrous Filter types. More...
 

Functions

bool te::rp::ComposeBands (te::rp::FeederConstRaster &feeder, const std::vector< unsigned int > &inputRasterBands, const te::rst::Interpolator::Method &interpMethod, const std::map< std::string, std::string > &outputRasterInfo, const std::string &outputDataSourceType, std::unique_ptr< te::rst::Raster > &outputRasterPtr)
 Compose a set of bands into one multi-band raster. More...
 
void te::rp::Convert2DoublesVector (void *inputVector, const int inputVectorDataType, unsigned int inputVectorSize, double *outputVector)
 Convert vector elements. More...
 
void te::rp::ConvertDoublesVector (double *inputVector, unsigned int inputVectorSize, const int outputVectorDataType, void *outputVector)
 Convert a doubles vector. More...
 
bool te::rp::ConvertHLS2RGB (const te::rst::Raster &inputHLSRaster, const unsigned int hueBandIdx, const unsigned int lightBandIdx, const unsigned int saturationBandIdx, const double rgbRangeMin, const double rgbRangeMax, te::rst::Raster &outputRGBRaster)
 HLS to RGB conversion. More...
 
bool te::rp::ConvertHLS2RGB (const te::rst::Raster &inputHRaster, const unsigned int hueBandIdx, const te::rst::Raster &inputLRaster, const unsigned int lightBandIdx, const te::rst::Raster &inputSRaster, const unsigned int saturationBandIdx, const double rgbRangeMin, const double rgbRangeMax, te::rst::Raster &outputRGBRaster)
 HLS to RGB conversion. More...
 
bool te::rp::ConvertIHS2RGB (const te::rst::Raster &inputIHSRaster, const unsigned int intensityBandIdx, const unsigned int hueBandIdx, const unsigned int saturationBandIdx, const double rgbRangeMin, const double rgbRangeMax, te::rst::Raster &outputRGBRaster)
 IHS to RGB conversion. More...
 
bool te::rp::ConvertIHS2RGB (const te::rst::Raster &inputIRaster, const unsigned int intensityBandIdx, const te::rst::Raster &inputHRaster, const unsigned int hueBandIdx, const te::rst::Raster &inputSRaster, const unsigned int saturationBandIdx, const double rgbRangeMin, const double rgbRangeMax, te::rst::Raster &outputRGBRaster)
 IHS to RGB conversion. More...
 
bool te::rp::ConvertRGB2HLS (const te::rst::Raster &inputRGBRaster, const unsigned int redBandIdx, const unsigned int greenBandIdx, const unsigned int blueBandIdx, const double rgbRangeMin, const double rgbRangeMax, te::rst::Raster &outputHLSRaster)
 RGB to HLS conversion. More...
 
bool te::rp::ConvertRGB2HLS (const te::rst::Raster &inputRedRaster, const unsigned int redBandIdx, const te::rst::Raster &inputGreenRaster, const unsigned int greenBandIdx, const te::rst::Raster &inputBlueRaster, const unsigned int blueBandIdx, const double rgbRangeMin, const double rgbRangeMax, te::rst::Raster &outputHLSRaster)
 RGB to HLS conversion. More...
 
bool te::rp::ConvertRGB2IHS (const te::rst::Raster &inputRGBRaster, const unsigned int redBandIdx, const unsigned int greenBandIdx, const unsigned int blueBandIdx, const double rgbRangeMin, const double rgbRangeMax, te::rst::Raster &outputIHSRaster)
 RGB to IHS conversion. More...
 
bool te::rp::ConvertRGB2IHS (const te::rst::Raster &inputRedRaster, const unsigned int redBandIdx, const te::rst::Raster &inputGreenRaster, const unsigned int greenBandIdx, const te::rst::Raster &inputBlueRaster, const unsigned int blueBandIdx, const double rgbRangeMin, const double rgbRangeMax, te::rst::Raster &outputIHSRaster)
 RGB to IHS conversion. More...
 
bool TERPEXPORT te::rp::Copy2DiskRaster (const te::rst::Raster &inputRaster, const std::string &fileName)
 Create a new raster into a GDAL datasource. More...
 
bool te::rp::CreateNewGdalRaster (const te::rst::Grid &rasterGrid, std::vector< te::rst::BandProperty * > bandsProperties, const std::string &fileName, RasterHandler &outRasterHandler)
 Create a new raster into a GDAL datasource. More...
 
bool te::rp::CreateNewGdalRaster (const te::rst::Grid &rasterGrid, std::vector< te::rst::BandProperty * > bandsProperties, const std::string &fileName, std::unique_ptr< te::rst::Raster > &outRasterPtr)
 Create a new raster into a GDAL datasource. More...
 
bool te::rp::CreateNewMemRaster (const te::rst::Grid &rasterGrid, std::vector< te::rst::BandProperty * > bandsProperties, RasterHandler &outRasterHandler)
 Create a new raster into a new memory datasource. More...
 
bool te::rp::CreateNewRaster (const te::rst::Grid &rasterGrid, const std::vector< te::rst::BandProperty * > &bandsProperties, const std::string &outDataSetName, const std::string &dataSourceType, RasterHandler &outRasterHandler)
 Create a new raster into the givem data source. More...
 
bool te::rp::CreateNewRaster (const te::rst::Grid &rasterGrid, const std::vector< te::rst::BandProperty * > &bandsProperties, const std::string &outDataSetName, te::da::DataSource &outDataSource, RasterHandler &outRasterHandler)
 Create a new raster into the givem data source. More...
 
bool TERPEXPORT te::rp::CreateNewRaster (const te::rst::Grid &rasterGrid, const std::vector< te::rst::BandProperty * > &bandsProperties, const std::map< std::string, std::string > &rasterInfo, const std::string &rasterType, std::unique_ptr< te::rst::Raster > &outRasterPtr)
 Create a new raster into the givem data source. More...
 
template<typename MatrixElementT >
bool te::rp::CreateRasterFileFromMatrix (const te::rp::Matrix< MatrixElementT > &matrix, const bool normalize, const std::string &fileName)
 Create a tiff file from a matrix. More...
 
boost::numeric::ublas::matrix< double > te::rp::CreateWaveletAtrousFilter (const WaveletAtrousFilterType &filterType)
 Create a Wavele Atrous Filter. More...
 
bool te::rp::DecomposeBands (const te::rst::Raster &inputRaster, const std::vector< unsigned int > &inputRasterBands, const std::vector< std::map< std::string, std::string > > &outputRastersInfos, const std::string &outputDataSourceType, std::vector< boost::shared_ptr< te::rst::Raster > > &outputRastersPtrs)
 Decompose a multi-band raster into a set of one-band rasters. More...
 
bool te::rp::DirectPrincipalComponents (const te::rst::Raster &inputRaster, const std::vector< unsigned int > &inputRasterBands, boost::numeric::ublas::matrix< double > &pcaMatrix, te::rst::Raster &pcaRaster, const std::vector< unsigned int > &pcaRasterBands, const unsigned int maxThreads)
 Generate all principal components from the given input raster. More...
 
bool te::rp::DirectWaveletAtrous (const te::rst::Raster &inputRaster, const std::vector< unsigned int > &inputRasterBands, te::rst::Raster &waveletRaster, const unsigned int levelsNumber, const boost::numeric::ublas::matrix< double > &filter)
 Generate all wavelet planes from the given input raster. More...
 
std::vector< std::string > te::rp::GetBandNames ()
 Returns a vector os with band's names. More...
 
bool te::rp::GetCovarianceValue (const te::rst::Band &band1, const te::rst::Band &band2, const unsigned int maxThreads, double const *const mean1ValuePtr, double const *const mean2ValuePtr, double &covarianceValue)
 Get the covariance of band pixel values. More...
 
void TERPEXPORT te::rp::GetDataTypeRange (const int dataType, double &min, double &max)
 Returns the real data type range (all values that can be represented by the given data type). More...
 
bool te::rp::GetDetailedExtent (const te::rst::Grid &grid, te::gm::LinearRing &detailedExtent)
 Create a datailed extent from the given grid. More...
 
std::pair< double, double > te::rp::GetDigitalNumberBandInfo (std::string bandName)
 Returns the maximun and minimum digital numbers of a given sensor/band. More...
 
double te::rp::GetDigitalNumberBandMax (std::string bandName)
 Returns the maximum digital number of a given sensor/band. More...
 
double te::rp::GetDigitalNumberBandMin (std::string bandName)
 Returns the minimum digital number of a given sensor/band. More...
 
bool te::rp::GetIndexedDetailedExtent (const te::rst::Grid &grid, te::gm::LinearRing &indexedDetailedExtent)
 Create a indexed (lines,columns) datailed extent from the given grid. More...
 
bool te::rp::GetMeanValue (const te::rst::Band &band, const unsigned int maxThreads, double &meanValue)
 Get the mean of band pixel values. More...
 
TERASTEREXPORT std::vector< te::gm::Point * > te::rst::GetRandomPointsInRaster (const te::rst::Raster &inputRaster, unsigned int numberOfPoints=1000)
 Creates a vector of random positions (points) inside the raster. More...
 
std::string te::rp::GetSensorFilename ()
 Returns a json filename with spectral sensors parameters. More...
 
std::map< std::string, SpectralSensorParams > te::rp::getSensorParams ()
 Returns a map with spectral sensors parameters defined in SpectralSensor.json file. More...
 
SpectralSensorParams te::rp::GetSpectralBandInfo (std::string bandName)
 Returns the maximun and minimum reflectance values of a given sensor/band. More...
 
TERPEXPORT double te::rp::GetSpectralBandMax (std::string bandName)
 Returns the maximum reflectance value of a given sensor/band. More...
 
TERPEXPORT double te::rp::GetSpectralBandMin (std::string bandName)
 Returns the minimum reflectance value of a given sensor/band. More...
 
bool te::rp::GetStdDevValue (const te::rst::Band &band, const unsigned int maxThreads, double const *const meanValuePtr, double &stdDevValue)
 Get the standard deviation of band pixel values. More...
 
bool te::rp::InversePrincipalComponents (const te::rst::Raster &pcaRaster, const boost::numeric::ublas::matrix< double > &pcaMatrix, te::rst::Raster &outputRaster, const std::vector< unsigned int > &outputRasterBands, const unsigned int maxThreads)
 Regenerate the original raster from its principal components. More...
 
bool te::rp::InverseWaveletAtrous (const te::rst::Raster &waveletRaster, const unsigned int levelsNumber, te::rst::Raster &outputRaster, const std::vector< unsigned int > &outputRasterBands)
 Regenerate the original raster from its wavelets planes. More...
 
bool te::rp::NormalizeRaster (te::rst::Raster &inputRaster, double nmin=0.0, double nmax=255.0)
 Normalizes one raster in a given interval. More...
 
te::rst::Rasterte::rp::NormalizeRaster (const te::rst::Raster *inputRaster)
 Normalizes a raster in a given interval. More...
 
bool te::rp::RasterSlicing (const te::rst::Raster &inputRaster, const unsigned int inputRasterBand, const bool createPaletteRaster, const unsigned int slicesNumber, const bool eqHistogram, const std::map< std::string, std::string > &rasterInfo, const std::string &rasterType, const bool enableProgress, std::vector< te::rst::BandProperty::ColorEntry > const *const palettePtr, std::unique_ptr< te::rst::Raster > &outRasterPtr, std::map< double, double > limits)
 Generate all wavelet planes from the given input raster. More...
 
bool te::rp::RemapValues (const te::rst::Raster &inputRaster, const std::vector< unsigned int > &inputRasterBands, const boost::numeric::ublas::matrix< double > &remapMatrix, te::rst::Raster &outputRaster, const std::vector< unsigned int > &outputRasterBands, const unsigned int maxThreads)
 Remap pixel values using a remap function matrix. More...
 
void te::rp::SaveSensorParams (std::map< std::string, SpectralSensorParams > &)
 Saves in SpectralSensor.json file the spectral sensors parameters. More...
 

Detailed Description

Raster processing auxiliary functions.

Enumeration Type Documentation

Wavelet Atrous Filter types.

Enumerator
InvalidWAFilter 

Invalid filter type.

B3SplineWAFilter 

Spline filter type.

TriangleWAFilter 

Triangle filter type.

Definition at line 73 of file src/terralib/rp/Functions.h.

Function Documentation

TERPEXPORT bool te::rp::ComposeBands ( te::rp::FeederConstRaster feeder,
const std::vector< unsigned int > &  inputRasterBands,
const te::rst::Interpolator::Method interpMethod,
const std::map< std::string, std::string > &  outputRasterInfo,
const std::string &  outputDataSourceType,
std::unique_ptr< te::rst::Raster > &  outputRasterPtr 
)

Compose a set of bands into one multi-band raster.

Parameters
feederInput rasters feeder.
inputRasterBandsInput raster bands (one band for each input raster).
interpMethodThe interpolator method to use.
outputRasterInfoOutput raster connection info.
outputDataSourceTypeOutput raster datasource type.
outputRasterPtrA pointer to the generated output raster.
Returns
true if OK, false on errors.
Note
The first raster Grid will be taken as reference for the composed raster.

Definition at line 3155 of file src/terralib/rp/Functions.cpp.

References te::rst::Grid::geoToGrid(), te::rst::Raster::getBand(), te::rp::FeederConstRaster::getCurrentObj(), te::rp::FeederConstRaster::getCurrentOffset(), te::rst::Raster::getGrid(), te::rst::Raster::getNumberOfBands(), te::rp::FeederConstRaster::getObjsCount(), te::rst::Raster::getSRID(), te::rst::Interpolator::getValue(), te::rst::Grid::gridToGeo(), te::rst::RasterFactory::make(), te::rp::FeederConstRaster::moveNext(), te::rp::FeederConstRaster::reset(), and te::rst::Band::setValue().

Referenced by BOOST_AUTO_TEST_CASE(), te::rp::CreateRasterFileFromMatrix(), and te::qt::widgets::ComposeBandsWizard::executeCompose().

void TERPEXPORT te::rp::Convert2DoublesVector ( void *  inputVector,
const int  inputVectorDataType,
unsigned int  inputVectorSize,
double *  outputVector 
)

Convert vector elements.

Parameters
inputVectorInput vector.
inputVectorDataTypeInput vector data type.
inputVectorSizeThe numer of input vector elements.
outputVectorA pré-allocated output vector.
Note
The types are listed in terralib/datatype/DataTypes.h

Definition at line 367 of file src/terralib/rp/Functions.cpp.

References te::dt::BIT_TYPE, te::dt::CDOUBLE_TYPE, te::dt::CFLOAT_TYPE, te::dt::CHAR_TYPE, te::dt::CINT16_TYPE, te::dt::CINT32_TYPE, te::dt::DOUBLE_TYPE, te::dt::FLOAT_TYPE, te::dt::INT16_TYPE, te::dt::INT32_TYPE, te::dt::INT64_TYPE, te::dt::UCHAR_TYPE, te::dt::UINT16_TYPE, te::dt::UINT32_TYPE, and te::dt::UINT64_TYPE.

Referenced by te::rp::GetCovarianceValueThread(), te::rp::GetDataTypeRange(), te::rp::GetMeanValueThread(), te::rp::GetStdDevValueThread(), te::rp::Contrast::remapBandLevels(), and te::rp::RemapValuesThread().

void TERPEXPORT te::rp::ConvertDoublesVector ( double *  inputVector,
unsigned int  inputVectorSize,
const int  outputVectorDataType,
void *  outputVector 
)

Convert a doubles vector.

Parameters
inputVectorInput vector.
inputVectorSizeThe numer of input vector elements.
inputVectorDataTypeInput vector data type.
outputVectorA pré-allocated output vector.
Note
The types are listed in terralib/datatype/DataTypes.h

Definition at line 474 of file src/terralib/rp/Functions.cpp.

References te::dt::BIT_TYPE, te::dt::CDOUBLE_TYPE, te::dt::CFLOAT_TYPE, te::dt::CHAR_TYPE, te::dt::CINT16_TYPE, te::dt::CINT32_TYPE, te::dt::DOUBLE_TYPE, te::dt::FLOAT_TYPE, te::dt::INT16_TYPE, te::dt::INT32_TYPE, te::dt::INT64_TYPE, te::dt::UCHAR_TYPE, te::dt::UINT16_TYPE, te::dt::UINT32_TYPE, and te::dt::UINT64_TYPE.

Referenced by te::rp::GetDataTypeRange(), te::rp::Contrast::remapBandLevels(), and te::rp::RemapValuesThread().

TERPEXPORT bool te::rp::ConvertHLS2RGB ( const te::rst::Raster inputHLSRaster,
const unsigned int  hueBandIdx,
const unsigned int  lightBandIdx,
const unsigned int  saturationBandIdx,
const double  rgbRangeMin,
const double  rgbRangeMax,
te::rst::Raster outputRGBRaster 
)

HLS to RGB conversion.

Parameters
inputHLSRasterThe input raster.
hueBandIdxThe hue band index.
lightBandIdxThe light band index.
saturationBandIdxThe saturation band index.
rgbRangeMinThe minimum RGB value.
rgbRangeMaxThe maximum RGB value.
outputRGBRasterAn output pré-initiated raster (with the same dimensions of inputHLSRaster) where the RGB data will be written.
Returns
true if OK, false on errors.

Definition at line 1739 of file src/terralib/rp/Functions.cpp.

References col, te::rst::Raster::getAccessPolicy(), te::rst::Raster::getBand(), te::rst::Raster::getNumberOfBands(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Band::getProperty(), te::rst::Band::getValue(), te::rst::BandProperty::m_noDataValue, nCols, p, te::gm::CurvePolygon::push_back(), te::common::RAccess, te::rst::Band::setValue(), and te::common::WAccess.

Referenced by te::qt::widgets::ColorTransformDialog::applyPreviewHLS2RGB(), BOOST_AUTO_TEST_CASE(), te::rp::CreateRasterFileFromMatrix(), and te::qt::widgets::ColorTransformDialog::executeHLS2RGB().

TERPEXPORT bool te::rp::ConvertHLS2RGB ( const te::rst::Raster inputHRaster,
const unsigned int  hueBandIdx,
const te::rst::Raster inputLRaster,
const unsigned int  lightBandIdx,
const te::rst::Raster inputSRaster,
const unsigned int  saturationBandIdx,
const double  rgbRangeMin,
const double  rgbRangeMax,
te::rst::Raster outputRGBRaster 
)

HLS to RGB conversion.

Parameters
inputHRasterThe input hue raster.
hueBandIdxThe hue band index.
inputLRasterThe input light raster.
lightBandIdxThe light band index.
inputSRasterThe input saturation raster.
saturationBandIdxThe saturation band index.
rgbRangeMinThe minimum RGB value.
rgbRangeMaxThe maximum RGB value.
outputRGBRasterAn output pré-initiated raster (with the same dimensions of inputHLSRaster) where the RGB data will be written.
Returns
true if OK, false on errors.

Definition at line 1871 of file src/terralib/rp/Functions.cpp.

References col, te::rst::Raster::getAccessPolicy(), te::rst::Raster::getBand(), te::rst::Raster::getNumberOfBands(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Band::getProperty(), te::rst::Band::getValue(), te::rst::BandProperty::m_noDataValue, nCols, p, te::gm::CurvePolygon::push_back(), te::common::RAccess, te::rst::Band::setValue(), and te::common::WAccess.

TERPEXPORT bool te::rp::ConvertIHS2RGB ( const te::rst::Raster inputIHSRaster,
const unsigned int  intensityBandIdx,
const unsigned int  hueBandIdx,
const unsigned int  saturationBandIdx,
const double  rgbRangeMin,
const double  rgbRangeMax,
te::rst::Raster outputRGBRaster 
)

IHS to RGB conversion.

Parameters
inputIHSRasterThe input raster.
intensityBandIdxThe intensity band index.
hueBandIdxThe hue band index.
saturationBandIdxThe saturation band index.
rgbRangeMinThe minimum RGB value.
rgbRangeMaxThe maximum RGB value.
outputRGBRasterAn output pré-initiated raster (with the same dimensions of inputIHSRaster) where the RGB data will be written.
Returns
true if OK, false on errors.
Note
IHS data with the following channels ranges: I:[0,1] H:[0,2pi] (radians) S:[0,1].

Definition at line 1282 of file src/terralib/rp/Functions.cpp.

References col, te::rst::Raster::getAccessPolicy(), te::rst::Raster::getBand(), te::rst::Raster::getNumberOfBands(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Band::getProperty(), te::rst::Band::getValue(), te::rst::BandProperty::m_noDataValue, M_PI, MAX, MIN, nCols, te::common::RAccess, te::rst::Band::setValue(), and te::common::WAccess.

Referenced by te::qt::widgets::ColorTransformDialog::applyPreviewIHS2RGB(), BOOST_AUTO_TEST_CASE(), te::rp::CreateRasterFileFromMatrix(), and te::qt::widgets::ColorTransformDialog::executeIHS2RGB().

TERPEXPORT bool te::rp::ConvertIHS2RGB ( const te::rst::Raster inputIRaster,
const unsigned int  intensityBandIdx,
const te::rst::Raster inputHRaster,
const unsigned int  hueBandIdx,
const te::rst::Raster inputSRaster,
const unsigned int  saturationBandIdx,
const double  rgbRangeMin,
const double  rgbRangeMax,
te::rst::Raster outputRGBRaster 
)

IHS to RGB conversion.

Parameters
inputIRasterThe input intensity raster.
intensityBandIdxThe intensity band index.
inputHRasterThe input hue raster.
hueBandIdxThe hue band index.
inputSRasterThe input saturation raster.
saturationBandIdxThe saturation band index.
rgbRangeMinThe minimum RGB value.
rgbRangeMaxThe maximum RGB value.
outputRGBRasterAn output pré-initiated raster (with the same dimensions of inputIHSRaster) where the RGB data will be written.
Returns
true if OK, false on errors.
Note
IHS data with the following channels ranges: I:[0,1] H:[0,2pi] (radians) S:[0,1].

Definition at line 1408 of file src/terralib/rp/Functions.cpp.

References col, te::rst::Raster::getAccessPolicy(), te::rst::Raster::getBand(), te::rst::Raster::getNumberOfBands(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Band::getProperty(), te::rst::Band::getValue(), te::rst::BandProperty::m_noDataValue, M_PI, MAX, MIN, nCols, te::common::RAccess, te::rst::Band::setValue(), and te::common::WAccess.

TERPEXPORT bool te::rp::ConvertRGB2HLS ( const te::rst::Raster inputRGBRaster,
const unsigned int  redBandIdx,
const unsigned int  greenBandIdx,
const unsigned int  blueBandIdx,
const double  rgbRangeMin,
const double  rgbRangeMax,
te::rst::Raster outputHLSRaster 
)

RGB to HLS conversion.

Parameters
inputRGBRasterThe input raster.
redBandIdxThe red band index.
greenBandIdxThe red band index.
blueBandIdxThe red band index.
rgbRangeMinThe minimum RGB value.
rgbRangeMaxThe maximum RGB value.
outputHLSRasterAn output pré-initiated raster (with the same dimensions of inputRGBRaster) where the HLS data will be written (double or float as the data type).
Returns
true if OK, false on errors.
Note
The outputHLSRaster mas have a float or double data type.

Definition at line 1542 of file src/terralib/rp/Functions.cpp.

References te::rst::Raster::getAccessPolicy(), te::rst::Raster::getBand(), te::rst::Raster::getNumberOfBands(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Band::getValue(), MAX, MIN, te::common::RAccess, te::rst::Band::setValue(), and te::common::WAccess.

Referenced by te::qt::widgets::ColorTransformDialog::applyPreviewRGB2HLS(), BOOST_AUTO_TEST_CASE(), te::rp::CreateRasterFileFromMatrix(), and te::qt::widgets::ColorTransformDialog::executeRGB2HLS().

TERPEXPORT bool te::rp::ConvertRGB2HLS ( const te::rst::Raster inputRedRaster,
const unsigned int  redBandIdx,
const te::rst::Raster inputGreenRaster,
const unsigned int  greenBandIdx,
const te::rst::Raster inputBlueRaster,
const unsigned int  blueBandIdx,
const double  rgbRangeMin,
const double  rgbRangeMax,
te::rst::Raster outputHLSRaster 
)

RGB to HLS conversion.

Parameters
inputRedRasterThe input red raster.
redBandIdxThe red band index.
inputGreenRasterThe input green raster.
greenBandIdxThe green band index.
inputBlueRasterThe input blue raster.
blueBandIdxThe blue band index.
rgbRangeMinThe minimum RGB value.
rgbRangeMaxThe maximum RGB value.
outputHLSRasterAn output pré-initiated raster (with the same dimensions of inputRGBRaster) where the HLS data will be written (double or float as the data type).
Returns
true if OK, false on errors.
Note
The outputHLSRaster mas have a float or double data type.

Definition at line 1638 of file src/terralib/rp/Functions.cpp.

References te::rst::Raster::getAccessPolicy(), te::rst::Raster::getBand(), te::rst::Raster::getNumberOfBands(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Band::getValue(), MAX, MIN, te::common::RAccess, te::rst::Band::setValue(), and te::common::WAccess.

TERPEXPORT bool te::rp::ConvertRGB2IHS ( const te::rst::Raster inputRGBRaster,
const unsigned int  redBandIdx,
const unsigned int  greenBandIdx,
const unsigned int  blueBandIdx,
const double  rgbRangeMin,
const double  rgbRangeMax,
te::rst::Raster outputIHSRaster 
)

RGB to IHS conversion.

Parameters
inputRGBRasterThe input raster.
redBandIdxThe red band index.
greenBandIdxThe red band index.
blueBandIdxThe red band index.
rgbRangeMinThe minimum RGB value.
rgbRangeMaxThe maximum RGB value.
outputIHSRasterAn output pré-initiated raster (with the same dimensions of inputRGBRaster) where the IHS data will be written (double or float as the data type).
Returns
true if OK, false on errors.
Note
The outputIHSRaster mas have a float or double data type.
IHS data with the following channels ranges: I:[0,1] H:[0,2pi] (radians) S:[0,1].

Definition at line 1005 of file src/terralib/rp/Functions.cpp.

References te::rst::Raster::getAccessPolicy(), te::rst::Raster::getBand(), te::rst::Raster::getNumberOfBands(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Band::getProperty(), te::rst::Band::getValue(), te::rst::BandProperty::m_noDataValue, M_PI, te::common::RAccess, te::rst::Band::setValue(), and te::common::WAccess.

Referenced by te::qt::widgets::ColorTransformDialog::applyPreviewRGB2IHS(), BOOST_AUTO_TEST_CASE(), te::rp::CreateRasterFileFromMatrix(), and te::qt::widgets::ColorTransformDialog::executeRGB2IHS().

TERPEXPORT bool te::rp::ConvertRGB2IHS ( const te::rst::Raster inputRedRaster,
const unsigned int  redBandIdx,
const te::rst::Raster inputGreenRaster,
const unsigned int  greenBandIdx,
const te::rst::Raster inputBlueRaster,
const unsigned int  blueBandIdx,
const double  rgbRangeMin,
const double  rgbRangeMax,
te::rst::Raster outputIHSRaster 
)

RGB to IHS conversion.

Parameters
inputRedRasterThe input red raster.
redBandIdxThe red band index.
inputGreenRasterThe input green raster.
greenBandIdxThe green band index.
inputBlueRasterThe input blue raster.
blueBandIdxThe blue band index.
rgbRangeMinThe minimum RGB value.
rgbRangeMaxThe maximum RGB value.
outputIHSRasterAn output pré-initiated raster (with the same dimensions of inputRGBRaster) where the IHS data will be written (double or float as the data type).
Returns
true if OK, false on errors.
Note
The outputIHSRaster mas have a float or double data type.
IHS data with the following channels ranges: I:[0,1] H:[0,2pi] (radians) S:[0,1].

Definition at line 1140 of file src/terralib/rp/Functions.cpp.

References te::rst::Raster::getAccessPolicy(), te::rst::Raster::getBand(), te::rst::Raster::getNumberOfBands(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Band::getProperty(), te::rst::Band::getValue(), te::rst::BandProperty::m_noDataValue, M_PI, te::common::RAccess, te::rst::Band::setValue(), and te::common::WAccess.

bool TERPEXPORT te::rp::Copy2DiskRaster ( const te::rst::Raster inputRaster,
const std::string &  fileName 
)

Create a new raster into a GDAL datasource.

Parameters
rasterGridThe template grid used to create the output raster.
bandsPropertiesThe template band properties used to create the output raster.
fileNameThe output tif file name.
outRasterHandlerThe created raster handler.
Returns
true if OK, false on errors.
Note
All bandsProperties pointed objects will be acquired by this function and must not be deleted.

Definition at line 317 of file src/terralib/rp/Functions.cpp.

References col, te::rp::CreateNewGdalRaster(), te::rst::Raster::getAccessPolicy(), te::rst::Raster::getBand(), te::rst::Raster::getGrid(), te::rst::Raster::getNumberOfBands(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Band::getProperty(), te::rp::RasterHandler::getRasterPtr(), te::rst::Band::getValue(), nCols, te::common::RAccess, and te::rst::Band::setValue().

Referenced by BOOST_AUTO_TEST_CASE().

bool TERPEXPORT te::rp::CreateNewGdalRaster ( const te::rst::Grid rasterGrid,
std::vector< te::rst::BandProperty * >  bandsProperties,
const std::string &  fileName,
RasterHandler outRasterHandler 
)

Create a new raster into a GDAL datasource.

Parameters
rasterGridThe template grid used to create the output raster.
bandsPropertiesThe template band properties used to create the output raster.
fileNameThe output tif file name.
outRasterHandlerThe created raster handler.
Returns
true if OK, false on errors.
Note
All bandsProperties pointed objects will be acquired by this function and must not be deleted.

Definition at line 271 of file src/terralib/rp/Functions.cpp.

References te::rp::RasterHandler::reset().

Referenced by te::rp::Copy2DiskRaster(), and exportRastertoGPKG().

bool TERPEXPORT te::rp::CreateNewGdalRaster ( const te::rst::Grid rasterGrid,
std::vector< te::rst::BandProperty * >  bandsProperties,
const std::string &  fileName,
std::unique_ptr< te::rst::Raster > &  outRasterPtr 
)

Create a new raster into a GDAL datasource.

Parameters
rasterGridThe template grid used to create the output raster.
bandsPropertiesThe template band properties used to create the output raster.
fileNameThe output tif file name.
outRasterPtrThe created raster pointer.
Returns
true if OK, false on errors.
Note
All bandsProperties pointed objects will be acquired by this function and must not be deleted.

Definition at line 289 of file src/terralib/rp/Functions.cpp.

References te::rst::RasterFactory::make().

bool TERPEXPORT te::rp::CreateNewMemRaster ( const te::rst::Grid rasterGrid,
std::vector< te::rst::BandProperty * >  bandsProperties,
RasterHandler outRasterHandler 
)

Create a new raster into a new memory datasource.

Parameters
rasterGridThe template grid used to create the output raster.
bandsPropertiesThe template band properties used to create the output raster.
outRasterHandlerThe created raster handler.
Returns
true if OK, false on errors.
Note
All bandsProperties pointed objects will be acquired by this function and must not be deleted.

Definition at line 260 of file src/terralib/rp/Functions.cpp.

References te::rp::CreateNewRaster().

bool TERPEXPORT te::rp::CreateNewRaster ( const te::rst::Grid rasterGrid,
const std::vector< te::rst::BandProperty * > &  bandsProperties,
const std::string &  outDataSetName,
const std::string &  dataSourceType,
RasterHandler outRasterHandler 
)

Create a new raster into the givem data source.

Parameters
rasterGridThe template grid used to create the output raster.
bandsPropertiesThe template band properties used to create the output raster.
outDataSetNameThe data set name to give to the created data set.
dataSourceTypeThe data source type string (i.e. GDAL, MEM.)( See te::rst::RasterFactory dictionary for valid registered values ).
outRasterHandlerThe created raster handler.
Returns
true if OK, false on errors.
Note
All bandsProperties pointed objects will be acquired by this function and must not be deleted.

Definition at line 131 of file src/terralib/rp/Functions.cpp.

References te::da::DataSourceFactory::make(), te::rp::RasterHandler::release(), and te::rp::RasterHandler::reset().

Referenced by te::rp::CreateNewMemRaster(), te::rp::SequenceMosaic::createRasterDataSet(), and te::rp::RasterSlicing().

bool TERPEXPORT te::rp::CreateNewRaster ( const te::rst::Grid rasterGrid,
const std::vector< te::rst::BandProperty * > &  bandsProperties,
const std::string &  outDataSetName,
te::da::DataSource outDataSource,
RasterHandler outRasterHandler 
)

Create a new raster into the givem data source.

Parameters
rasterGridThe template grid used to create the output raster.
bandsPropertiesThe template band properties used to create the output raster.
outDataSetNameThe data set name to give to the created data set.
outDataSourceThe data source to use when creating the output data set.
outRasterHandlerThe created raster handler.
Returns
true if OK, false on errors.
Note
All bandsProperties pointed objects will be acquired by this function and must not be deleted.

Definition at line 167 of file src/terralib/rp/Functions.cpp.

References te::common::FORWARDONLY, te::da::DataSource::getTransactor(), te::rp::RasterHandler::reset(), and te::common::RWAccess.

bool TERPEXPORT te::rp::CreateNewRaster ( const te::rst::Grid rasterGrid,
const std::vector< te::rst::BandProperty * > &  bandsProperties,
const std::map< std::string, std::string > &  rasterInfo,
const std::string &  rasterType,
std::unique_ptr< te::rst::Raster > &  outRasterPtr 
)

Create a new raster into the givem data source.

Parameters
rasterGridThe template grid used to create the output raster.
bandsPropertiesThe template band properties used to create the output raster.
rasterInfoThe output raster info (specific driver info).
rasterTypeThe output raster type (specific driver name - See te::rst::RasterFactory dictorary for more info).
outRasterPtrThe created raster pointer.
Returns
true if OK, false on errors.
Note
All bandsProperties pointed objects will be acquired by this function and must not be deleted.

Definition at line 236 of file src/terralib/rp/Functions.cpp.

References te::rst::RasterFactory::make().

template<typename MatrixElementT >
bool te::rp::CreateRasterFileFromMatrix ( const te::rp::Matrix< MatrixElementT > &  matrix,
const bool  normalize,
const std::string &  fileName 
)
TERPEXPORT boost::numeric::ublas::matrix< double > te::rp::CreateWaveletAtrousFilter ( const WaveletAtrousFilterType filterType)

Create a Wavele Atrous Filter.

Parameters
filterTypeThe filter type.
Returns
the created filter.

Definition at line 3378 of file src/terralib/rp/Functions.cpp.

References te::rp::B3SplineWAFilter, and te::rp::TriangleWAFilter.

Referenced by BOOST_AUTO_TEST_CASE(), te::rp::CreateRasterFileFromMatrix(), and te::rp::WisperFusion::execute().

TERPEXPORT bool te::rp::DecomposeBands ( const te::rst::Raster inputRaster,
const std::vector< unsigned int > &  inputRasterBands,
const std::vector< std::map< std::string, std::string > > &  outputRastersInfos,
const std::string &  outputDataSourceType,
std::vector< boost::shared_ptr< te::rst::Raster > > &  outputRastersPtrs 
)
TERPEXPORT bool te::rp::DirectPrincipalComponents ( const te::rst::Raster inputRaster,
const std::vector< unsigned int > &  inputRasterBands,
boost::numeric::ublas::matrix< double > &  pcaMatrix,
te::rst::Raster pcaRaster,
const std::vector< unsigned int > &  pcaRasterBands,
const unsigned int  maxThreads 
)

Generate all principal components from the given input raster.

Parameters
inputRasterInput raster.
inputRasterBandsInput raster bands.
pcaMatrixThe matrix generated over the principal components process.
pcaRasterThe pré-initiated output PCA raster (with the same dimensions of inputRaster) and double as the data type.
pcaRasterBandsOutput raster bands.
maxThreadsThe maximum number of threads to use (0-auto, 1-single thread used).
Returns
true if OK, false on errors.
Note
Optimized for rasters where the used bands have the same blocking scheme.

Definition at line 2522 of file src/terralib/rp/Functions.cpp.

References te::common::EigenVectors(), te::rst::Raster::getAccessPolicy(), te::rst::Raster::getBand(), te::rp::GetCovarianceValue(), te::rst::Raster::getNumberOfBands(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::common::RAccess, te::rp::RemapValues(), and te::common::WAccess.

Referenced by BOOST_AUTO_TEST_CASE(), te::rp::CreateRasterFileFromMatrix(), te::rp::Contrast::execDecorrelationEnhancement(), te::qt::widgets::PCAWizard::execute(), and te::rp::PCAFusion::execute().

TERPEXPORT bool te::rp::DirectWaveletAtrous ( const te::rst::Raster inputRaster,
const std::vector< unsigned int > &  inputRasterBands,
te::rst::Raster waveletRaster,
const unsigned int  levelsNumber,
const boost::numeric::ublas::matrix< double > &  filter 
)

Generate all wavelet planes from the given input raster.

Parameters
inputRasterInput raster.
inputRasterBandsInput raster bands.
waveletRasterThe pré-initiated output wavelet raster (with the same dimensions of inputRaster) and double as the data type.
levelsNumberThe number of decomposed wavelet levels to generate for each input raster band;
filterThe square filter to use.
Returns
true if OK, false on errors.
Note
The band order of the generated wavelet levels: { [ band0-smoothed0, band0-wavelet0, ... , band0-smoothedN, band0-waveletN ], ... }
The number of bands of waveletRaster must be ( inputRasterBands.size() * 2 * levelsNumber ) at least.

Definition at line 3418 of file src/terralib/rp/Functions.cpp.

References col, te::rst::Raster::getAccessPolicy(), te::rst::Raster::getBand(), te::rst::Raster::getNumberOfBands(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Band::getValue(), nCols, nLines, te::common::RAccess, te::rst::Band::setValue(), and te::common::WAccess.

Referenced by BOOST_AUTO_TEST_CASE(), te::rp::CreateRasterFileFromMatrix(), and te::rp::WisperFusion::execute().

TERPEXPORT std::vector< std::string > te::rp::GetBandNames ( )
TERPEXPORT bool te::rp::GetCovarianceValue ( const te::rst::Band band1,
const te::rst::Band band2,
const unsigned int  maxThreads,
double const *const  mean1ValuePtr,
double const *const  mean2ValuePtr,
double &  covarianceValue 
)

Get the covariance of band pixel values.

Parameters
band1The input band 1.
band2The input band 2.
maxThreadsThe maximum number of threads to use (0-auto, 1-single thread used).
mean1ValuePtrA pointer to a pre-calculated band1 mean value or zero if it does not exist.
mean2ValuePtrA pointer to a pre-calculated band2 mean value or zero if it does not exist.
covarianceValueThe calculated covariance value.
Returns
true if OK, false on errors.
Note
Optimized for rasters where the used bands have the same blocking scheme.

Definition at line 2375 of file src/terralib/rp/Functions.cpp.

References col, te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rp::GetCovarianceValueThread(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), te::rp::GetMeanValue(), te::common::GetPhysProcNumber(), te::rst::Band::getProperty(), te::rst::Band::getValue(), te::rst::BandProperty::m_blkh, te::rst::BandProperty::m_blkw, te::rp::GetCovarianceValueThreadParams::m_covarianceValuePtr, te::rp::GetCovarianceValueThreadParams::m_inputBand1Ptr, te::rp::GetCovarianceValueThreadParams::m_inputBand2Ptr, te::rp::GetCovarianceValueThreadParams::m_mean1Value, te::rp::GetCovarianceValueThreadParams::m_mean2Value, te::rp::GetCovarianceValueThreadParams::m_mutexPtr, te::rst::BandProperty::m_nblocksx, te::rst::BandProperty::m_nblocksy, te::rst::BandProperty::m_noDataValue, te::rp::GetCovarianceValueThreadParams::m_pixelsNumberValuePtr, te::rp::GetCovarianceValueThreadParams::m_rasterBlocksStatusPtr, te::rp::GetCovarianceValueThreadParams::m_returnStatus, nCols, and te::rp::Matrix< TemplateElementType >::reset().

Referenced by BOOST_AUTO_TEST_CASE(), te::rp::CreateRasterFileFromMatrix(), and te::rp::DirectPrincipalComponents().

TERPEXPORT std::pair< double, double > te::rp::GetDigitalNumberBandInfo ( std::string  bandName)

Returns the maximun and minimum digital numbers of a given sensor/band.

Definition at line 847 of file src/terralib/rp/Functions.cpp.

References te::rp::getSensorParams().

Referenced by te::rp::CreateRasterFileFromMatrix(), te::rp::GetDigitalNumberBandMax(), and te::rp::GetDigitalNumberBandMin().

TERPEXPORT double te::rp::GetDigitalNumberBandMin ( std::string  bandName)

Returns the minimum digital number of a given sensor/band.

Definition at line 862 of file src/terralib/rp/Functions.cpp.

References te::rp::GetDigitalNumberBandInfo().

Referenced by te::rp::CreateRasterFileFromMatrix(), te::rp::MixtureModelPCAStrategy::execute(), and te::rp::MixtureModelLinearStrategy::execute().

TERPEXPORT bool te::rp::GetIndexedDetailedExtent ( const te::rst::Grid grid,
te::gm::LinearRing indexedDetailedExtent 
)

Create a indexed (lines,columns) datailed extent from the given grid.

Parameters
gridInput grid.
indexedDetailedExtentThe created detailed extent.
Returns
true if ok, false on errors.

Definition at line 3326 of file src/terralib/rp/Functions.cpp.

References col, te::rst::Grid::getNumberOfColumns(), te::rst::Grid::getNumberOfRows(), te::gm::LineStringType, nCols, and te::gm::LineString::setPoint().

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_SUITE(), te::rp::CreateRasterFileFromMatrix(), te::rp::Register::execute(), te::rp::TiePointsMosaic::execute(), and te::rp::SequenceMosaic::execute().

std::vector< te::gm::Point * > te::rst::GetRandomPointsInRaster ( const te::rst::Raster inputRaster,
unsigned int  numberOfPoints = 1000 
)

Creates a vector of random positions (points) inside the raster.

Parameters
inputRasterThe given raster.
numberOfPointsThe number of random positions to be created (default = 1000).
Returns
A vector of random positions (points).

Definition at line 632 of file src/terralib/raster/Utils.cpp.

References te::rst::Raster::getGrid(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Raster::getSRID(), te::rst::Grid::gridToGeo(), and p.

Referenced by te::qt::widgets::createHistogram(), te::qt::widgets::createScatter(), te::rp::ClassifierKMeansStrategy::execute(), te::rp::ClassifierEMStrategy::execute(), te::rst::Band::getMaxValue(), te::rst::Band::getMinValue(), and te::rst::Round().

TERPEXPORT std::string te::rp::GetSensorFilename ( )
TERPEXPORT SpectralSensorParams te::rp::GetSpectralBandInfo ( std::string  bandName)

Returns the maximun and minimum reflectance values of a given sensor/band.

Definition at line 748 of file src/terralib/rp/Functions.cpp.

Referenced by te::rp::CreateRasterFileFromMatrix(), and te::rp::getSensorParams().

TERPEXPORT double te::rp::GetSpectralBandMax ( std::string  bandName)

Returns the maximum reflectance value of a given sensor/band.

Referenced by te::rp::CreateRasterFileFromMatrix().

TERPEXPORT double te::rp::GetSpectralBandMin ( std::string  bandName)

Returns the minimum reflectance value of a given sensor/band.

Referenced by te::rp::CreateRasterFileFromMatrix().

TERPEXPORT bool te::rp::GetStdDevValue ( const te::rst::Band band,
const unsigned int  maxThreads,
double const *const  meanValuePtr,
double &  stdDevValue 
)
TERPEXPORT bool te::rp::InversePrincipalComponents ( const te::rst::Raster pcaRaster,
const boost::numeric::ublas::matrix< double > &  pcaMatrix,
te::rst::Raster outputRaster,
const std::vector< unsigned int > &  outputRasterBands,
const unsigned int  maxThreads 
)

Regenerate the original raster from its principal components.

Parameters
pcaRasterThe principal components raster (with the same dimensions of outputRaster).
pcaMatrixThe matrix generated by the direct principal components process.
outputRasterThe regenerated output raster (with the same dimentions.
outputRasterBandsOutput raster bands.
maxThreadsThe maximum number of threads to use (0-auto, 1-single thread used).
Returns
true if OK, false on errors.
Note
Optimized for rasters where the used bands have the same blocking scheme.

Definition at line 2612 of file src/terralib/rp/Functions.cpp.

References te::common::GetInverseMatrix(), te::rst::Raster::getNumberOfBands(), and te::rp::RemapValues().

Referenced by BOOST_AUTO_TEST_CASE(), te::rp::CreateRasterFileFromMatrix(), te::rp::Contrast::execDecorrelationEnhancement(), te::qt::widgets::PCAWizard::execute(), and te::rp::PCAFusion::execute().

TERPEXPORT bool te::rp::InverseWaveletAtrous ( const te::rst::Raster waveletRaster,
const unsigned int  levelsNumber,
te::rst::Raster outputRaster,
const std::vector< unsigned int > &  outputRasterBands 
)

Regenerate the original raster from its wavelets planes.

Parameters
waveletRasterThe input wavelet raster (with the same dimensions of outputRaster).
levelsNumberThe number of decomposed wavelet levels present inside the wavelet raster.
outputRasterThe regenerated output raster.
outputRasterBandsOutput raster bands.
Returns
true if OK, false on errors.
Note
The band order of the expected wavelet levels: { [ band0-smoothed0, band0-wavelet0, ... , band0-smoothedN, band0-waveletN ], ... }
The number of bands of waveletRaster must be ( outputRasterBands.size() * 2 * levelsNumber ) at least.
Only the wavelet bands and the last smoothed band are used.

Definition at line 3546 of file src/terralib/rp/Functions.cpp.

References col, te::rst::Raster::getAccessPolicy(), te::rst::Raster::getBand(), te::rst::GetDataTypeRanges(), te::rst::Raster::getNumberOfBands(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Band::getProperty(), te::rst::Raster::getValue(), te::rst::BandProperty::m_type, nCols, te::common::RAccess, te::rst::Raster::setValue(), and te::common::WAccess.

Referenced by BOOST_AUTO_TEST_CASE(), and te::rp::CreateRasterFileFromMatrix().

TERPEXPORT bool te::rp::NormalizeRaster ( te::rst::Raster inputRaster,
double  nmin = 0.0,
double  nmax = 255.0 
)
TERPEXPORT bool te::rp::RasterSlicing ( const te::rst::Raster inputRaster,
const unsigned int  inputRasterBand,
const bool  createPaletteRaster,
const unsigned int  slicesNumber,
const bool  eqHistogram,
const std::map< std::string, std::string > &  rasterInfo,
const std::string &  rasterType,
const bool  enableProgress,
std::vector< te::rst::BandProperty::ColorEntry > const *const  palettePtr,
std::unique_ptr< te::rst::Raster > &  outRasterPtr,
std::map< double, double >  limits 
)

Generate all wavelet planes from the given input raster.

Parameters
inputRasterInput raster.
inputRasterBandInput raster band.
createPaletteRasterIf true a paletted raster will be created instead of a multi-band raster..
slicesNumberThe number of histogram slices to create;
eqHistogramIf true, the input raster will be equalized before the slicing process.
rasterInfoThe output raster info (specific driver info).
rasterTypeThe output raster type (specific driver name - See te::rst::RasterFactory dictorary for more info).
enableProgressEnable/disable the progress interface.
palettePtrA pointer to an optional user given palette (if null, an fixed step pallete will be generated).
outRasterPtrThe output sliced raster pointer.
limitsslice limits values
Returns
true if OK, false on errors.

Definition at line 3787 of file src/terralib/rp/Functions.cpp.

References te::rst::BlueCInt, te::rst::BandProperty::ColorEntry::c1, te::rst::BandProperty::ColorEntry::c2, te::rst::BandProperty::ColorEntry::c3, col, te::rp::CreateFixedStepPalette(), te::rp::CreateNewRaster(), te::rp::Contrast::execute(), te::rst::Raster::getBand(), te::rp::GetDataTypeRange(), te::rst::Raster::getNumberOfBands(), te::rst::Band::getProperty(), te::rst::Band::getValue(), te::rst::GreenCInt, te::rp::Contrast::InputParameters::HistogramEqualizationContrastT, te::rp::Contrast::initialize(), te::rp::Contrast::OutputParameters::m_createdOutRasterDSType, te::rst::BandProperty::m_noDataValue, te::rp::Contrast::InputParameters::m_type, te::rst::BandProperty::m_type, nCols, te::rst::PaletteIdxCInt, te::rst::RedCInt, te::rst::RGBPalInt, te::rst::Band::setValue(), TERP_LOG_AND_RETURN_FALSE, TERP_TRUE_OR_RETURN_FALSE, te::dt::UCHAR_TYPE, te::dt::UINT16_TYPE, and te::dt::UINT32_TYPE.

Referenced by te::qt::widgets::RasterSlicingWizardPage::applyPreview(), BOOST_AUTO_TEST_CASE(), te::qt::widgets::RasterSlicingWizard::execute(), and te::rp::GetTPConvexHullArea().

TERPEXPORT bool te::rp::RemapValues ( const te::rst::Raster inputRaster,
const std::vector< unsigned int > &  inputRasterBands,
const boost::numeric::ublas::matrix< double > &  remapMatrix,
te::rst::Raster outputRaster,
const std::vector< unsigned int > &  outputRasterBands,
const unsigned int  maxThreads 
)

Remap pixel values using a remap function matrix.

Parameters
inputRasterInput raster.
inputRasterBandsInput raster bands.
remapMatrixThe remap function matrix.
outputRasterThe pré-initiated output raster (with the same dimentions of inputRaster).
outputRasterBandsOutput raster bands.
maxThreadsThe maximum number of threads to use (0-auto, 1-single thread used).
Returns
true if OK, false on errors.
Note
Optimized for rasters where the used bands have the same blocking scheme.

Definition at line 2815 of file src/terralib/rp/Functions.cpp.

References col, te::rst::Raster::getAccessPolicy(), te::rst::Raster::getBand(), te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rst::GetDataTypeRanges(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), te::rst::Raster::getNumberOfBands(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::common::GetPhysProcNumber(), te::rst::Band::getProperty(), te::rst::BandProperty::getType(), te::rst::Raster::getValue(), te::rst::BandProperty::m_blkh, te::rst::BandProperty::m_blkw, te::rp::RemapValuesThreadParams::m_inputRasterBandsPtr, te::rp::RemapValuesThreadParams::m_inputRasterPtr, te::rp::RemapValuesThreadParams::m_mutexPtr, te::rst::BandProperty::m_nblocksx, te::rst::BandProperty::m_nblocksy, te::rst::BandProperty::m_noDataValue, te::rp::RemapValuesThreadParams::m_outputRasterBandsPtr, te::rp::RemapValuesThreadParams::m_outputRasterPtr, te::rp::RemapValuesThreadParams::m_rasterBlocksStatusPtr, te::rp::RemapValuesThreadParams::m_remapMatrixPtr, te::rp::RemapValuesThreadParams::m_returnStatus, nCols, te::common::RAccess, te::rp::RemapValuesThread(), te::rp::Matrix< TemplateElementType >::reset(), te::rst::Raster::setValue(), and te::common::WAccess.

Referenced by te::rp::CreateRasterFileFromMatrix(), te::rp::DirectPrincipalComponents(), and te::rp::InversePrincipalComponents().

TERPEXPORT void te::rp::SaveSensorParams ( std::map< std::string, SpectralSensorParams > &  params)