Raster processing auxiliary functions. More...
Enumerations | |
enum | te::rp::WaveletAtrousFilterType { te::rp::InvalidWAFilter = 0 , te::rp::B3SplineWAFilter = 1 , te::rp::TriangleWAFilter = 2 } |
Wavelet Atrous Filter types. More... | |
Functions | |
TERPEXPORT bool | te::rp::ComposeBands (const std::vector< te::rst::Raster const * > &inputRasters, const std::vector< unsigned int > &inputRasterBands, const te::rst::Interpolator::Method &interpMethod, const std::map< std::string, std::string > &outputRasterInfo, const std::string &outputDataSourceType, const unsigned int maxThreads, const bool allowNoDataPixels, const bool enableProgress, std::unique_ptr< te::rst::Raster > &outputRasterPtr) |
Compose a set of bands into one multi-band raster. | |
void TERPEXPORT | te::rp::Convert2DoublesVector (void *inputVector, const int inputVectorDataType, unsigned int inputVectorSize, double *outputVector) |
Convert vector elements. | |
void TERPEXPORT | te::rp::ConvertDoublesVector (double *inputVector, unsigned int inputVectorSize, const int outputVectorDataType, void *outputVector) |
Convert a doubles vector. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
bool TERPEXPORT | te::rp::Copy2DiskRaster (const te::rst::Raster &inputRaster, const std::string &fileName) |
Create a new raster into a GDAL datasource. | |
TERPEXPORT void | te::rp::CreateFixedStepPalette (const unsigned int paletteSize, const bool randomize, std::vector< te::rst::BandProperty::ColorEntry > &palette) |
Create a fixed step sequential color palette. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
TERPEXPORT boost::numeric::ublas::matrix< double > | te::rp::CreateWaveletAtrousFilter (const WaveletAtrousFilterType &filterType) |
Create a Wavele Atrous Filter. | |
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) |
Decompose a multi-band raster into a set of one-band rasters. | |
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. | |
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. | |
TERPEXPORT bool | te::rp::FillBand (te::rst::Raster &raster, const unsigned int bandIndex, const std::complex< double > &value) |
TERPEXPORT void | te::rp::GetAllSpectralBandInfos (std::map< std::string, struct SpectralSensorParams > &specBandInfos) |
Get all spectral band infos. | |
TERPEXPORT std::vector< std::string > | te::rp::GetBandNames () |
Returns a vector os with band's names. | |
TERPEXPORT bool | te::rp::GetCovarianceValue (const te::rst::Raster &inputRaster1, const unsigned int inputBandIndex1, const te::rst::Raster &inputRaster2, const unsigned int inputBandIndex2, const unsigned int maxThreads, double const *const mean1ValuePtr, double const *const mean2ValuePtr, double &covarianceValue) |
Get the covariance of band pixel values. | |
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). | |
TERPEXPORT bool | te::rp::GetDetailedExtent (const te::rst::Grid &grid, te::gm::LinearRing &detailedExtent) |
Create a datailed extent from the given grid. | |
TERPEXPORT std::pair< double, double > | te::rp::GetDigitalNumberBandInfo (std::string bandName) |
Returns the maximun and minimum digital numbers of a given sensor/band. | |
TERPEXPORT double | te::rp::GetDigitalNumberBandMax (std::string bandName) |
Returns the maximum digital number of a given sensor/band. | |
TERPEXPORT double | te::rp::GetDigitalNumberBandMin (std::string bandName) |
Returns the minimum digital number of a given sensor/band. | |
TERPEXPORT bool | te::rp::GetExternalValidDataPolygon (const te::rst::Raster &inputRaster, const std::vector< unsigned int > &inputRasterBandsIdx, const std::vector< double > &bandNoDataValues, std::unique_ptr< te::gm::Polygon > &outPolygonPtr) |
Compute the external raster valid data area polygon. | |
TERPEXPORT bool | te::rp::getHistograms (const te::rst::Raster &raster, const unsigned int bandIndex, const std::vector< te::gm::Polygon const * > &rois, const unsigned int histoBins, const unsigned int maxThreads, const te::rst::PolygonIterator< double >::IterationType roisItType, std::map< double, unsigned > &rHistogram, std::map< double, unsigned > &iHistogram) |
Compute and return the histogram soccurring values (real and imaginary) inside defined regions of interest. | |
TERPEXPORT void | te::rp::getHistogramStats (const std::map< double, unsigned int > &histogram, double &min, double &max, double &mean, double &stdDev, double &mode, double &entropy, double &sum, double &sum2, double &sum3, double &sum4, double &variance, double &median) |
Compute statiscts from the given histogram. | |
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. | |
TERPEXPORT bool | te::rp::getJointHistograms (const te::rst::Raster &raster, const unsigned int bandIndex1, const unsigned int bandIndex2, const std::vector< te::gm::Polygon const * > &rois, const unsigned int histoBins, const unsigned int maxThreads, const te::rst::PolygonIterator< double >::IterationType roisItType, std::map< std::pair< double, double >, unsigned int > &realJointHistogram, std::map< std::pair< double, double >, unsigned int > &imagJointHistogram, std::map< double, unsigned int > const *const rasterRealHistogram1ptr, std::map< double, unsigned int > const *const rasterImagHistogram1Ptr, std::map< double, unsigned int > const *const rasterRealHistogram2Ptr, std::map< double, unsigned int > const *const rasterImagHistogram2Ptr) |
Compute and return the joint histogram of occurring values (real and imaginary) inside defined regions of interest. | |
TERPEXPORT bool | te::rp::GetMeanValue (const te::rst::Raster &inputRaster, const unsigned int inputBandIndex, const unsigned int maxThreads, const bool forceNoDataValue, const double noDataValue, double &meanValue) |
Get the mean of band pixel values. | |
TERASTEREXPORT std::vector< te::gm::Point * > | te::rst::GetRandomPointsInRaster (const te::rst::Raster &inputRaster, unsigned int numberOfPoints=1000, bool ignoreNoDataValues=false) |
Creates a vector of random positions (points) inside the raster. | |
TERPEXPORT std::string | te::rp::GetSensorFilename () |
Returns a json filename with spectral sensors parameters. | |
TERPEXPORT std::map< std::string, SpectralSensorParams > | te::rp::getSensorParams () |
Returns a map with spectral sensors parameters defined in SpectralSensor.json file. | |
TERPEXPORT bool | te::rp::GetSpectralBandInfo (const std::string &bandName, SpectralSensorParams &specBandInfo) |
Get the maximun and minimum reflectance values of a given sensor/band. | |
TERPEXPORT double | te::rp::GetSpectralBandMax (std::string bandName) |
Returns the maximum reflectance value of a given sensor/band. | |
TERPEXPORT double | te::rp::GetSpectralBandMin (std::string bandName) |
Returns the minimum reflectance value of a given sensor/band. | |
TERPEXPORT bool | te::rp::GetStdDevValue (const te::rst::Raster &inputRaster, const unsigned int inputBandIndex, const unsigned int maxThreads, const bool forceNoDataValue, const double noDataValue, double const *const meanValuePtr, double &stdDevValue) |
Get the standard deviation of band pixel values. | |
template<typename ContainerT > | |
double | te::rp::GetTPConvexHullArea (const ContainerT &tiePoints, const bool useTPSecondCoordPair) |
Returns the tie points converx hull area. | |
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. | |
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. | |
TERPEXPORT te::rst::Raster * | te::rp::NormalizeRaster (const te::rst::Raster *inputRaster) |
Normalizes a raster in a given interval. | |
TERPEXPORT bool | te::rp::NormalizeRaster (te::rst::Raster &inputRaster, double nmin=0.0, double nmax=255.0) |
Normalizes one raster in a given interval. | |
TERPEXPORT bool | te::rp::RasterResample (const te::rst::Raster &inputRaster, const std::vector< unsigned int > &inputRasterBands, const te::rst::Interpolator::Method interpMethod, const unsigned int interpWindowRadius, const unsigned int firstRow, const unsigned int firstColumn, const unsigned int height, const unsigned int width, const unsigned int newheight, const unsigned int newwidth, const std::map< std::string, std::string > &rinfo, const std::string &dataSourceType, std::unique_ptr< te::rst::Raster > &resampledRasterPtr) |
Resample a subset of the raster, given a box. | |
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::vector< double > const *slicesLimitsPtr, std::vector< double > const *slicesOutputValuesPtr) |
Create a new raster grouping pixel values following the number of slices and/or slice limits. | |
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. | |
TERPEXPORT bool | te::rp::ReplaceContiguousSegmentValues (const te::rst::Raster &inputRaster, const unsigned int &inputRasterBandIdx, te::rst::Raster &outputRaster, const unsigned int &outputRasterBandIdx, const unsigned targetInputRow, const unsigned targetInputCol, const double &outputValue) |
Replace a contiguos segment pixel values. | |
TERPEXPORT bool | te::rp::ReplaceContiguousSegmentValues (te::rst::Raster &inputRaster, const unsigned int &inputRasterBandIdx, const unsigned targetRow, const unsigned targetCol, const double &outputValue) |
Replace a contiguos segment pixel values. | |
TERPEXPORT void | te::rp::SaveSensorParams (std::map< std::string, SpectralSensorParams > &) |
Saves in SpectralSensor.json file the spectral sensors parameters. | |
TERPEXPORT bool | te::rp::SelectiveReplaceValues (const te::rst::Raster &inputRaster, const unsigned int &inputRasterBandIdx, const std::vector< std::pair< double, double > > &targetValues, const bool enableProgress, const std::vector< te::gm::Polygon * > &restrictionPols, te::rst::Raster &outputRaster, const unsigned int &outputRasterBandIdx) |
Remap all pixel values using a user supplied target values (non-target values are just copied from input to output). | |
Raster processing auxiliary functions.
Wavelet Atrous Filter types.
Enumerator | |
---|---|
InvalidWAFilter | Invalid filter type. |
B3SplineWAFilter | Spline filter type. |
TriangleWAFilter | Triangle filter type. |
Definition at line 74 of file Functions.h.
TERPEXPORT bool te::rp::ComposeBands | ( | const std::vector< te::rst::Raster const * > & | inputRasters, |
const std::vector< unsigned int > & | inputRasterBands, | ||
const te::rst::Interpolator::Method & | interpMethod, | ||
const std::map< std::string, std::string > & | outputRasterInfo, | ||
const std::string & | outputDataSourceType, | ||
const unsigned int | maxThreads, | ||
const bool | allowNoDataPixels, | ||
const bool | enableProgress, | ||
std::unique_ptr< te::rst::Raster > & | outputRasterPtr | ||
) |
Compose a set of bands into one multi-band raster.
inputRasters | Input rasters. |
inputRasterBands | Input raster bands (one band for each input raster). |
interpMethod | The interpolator method to use. |
outputRasterInfo | Output raster connection info. |
outputDataSourceType | Output raster datasource type. |
maxThreads | The maximum number of threads to use (0-auto, 1-single thread used). |
outputRasterPtr | A pointer to the generated output raster. |
allowNoDataPixels | If disabled only pixels with valid data on all bands will be written to the output raster. |
enableProgress | Enable/disable the progress interface. |
void TERPEXPORT te::rp::Convert2DoublesVector | ( | void * | inputVector, |
const int | inputVectorDataType, | ||
unsigned int | inputVectorSize, | ||
double * | outputVector | ||
) |
Convert vector elements.
inputVector | Input vector. |
inputVectorDataType | Input vector data type. |
inputVectorSize | The numer of input vector elements. |
outputVector | A pré-allocated output vector. |
void TERPEXPORT te::rp::ConvertDoublesVector | ( | double * | inputVector, |
unsigned int | inputVectorSize, | ||
const int | outputVectorDataType, | ||
void * | outputVector | ||
) |
Convert a doubles vector.
inputVector | Input vector. |
inputVectorSize | The numer of input vector elements. |
inputVectorDataType | Input vector data type. |
outputVector | A pré-allocated output vector. |
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.
inputHLSRaster | The input raster. |
hueBandIdx | The hue band index. |
lightBandIdx | The light band index. |
saturationBandIdx | The saturation band index. |
rgbRangeMin | The minimum RGB value. |
rgbRangeMax | The maximum RGB value. |
outputRGBRaster | An output pré-initiated raster (with the same dimensions of inputHLSRaster) where the RGB data will be written. |
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.
inputHRaster | The input hue raster. |
hueBandIdx | The hue band index. |
inputLRaster | The input light raster. |
lightBandIdx | The light band index. |
inputSRaster | The input saturation raster. |
saturationBandIdx | The saturation band index. |
rgbRangeMin | The minimum RGB value. |
rgbRangeMax | The maximum RGB value. |
outputRGBRaster | An output pré-initiated raster (with the same dimensions of inputHLSRaster) where the RGB data will be written. |
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.
inputIHSRaster | The input raster. |
intensityBandIdx | The intensity band index. |
hueBandIdx | The hue band index. |
saturationBandIdx | The saturation band index. |
rgbRangeMin | The minimum RGB value. |
rgbRangeMax | The maximum RGB value. |
outputRGBRaster | An output pré-initiated raster (with the same dimensions of inputIHSRaster) where the RGB data will be written. |
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.
inputIRaster | The input intensity raster. |
intensityBandIdx | The intensity band index. |
inputHRaster | The input hue raster. |
hueBandIdx | The hue band index. |
inputSRaster | The input saturation raster. |
saturationBandIdx | The saturation band index. |
rgbRangeMin | The minimum RGB value. |
rgbRangeMax | The maximum RGB value. |
outputRGBRaster | An output pré-initiated raster (with the same dimensions of inputIHSRaster) where the RGB data will be written. |
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.
inputRedRaster | The input red raster. |
redBandIdx | The red band index. |
inputGreenRaster | The input green raster. |
greenBandIdx | The green band index. |
inputBlueRaster | The input blue raster. |
blueBandIdx | The blue band index. |
rgbRangeMin | The minimum RGB value. |
rgbRangeMax | The maximum RGB value. |
outputHLSRaster | An output pré-initiated raster (with the same dimensions of inputRGBRaster) where the HLS data will be written (double or float as the data type). |
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.
inputRGBRaster | The input raster. |
redBandIdx | The red band index. |
greenBandIdx | The red band index. |
blueBandIdx | The red band index. |
rgbRangeMin | The minimum RGB value. |
rgbRangeMax | The maximum RGB value. |
outputHLSRaster | An output pré-initiated raster (with the same dimensions of inputRGBRaster) where the HLS data will be written (double or float as the data type). |
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.
inputRedRaster | The input red raster. |
redBandIdx | The red band index. |
inputGreenRaster | The input green raster. |
greenBandIdx | The green band index. |
inputBlueRaster | The input blue raster. |
blueBandIdx | The blue band index. |
rgbRangeMin | The minimum RGB value. |
rgbRangeMax | The maximum RGB value. |
outputIHSRaster | An output pré-initiated raster (with the same dimensions of inputRGBRaster) where the IHS data will be written (double or float as the data type). |
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.
inputRGBRaster | The input raster. |
redBandIdx | The red band index. |
greenBandIdx | The red band index. |
blueBandIdx | The red band index. |
rgbRangeMin | The minimum RGB value. |
rgbRangeMax | The maximum RGB value. |
outputIHSRaster | An output pré-initiated raster (with the same dimensions of inputRGBRaster) where the IHS data will be written (double or float as the data type). |
bool TERPEXPORT te::rp::Copy2DiskRaster | ( | const te::rst::Raster & | inputRaster, |
const std::string & | fileName | ||
) |
Create a new raster into a GDAL datasource.
rasterGrid | The template grid used to create the output raster. |
bandsProperties | The template band properties used to create the output raster. |
fileName | The output tif file name. |
outRasterHandler | The created raster handler. |
TERPEXPORT void te::rp::CreateFixedStepPalette | ( | const unsigned int | paletteSize, |
const bool | randomize, | ||
std::vector< te::rst::BandProperty::ColorEntry > & | palette | ||
) |
Create a fixed step sequential color palette.
paletteSize | The desired palette size. |
palette | The crated palette. |
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.
rasterGrid | The template grid used to create the output raster. |
bandsProperties | The template band properties used to create the output raster. |
fileName | The output tif file name. |
outRasterHandler | The created raster handler. |
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.
rasterGrid | The template grid used to create the output raster. |
bandsProperties | The template band properties used to create the output raster. |
fileName | The output tif file name. |
outRasterPtr | The created raster pointer. |
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.
rasterGrid | The template grid used to create the output raster. |
bandsProperties | The template band properties used to create the output raster. |
outRasterHandler | The created raster handler. |
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.
rasterGrid | The template grid used to create the output raster. |
bandsProperties | The template band properties used to create the output raster. |
rasterInfo | The output raster info (specific driver info). |
rasterType | The output raster type (specific driver name - See te::rst::RasterFactory dictorary for more info). |
outRasterPtr | The created raster pointer. |
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.
rasterGrid | The template grid used to create the output raster. |
bandsProperties | The template band properties used to create the output raster. |
outDataSetName | The data set name to give to the created data set. |
dataSourceType | The data source type string (i.e. GDAL, MEM.)( See te::rst::RasterFactory dictionary for valid registered values ). |
outRasterHandler | The created raster handler. |
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.
rasterGrid | The template grid used to create the output raster. |
bandsProperties | The template band properties used to create the output raster. |
outDataSetName | The data set name to give to the created data set. |
outDataSource | The data source to use when creating the output data set. |
outRasterHandler | The created raster handler. |
bool te::rp::CreateRasterFileFromMatrix | ( | const te::rp::Matrix< MatrixElementT > & | matrix, |
const bool | normalize, | ||
const std::string & | fileName | ||
) |
Create a tiff file from a matrix.
matrix | The matrix. |
normalize | Enable/disable pixel normalization (8bit); |
tifFileName | Tif file name. |
return | true if OK, false on errors. |
Definition at line 255 of file Functions.h.
References te::dt::DOUBLE_TYPE, te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), te::rst::GrayIdxCInt, te::rst::RasterFactory::make(), TERP_TRUE_OR_RETURN_FALSE, and te::dt::UCHAR_TYPE.
TERPEXPORT boost::numeric::ublas::matrix< double > te::rp::CreateWaveletAtrousFilter | ( | const WaveletAtrousFilterType & | filterType | ) |
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 | ||
) |
Decompose a multi-band raster into a set of one-band rasters.
inputRaster | Input raster. |
inputRasterBands | Input raster bands. |
outputRastersInfos | Output rasters connections infos. (one info for each decomposed band). |
outputDataSourceType | Output raster datasource type. |
outputRastersPtrs | Pointers to the generated outputs rasters. |
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.
inputRaster | Input raster. |
inputRasterBands | Input raster bands. |
pcaMatrix | An input PCA valid matrix or an empty matrix (will be calculated over the principal components process). |
pcaRaster | The pré-initiated output PCA raster (with the same dimensions of inputRaster) and double as the data type. |
pcaRasterBands | Output raster bands. |
maxThreads | The maximum number of threads to use (0-auto, 1-single thread used). |
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.
inputRaster | Input raster. |
inputRasterBands | Input raster bands. |
waveletRaster | The pré-initiated output wavelet raster (with the same dimensions of inputRaster) and double as the data type. |
levelsNumber | The number of decomposed wavelet levels to generate for each input raster band; |
filter | The square filter to use. |
TERPEXPORT bool te::rp::FillBand | ( | te::rst::Raster & | raster, |
const unsigned int | bandIndex, | ||
const std::complex< double > & | value | ||
) |
Fill | the target band with the target value. |
bandIndex | Band index. |
value | Target value. |
TERPEXPORT void te::rp::GetAllSpectralBandInfos | ( | std::map< std::string, struct SpectralSensorParams > & | specBandInfos | ) |
Get all spectral band infos.
specBandInfos | The requested bands infos. |
TERPEXPORT std::vector< std::string > te::rp::GetBandNames | ( | ) |
Returns a vector os with band's names.
TERPEXPORT bool te::rp::GetCovarianceValue | ( | const te::rst::Raster & | inputRaster1, |
const unsigned int | inputBandIndex1, | ||
const te::rst::Raster & | inputRaster2, | ||
const unsigned int | inputBandIndex2, | ||
const unsigned int | maxThreads, | ||
double const *const | mean1ValuePtr, | ||
double const *const | mean2ValuePtr, | ||
double & | covarianceValue | ||
) |
Get the covariance of band pixel values.
inputRaster1 | The input raster 1. |
inputBandIndex1 | Input raster 1 band index. |
inputRaster2 | The input raster 2. |
inputBandIndex2 | Input raster 2 band index. |
maxThreads | The maximum number of threads to use (0-auto, 1-single thread used). |
mean1ValuePtr | A pointer to a pre-calculated band1 mean value or zero if it does not exist. |
mean2ValuePtr | A pointer to a pre-calculated band2 mean value or zero if it does not exist. |
covarianceValue | The calculated covariance value. |
|
inline |
Returns the real data type range (all values that can be represented by the given data type).
dataType | The data type. |
min | The minimum value. |
max | The maximum value. |
Definition at line 216 of file Functions.h.
References te::rst::GetDataTypeRanges().
TERPEXPORT bool te::rp::GetDetailedExtent | ( | const te::rst::Grid & | grid, |
te::gm::LinearRing & | detailedExtent | ||
) |
Create a datailed extent from the given grid.
grid | Input grid. |
detailedExtent | The created detailed extent. |
TERPEXPORT std::pair< double, double > te::rp::GetDigitalNumberBandInfo | ( | std::string | bandName | ) |
Returns the maximun and minimum digital numbers of a given sensor/band.
TERPEXPORT double te::rp::GetDigitalNumberBandMax | ( | std::string | bandName | ) |
Returns the maximum digital number of a given sensor/band.
TERPEXPORT double te::rp::GetDigitalNumberBandMin | ( | std::string | bandName | ) |
Returns the minimum digital number of a given sensor/band.
TERPEXPORT bool te::rp::GetExternalValidDataPolygon | ( | const te::rst::Raster & | inputRaster, |
const std::vector< unsigned int > & | inputRasterBandsIdx, | ||
const std::vector< double > & | bandNoDataValues, | ||
std::unique_ptr< te::gm::Polygon > & | outPolygonPtr | ||
) |
Compute the external raster valid data area polygon.
inputRaster | Input raster. |
inputRasterBandsIdx | Input raster bands to use. |
bandNoDataValues | Optional vector of no-data values for each target band or an empty vector to use the original raster no-data values.. |
outPolygonPtr | The computed external valid data area polygon. |
TERPEXPORT bool te::rp::getHistograms | ( | const te::rst::Raster & | raster, |
const unsigned int | bandIndex, | ||
const std::vector< te::gm::Polygon const * > & | rois, | ||
const unsigned int | histoBins, | ||
const unsigned int | maxThreads, | ||
const te::rst::PolygonIterator< double >::IterationType | roisItType, | ||
std::map< double, unsigned > & | rHistogram, | ||
std::map< double, unsigned > & | iHistogram | ||
) |
Compute and return the histogram soccurring values (real and imaginary) inside defined regions of interest.
raster | Input raster. |
bandIndex | Band index. |
rois | Regions of interest (under the same SRID as the input raster) or an empty vector for the case where all the image must be processed. |
histoBins | The number of bins (intervals from minimum pixel to maximum). When b = 0, the histogram will be divided according to all pixel values. |
maxThreads | Maximum number of used threads to use (0-Automatic, 1-No threads used). |
roisItType | ROIs polygons iteration type. |
rHistogram | The generated histogram (real). |
iHistogram | The generated histogram (imaginary). |
TERPEXPORT void te::rp::getHistogramStats | ( | const std::map< double, unsigned int > & | histogram, |
double & | min, | ||
double & | max, | ||
double & | mean, | ||
double & | stdDev, | ||
double & | mode, | ||
double & | entropy, | ||
double & | sum, | ||
double & | sum2, | ||
double & | sum3, | ||
double & | sum4, | ||
double & | variance, | ||
double & | median | ||
) |
Compute statiscts from the given histogram.
histogram | Input histogram. |
min | Histogram minimun value. |
max | Histogram maximum value. |
mean | Histogram mean value. |
stdDev | Histogram standard deviation value. |
mode | Histogram mode value. |
entropy | Histogram mode value. |
sum | Sum of all pixels values. |
sum2 | Quadratic sum of all pixels values. |
sum3 | The cubic sum of pixels values. |
sum4 | The quartic sum of pixels values. |
variance | Histogram variance value. |
median | Histogram median value. |
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.
grid | Input grid. |
indexedDetailedExtent | The created detailed extent. |
TERPEXPORT bool te::rp::getJointHistograms | ( | const te::rst::Raster & | raster, |
const unsigned int | bandIndex1, | ||
const unsigned int | bandIndex2, | ||
const std::vector< te::gm::Polygon const * > & | rois, | ||
const unsigned int | histoBins, | ||
const unsigned int | maxThreads, | ||
const te::rst::PolygonIterator< double >::IterationType | roisItType, | ||
std::map< std::pair< double, double >, unsigned int > & | realJointHistogram, | ||
std::map< std::pair< double, double >, unsigned int > & | imagJointHistogram, | ||
std::map< double, unsigned int > const *const | rasterRealHistogram1ptr, | ||
std::map< double, unsigned int > const *const | rasterImagHistogram1Ptr, | ||
std::map< double, unsigned int > const *const | rasterRealHistogram2Ptr, | ||
std::map< double, unsigned int > const *const | rasterImagHistogram2Ptr | ||
) |
Compute and return the joint histogram of occurring values (real and imaginary) inside defined regions of interest.
raster | Input raster. |
bandIndex1 | Input raster Band 1 index. |
bandIndex2 | Input raster Band 2 index. |
rois | Regions of interest (under the same SRID as the input raster) or an empty vector for the case where all the image must be processed. |
histoBins | The number of bins (intervals from minimum pixel to maximum). When b = 0, the histogram will be divided according to all pixel values. |
maxThreads | Maximum number of used threads to use (0-Automatic, 1-No threads used). |
roisItType | ROIs polygons iteration type. |
realJointHistogram | The generated joint histogram (real). |
imagJointHistogram | The generated joint histogram (imaginary). |
rasterRealHistogram1ptr | A pointer to a pre-calculated input raster band 1 histogram (real) or a null pointer. |
rasterImagHistogram1Ptr | A pointer to a pre-calculated input raster band 1 histogram (imaginary) or a null pointer. |
rasterRealHistogram2Ptr | A pointer to a pre-calculated input raster band 2 histogram (real) or a null pointer. |
rasterImagHistogram2Ptr | A pointer to a pre-calculated input raster band 2 histogram (imaginary) or a null pointer. |
TERPEXPORT bool te::rp::GetMeanValue | ( | const te::rst::Raster & | inputRaster, |
const unsigned int | inputBandIndex, | ||
const unsigned int | maxThreads, | ||
const bool | forceNoDataValue, | ||
const double | noDataValue, | ||
double & | meanValue | ||
) |
Get the mean of band pixel values.
inputRaster | The input raster. |
inputBandIndex | Input band index. |
maxThreads | The maximum number of threads to use (0-auto, 1-single thread used). |
forceNoDataValue | Ignore the raster original band no-data value and use the value given by the parameter noDataValue. |
noDataValue | The no-data value to be used insted of the original raster band no-data value. |
meanValue | The calculated mean value. |
TERASTEREXPORT std::vector< te::gm::Point * > te::rst::GetRandomPointsInRaster | ( | const te::rst::Raster & | inputRaster, |
unsigned int | numberOfPoints = 1000 , |
||
bool | ignoreNoDataValues = false |
||
) |
Creates a vector of random positions (points) inside the raster.
inputRaster | The given raster. |
numberOfPoints | The number of random positions to be created (default = 1000). |
ignoreNoDataValues | Flag used to inform that pixel with no data value will not be considered. |
TERPEXPORT std::string te::rp::GetSensorFilename | ( | ) |
Returns a json filename with spectral sensors parameters.
TERPEXPORT std::map< std::string, SpectralSensorParams > te::rp::getSensorParams | ( | ) |
Returns a map with spectral sensors parameters defined in SpectralSensor.json file.
TERPEXPORT bool te::rp::GetSpectralBandInfo | ( | const std::string & | bandName, |
SpectralSensorParams & | specBandInfo | ||
) |
Get the maximun and minimum reflectance values of a given sensor/band.
specBandInfo | The requested band info. |
TERPEXPORT double te::rp::GetSpectralBandMax | ( | std::string | bandName | ) |
Returns the maximum reflectance value of a given sensor/band.
TERPEXPORT double te::rp::GetSpectralBandMin | ( | std::string | bandName | ) |
Returns the minimum reflectance value of a given sensor/band.
TERPEXPORT bool te::rp::GetStdDevValue | ( | const te::rst::Raster & | inputRaster, |
const unsigned int | inputBandIndex, | ||
const unsigned int | maxThreads, | ||
const bool | forceNoDataValue, | ||
const double | noDataValue, | ||
double const *const | meanValuePtr, | ||
double & | stdDevValue | ||
) |
Get the standard deviation of band pixel values.
inputRaster | The input raster. |
inputBandIndex | Input band index. |
maxThreads | The maximum number of threads to use (0-auto, 1-single thread used). |
forceNoDataValue | Ignore the raster original band no-data value and use the value given by the parameter noDataValue. |
noDataValue | The no-data value to be used insted of the original raster band no-data value. |
meanValuePtr | A pointer to a pre-calculated band mean value or zero if it does not exist. |
stdDevValue | The calculated standard deviation value. |
double te::rp::GetTPConvexHullArea | ( | const ContainerT & | tiePoints, |
const bool | useTPSecondCoordPair | ||
) |
Returns the tie points converx hull area.
tiePoints | Input tie-points (container of te::gm::GTParameters::TiePoint). |
useTPSecondCoordPair | If true the sencond tie-point component (te::gm::GTParameters::TiePoint::second) will be used for the area calcule, otherwize the first component will be used. |
Definition at line 884 of file Functions.h.
References te::gm::GeometryCollection::add(), te::gm::Geometry::convexHull(), and te::gm::MultiPointType.
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.
pcaRaster | The principal components raster (with the same dimensions of outputRaster). |
pcaMatrix | The matrix generated by the direct principal components process. |
outputRaster | The regenerated output raster (with the same dimentions. |
outputRasterBands | Output raster bands. |
maxThreads | The maximum number of threads to use (0-auto, 1-single thread used). |
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.
waveletRaster | The input wavelet raster (with the same dimensions of outputRaster). |
levelsNumber | The number of decomposed wavelet levels present inside the wavelet raster. |
outputRaster | The regenerated output raster. |
outputRasterBands | Output raster bands. |
TERPEXPORT te::rst::Raster * te::rp::NormalizeRaster | ( | const te::rst::Raster * | inputRaster | ) |
Normalizes a raster in a given interval.
inputRaster | The given raster. |
TERPEXPORT bool te::rp::NormalizeRaster | ( | te::rst::Raster & | inputRaster, |
double | nmin = 0.0 , |
||
double | nmax = 255.0 |
||
) |
Normalizes one raster in a given interval.
inputRaster | The given raster. |
nmin | The new minimum value (default = 0.0). |
nmax | The new maximum value (default = 255.0). |
TERPEXPORT bool te::rp::RasterResample | ( | const te::rst::Raster & | inputRaster, |
const std::vector< unsigned int > & | inputRasterBands, | ||
const te::rst::Interpolator::Method | interpMethod, | ||
const unsigned int | interpWindowRadius, | ||
const unsigned int | firstRow, | ||
const unsigned int | firstColumn, | ||
const unsigned int | height, | ||
const unsigned int | width, | ||
const unsigned int | newheight, | ||
const unsigned int | newwidth, | ||
const std::map< std::string, std::string > & | rinfo, | ||
const std::string & | dataSourceType, | ||
std::unique_ptr< te::rst::Raster > & | resampledRasterPtr | ||
) |
Resample a subset of the raster, given a box.
inputRaster | Input raster. |
inputRasterBands | Input raster bands to process. |
interpMethod | The method of interpolation. |
interpWindowRadius | Interpolator windows radius around the target pixel (when applicable). |
firstRow | The starting row to make a subset of the image. |
firstColumn | The starting column to make a subset of the image. |
height | The height of the subset. |
width | The width of the subset. |
newheight | The resampled height of the new raster. |
newwidth | The resampled width of the new raster. |
rinfo | The parameters needed to build the output raster (see RasterFactory documentation). |
dataSourceType | Data source type (raster type. I.E. GDAL). |
resampledRasterPtr | The resampled raster pointer. |
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::vector< double > const * | slicesLimitsPtr, | ||
std::vector< double > const * | slicesOutputValuesPtr | ||
) |
Create a new raster grouping pixel values following the number of slices and/or slice limits.
inputRaster | Input raster. |
inputRasterBand | Input raster band. |
createPaletteRaster | If true a paletted raster will be created instead of a multi-band raster.. |
slicesNumber | The number of histogram slices to create; |
eqHistogram | If true, the input raster will be equalized before the slicing process. |
rasterInfo | The output raster info (specific driver info). |
rasterType | The output raster type (specific driver name - See te::rst::RasterFactory dictorary for more info). |
enableProgress | Enable/disable the progress interface. |
palettePtr | A pointer to an optional user given palette (if null, an fixed step pallete will be generated). |
outRasterPtr | The output sliced raster pointer. |
slicesLimitsPtr | A null pointer or a pointer to a container of slice limits ( the small of the the values for each slice range ). |
slicesOutputValuesPtr | A null pointer or a pointer to a vector of output raster values related to each slice. |
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.
inputRaster | Input raster. |
inputRasterBands | Input raster bands. |
remapMatrix | The remap function matrix. |
outputRaster | The pré-initiated output raster (with the same dimentions of inputRaster). |
outputRasterBands | Output raster bands. |
maxThreads | The maximum number of threads to use (0-auto, 1-single thread used). |
TERPEXPORT bool te::rp::ReplaceContiguousSegmentValues | ( | const te::rst::Raster & | inputRaster, |
const unsigned int & | inputRasterBandIdx, | ||
te::rst::Raster & | outputRaster, | ||
const unsigned int & | outputRasterBandIdx, | ||
const unsigned | targetInputRow, | ||
const unsigned | targetInputCol, | ||
const double & | outputValue | ||
) |
Replace a contiguos segment pixel values.
inputRaster | Input raster. |
inputRasterBandIdx | Input raster band to use. |
outputRaster | Input raster. |
outputRasterBandIdx | Input raster band to use. |
targetRow | Target row (a point inside the target segment). |
targetCol | Target col (a point inside the target segment). |
outputValue | Output segment final value. |
TERPEXPORT bool te::rp::ReplaceContiguousSegmentValues | ( | te::rst::Raster & | inputRaster, |
const unsigned int & | inputRasterBandIdx, | ||
const unsigned | targetRow, | ||
const unsigned | targetCol, | ||
const double & | outputValue | ||
) |
Replace a contiguos segment pixel values.
inputRaster | Input raster. |
inputRasterBandIdx | Input raster band to use. |
targetRow | Target row (a point inside the target segment). |
targetCol | Target col (a point inside the target segment). |
outputValue | Output segment final value. |
TERPEXPORT void te::rp::SaveSensorParams | ( | std::map< std::string, SpectralSensorParams > & | ) |
Saves in SpectralSensor.json file the spectral sensors parameters.
TERPEXPORT bool te::rp::SelectiveReplaceValues | ( | const te::rst::Raster & | inputRaster, |
const unsigned int & | inputRasterBandIdx, | ||
const std::vector< std::pair< double, double > > & | targetValues, | ||
const bool | enableProgress, | ||
const std::vector< te::gm::Polygon * > & | restrictionPols, | ||
te::rst::Raster & | outputRaster, | ||
const unsigned int & | outputRasterBandIdx | ||
) |
Remap all pixel values using a user supplied target values (non-target values are just copied from input to output).
inputRaster | Input raster. |
inputRasterBandIdx | Input raster band. |
targetValues | A vector of target values pairs in the form: std::pair< old_value, new_value >. |
enableProgress | Enable/disable the progress interface. |
restrictionPols | A vector of polygons where the remap must be executed or an empty vector indicating all pixels must be remapped. |
outputRaster | The pré-initiated output raster. |
outputRasterBandIdx | Output raster band. |