te::rp::SequenceMosaic Class Reference

Create mosaics from a sequence of overlapped rasters using an automatic tie-points detection method. More...

#include <SequenceMosaic.h>

Inheritance diagram for te::rp::SequenceMosaic:
te::rp::Algorithm

Classes

class  InputParameters
 Mosaic input parameters. More...
 
class  MosaicSequenceInfo
 Mosaic sequence info. More...
 
class  OutputParameters
 Mosaic output parameters. More...
 

Public Member Functions

bool execute (AlgorithmOutputParameters &outputParams) throw ( te::rp::Exception )
 Executes the algorithm using the supplied parameters. More...
 
const std::string & getErrorMessage () const
 Return the current error message if there is any. More...
 
bool initialize (const AlgorithmInputParameters &inputParams) throw ( te::rp::Exception )
 Initialize the algorithm instance making it ready for execution. More...
 
bool isInitialized () const
 Returns true if the algorithm instance is initialized and ready for execution. More...
 
void reset () throw ( te::rp::Exception )
 Clear all internal allocated objects and reset the algorithm to its initial state. More...
 
 SequenceMosaic ()
 
 ~SequenceMosaic ()
 

Protected Member Functions

bool createDiskRasterCopy (const std::string &fileName, const te::rst::Raster &sourceRaster) const
 Create copy of the given raster into a disk file. More...
 
bool createRasterDataSet (const std::string &dataSetName, const te::rst::Raster &sourceRaster, te::da::DataSource *dataSourcePtr) const
 Create a raster data set from the given raster. More...
 
void setErrorMessage (const std::string &newErrorMessage)
 Set the current error message. More...
 

Static Protected Member Functions

static void calcBandStatistics (const te::rst::Band &band, const bool &forceNoDataValue, const double &noDataValue, double &mean, double &variance)
 Raster band statistics calcule. More...
 

Protected Attributes

SequenceMosaic::InputParameters m_inputParameters
 Input execution parameters. More...
 
bool m_isInitialized
 Tells if this instance is initialized. More...
 

Detailed Description

Create mosaics from a sequence of overlapped rasters using an automatic tie-points detection method.

Note
When the tie-points detection fails, a new mosaic sequence is generated.
Each mosaic sequence takes the first raster (of each sequence) as reference for resolution, SRS and equalization parameters.

Definition at line 50 of file SequenceMosaic.h.

Constructor & Destructor Documentation

te::rp::SequenceMosaic::SequenceMosaic ( )
te::rp::SequenceMosaic::~SequenceMosaic ( )
default

Referenced by SequenceMosaic().

Member Function Documentation

void te::rp::SequenceMosaic::calcBandStatistics ( const te::rst::Band band,
const bool forceNoDataValue,
const double &  noDataValue,
double &  mean,
double &  variance 
)
staticprotected

Raster band statistics calcule.

Parameters
bandInput raster band.
forceNoDataValueForce the noDataValue to be used as the band no-data value.
noDataValueThe no-data value to use.
meanPixels mean.
variancePixels variance.

Definition at line 1031 of file SequenceMosaic.cpp.

References col, te::rst::Band::getProperty(), te::rst::Band::getValue(), line, te::rst::BandProperty::m_blkh, te::rst::BandProperty::m_blkw, te::rst::BandProperty::m_nblocksx, te::rst::BandProperty::m_nblocksy, te::rst::BandProperty::m_noDataValue, nCols, and nLines.

Referenced by execute().

bool te::rp::SequenceMosaic::createDiskRasterCopy ( const std::string &  fileName,
const te::rst::Raster sourceRaster 
) const
protected

Create copy of the given raster into a disk file.

Parameters
fileNameThe disk file name.
sourceRasterThe source raster.
Returns
true if OK, false on errors.

Definition at line 1132 of file SequenceMosaic.cpp.

References col, 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::rst::Band::getValue(), te::sa::Grid, line, te::rst::RasterFactory::make(), nCols, nLines, and te::rst::Band::setValue().

bool te::rp::SequenceMosaic::createRasterDataSet ( const std::string &  dataSetName,
const te::rst::Raster sourceRaster,
te::da::DataSource dataSourcePtr 
) const
protected

Create a raster data set from the given raster.

Parameters
dataSetNameThe data set name.
sourceRasterThe source raster.
dataSourcePtrThe output data source pointer.
Returns
true if OK, false on errors.

Definition at line 1085 of file SequenceMosaic.cpp.

References col, te::rp::CreateNewRaster(), 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(), te::da::DataSource::isValid(), nCols, te::common::RAccess, and te::rst::Band::setValue().

Referenced by execute().

bool te::rp::SequenceMosaic::execute ( AlgorithmOutputParameters outputParams)
throw (te::rp::Exception
)
virtual

Executes the algorithm using the supplied parameters.

Parameters
outputParamsOutput parameters.
Returns
true if OK, false on errors.
Note
A return error string can be obtained via Algorithm::getErrorMessage()

Implements te::rp::Algorithm.

Definition at line 187 of file SequenceMosaic.cpp.

References te::gm::CurvePolygon::add(), te::gm::GeometryCollection::add(), te::rp::Blender::blendIntoRaster1(), calcBandStatistics(), te::rp::SequenceMosaic::MosaicSequenceInfo::clear(), te::gm::GeometryCollection::clear(), createRasterDataSet(), te::rp::TiePointsLocator::execute(), te::rst::Raster::getBand(), te::rp::FeederConstRaster::getCurrentObj(), te::rp::FeederConstRaster::getCurrentOffset(), te::rst::GetDataTypeRanges(), te::rst::Grid::getExtent(), te::rst::Raster::getGrid(), te::rp::GetIndexedDetailedExtent(), te::gm::Envelope::getLowerLeftX(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rp::FeederConstRaster::getObjsCount(), te::common::GetPhysProcNumber(), te::rst::Band::getProperty(), te::rst::Raster::getResolutionX(), te::rst::Grid::getResolutionX(), te::rst::Raster::getResolutionY(), te::rst::Grid::getResolutionY(), te::rst::Raster::getSRID(), te::rp::GetTPConvexHullArea(), te::gm::Envelope::getUpperRightY(), te::rst::Band::getValue(), te::gm::LineString::getX(), te::gm::LineString::getY(), te::rst::GrayIdxCInt, te::sa::Grid, te::rp::TiePointsLocator::initialize(), te::rp::Blender::initialize(), te::da::DataSource::isValid(), te::gm::LineStringType, te::rp::SequenceMosaic::InputParameters::m_autoEqualize, te::rp::SequenceMosaic::InputParameters::m_blendMethod, te::rst::BandProperty::m_colorInterp, te::rp::SequenceMosaic::MosaicSequenceInfo::m_dataSetName, te::rp::TiePointsLocatorInputParameters::m_enableGeometryFilter, te::rp::SequenceMosaic::InputParameters::m_enableMultiThread, te::rp::TiePointsLocatorInputParameters::m_enableMultiThread, te::rp::SequenceMosaic::InputParameters::m_enableProgress, te::rp::TiePointsLocatorInputParameters::m_enableProgress, te::rp::SequenceMosaic::InputParameters::m_feederRasterPtr, te::rp::SequenceMosaic::InputParameters::m_forceInputNoDataValue, te::rp::SequenceMosaic::InputParameters::m_geomTransfName, te::rp::TiePointsLocatorInputParameters::m_geomTransfName, te::rp::TiePointsLocatorInputParameters::m_inMaskRaster1Ptr, te::rp::TiePointsLocatorInputParameters::m_inMaskRaster2Ptr, m_inputParameters, te::rp::SequenceMosaic::InputParameters::m_inputRastersBands, te::rp::TiePointsLocatorInputParameters::m_inRaster1Bands, te::rp::TiePointsLocatorInputParameters::m_inRaster1Ptr, te::rp::TiePointsLocatorInputParameters::m_inRaster2Bands, te::rp::TiePointsLocatorInputParameters::m_inRaster2Ptr, te::rp::SequenceMosaic::InputParameters::m_interpMethod, te::rp::TiePointsLocatorInputParameters::m_interpMethod, m_isInitialized, te::rp::SequenceMosaic::InputParameters::m_locatorParams, te::rp::SequenceMosaic::InputParameters::m_minRequiredTiePointsCoveredAreaPercent, te::rp::SequenceMosaic::InputParameters::m_noDataValue, te::rst::BandProperty::m_noDataValue, te::rp::SequenceMosaic::InputParameters::m_outDataSetsNamePrefix, te::rp::SequenceMosaic::InputParameters::m_outDataSetsNameSufix, te::rp::SequenceMosaic::OutputParameters::m_outputDSPtr, te::rp::TiePointsLocatorInputParameters::m_pixelSizeXRelation, te::rp::TiePointsLocatorInputParameters::m_pixelSizeYRelation, te::rp::TiePointsLocatorInputParameters::m_raster1TargetAreaColStart, te::rp::TiePointsLocatorInputParameters::m_raster1TargetAreaHeight, te::rp::TiePointsLocatorInputParameters::m_raster1TargetAreaLineStart, te::rp::TiePointsLocatorInputParameters::m_raster1TargetAreaWidth, te::rp::TiePointsLocatorInputParameters::m_raster2TargetAreaColStart, te::rp::TiePointsLocatorInputParameters::m_raster2TargetAreaHeight, te::rp::TiePointsLocatorInputParameters::m_raster2TargetAreaLineStart, te::rp::TiePointsLocatorInputParameters::m_raster2TargetAreaWidth, te::rp::SequenceMosaic::MosaicSequenceInfo::m_rasterFeederIndexes, te::rp::SequenceMosaic::OutputParameters::m_sequencesInfo, te::rp::TiePointsLocator::OutputParameters::m_tiePoints, te::gm::GTParameters::m_tiePoints, te::rp::SequenceMosaic::MosaicSequenceInfo::m_tiePoints, te::rp::SequenceMosaic::InputParameters::m_tiePointsLocationBandIndex, te::rp::TiePointsLocator::OutputParameters::m_transformationPtr, te::rp::SequenceMosaic::InputParameters::m_useRasterCache, te::rp::FeederConstRaster::moveNext(), te::gm::MultiPolygonMType, te::gm::MultiPolygonType, te::gm::MultiPolygonZMType, te::gm::MultiPolygonZType, te::rst::NearestNeighbor, pixelValue, te::gm::PolygonMType, te::gm::PolygonType, te::gm::PolygonZMType, te::gm::PolygonZType, te::gm::CurvePolygon::push_back(), te::rp::FeederConstRaster::reset(), te::rp::TiePointsLocatorInputParameters::reset(), SEQUENCE_RASTER_MAX_MOSAIC_MEM_USE, te::gm::LineString::setPoint(), te::gm::GeometryCollection::setSRID(), te::gm::LineString::setSRID(), te::gm::CurvePolygon::setSRID(), te::rst::Band::setValue(), te::gm::LineString::size(), TERP_INSTANCE_TRUE_OR_RETURN_FALSE, TERP_LOGWARN, TERP_TRUE_OR_THROW, te::gm::Envelope::transform(), and te::gm::Geometry::Union().

Referenced by BOOST_AUTO_TEST_CASE(), and te::qt::widgets::MosaicWizard::executeSequenceMosaic().

bool te::rp::SequenceMosaic::isInitialized ( ) const
virtual

Returns true if the algorithm instance is initialized and ready for execution.

Returns
true if the algorithm instance is initialized and ready for execution.

Implements te::rp::Algorithm.

Definition at line 1026 of file SequenceMosaic.cpp.

References m_isInitialized.

void te::rp::SequenceMosaic::reset ( )
throw (te::rp::Exception
)
virtual

Clear all internal allocated objects and reset the algorithm to its initial state.

Reimplemented from te::rp::Algorithm.

Definition at line 948 of file SequenceMosaic.cpp.

References m_inputParameters, m_isInitialized, te::rp::Algorithm::reset(), and te::rp::SequenceMosaic::InputParameters::reset().

void te::rp::Algorithm::setErrorMessage ( const std::string &  newErrorMessage)
protectedinherited

Set the current error message.

Parameters
newErrorMessageNew error message;

Definition at line 49 of file rp/Algorithm.cpp.

References te::rp::Algorithm::m_errorMessage.

Member Data Documentation

SequenceMosaic::InputParameters te::rp::SequenceMosaic::m_inputParameters
protected

Input execution parameters.

Definition at line 176 of file SequenceMosaic.h.

Referenced by execute(), initialize(), and reset().

bool te::rp::SequenceMosaic::m_isInitialized
protected

Tells if this instance is initialized.

Definition at line 178 of file SequenceMosaic.h.

Referenced by execute(), initialize(), isInitialized(), and reset().


The documentation for this class was generated from the following files: