Fusion of a low-resolution multi-band image with a high resolution image using the PCA (Principal components analysis) method. More...
#include <PCAFusion.h>
Classes | |
class | InputParameters |
PCAFusion input parameters. More... | |
class | OutputParameters |
PCAFusion output parameters. More... | |
Public Member Functions | |
bool | execute (AlgorithmOutputParameters &outputParams) throw ( te::rp::Exception ) |
Executes the algorithm using the supplied parameters. 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... | |
PCAFusion () | |
void | reset () throw ( te::rp::Exception ) |
Clear all internal allocated objects and reset the algorithm to its initial state. More... | |
~PCAFusion () | |
Protected Member Functions | |
bool | loadRessampledRaster (std::auto_ptr< te::rst::Raster > &ressampledRasterPtr) const |
Load resampled data from the input image. More... | |
bool | swapBandByHighResRaster (te::rst::Raster &pcaRaster, const unsigned int pcaRasterBandIdx) |
Swap the band values by the normalized high resolution raster data. More... | |
Protected Attributes | |
InputParameters | m_inputParameters |
Input execution parameters. More... | |
bool | m_isInitialized |
Tells if this instance is initialized. More... | |
Fusion of a low-resolution multi-band image with a high resolution image using the PCA (Principal components analysis) method.
The PCA performs image fusion where the first principal component of the multi-spectral image is replaced by the histogram matched panchromatic imagery.
Definition at line 50 of file PCAFusion.h.
te::rp::PCAFusion::PCAFusion | ( | ) |
Definition at line 132 of file PCAFusion.cpp.
References reset().
te::rp::PCAFusion::~PCAFusion | ( | ) |
Definition at line 137 of file PCAFusion.cpp.
|
virtual |
Executes the algorithm using the supplied parameters.
outputParams | Output parameters. |
Implements te::rp::Algorithm.
Definition at line 141 of file PCAFusion.cpp.
References te::rp::DirectPrincipalComponents(), te::dt::DOUBLE_TYPE, te::rst::Raster::getGrid(), te::sa::Grid, te::rp::InversePrincipalComponents(), loadRessampledRaster(), te::rp::PCAFusion::InputParameters::m_enableProgress, te::rp::PCAFusion::InputParameters::m_enableThreadedProcessing, te::rp::PCAFusion::InputParameters::m_highResRasterPtr, m_inputParameters, m_isInitialized, te::rp::PCAFusion::OutputParameters::m_outputRasterPtr, te::rp::PCAFusion::OutputParameters::m_rInfo, te::rp::PCAFusion::OutputParameters::m_rType, te::rst::RasterFactory::make(), swapBandByHighResRaster(), TERP_LOG_AND_RETURN_FALSE, TERP_TRUE_OR_RETURN_FALSE, TERP_TRUE_OR_THROW, and te::common::Exception::what().
Referenced by te::qt::widgets::FusionWizard::executePCA().
|
virtual |
Initialize the algorithm instance making it ready for execution.
inputParams | Input parameters. |
Implements te::rp::Algorithm.
Definition at line 285 of file PCAFusion.cpp.
References te::rst::Raster::getAccessPolicy(), te::rst::Raster::getNumberOfBands(), te::rp::PCAFusion::InputParameters::m_highResRasterBand, te::rp::PCAFusion::InputParameters::m_highResRasterPtr, m_inputParameters, m_isInitialized, te::rp::PCAFusion::InputParameters::m_lowResRasterBands, te::rp::PCAFusion::InputParameters::m_lowResRasterPtr, te::common::RAccess, reset(), TERP_TRUE_OR_RETURN_FALSE, and TERP_TRUE_OR_THROW.
Referenced by te::qt::widgets::FusionWizard::executePCA().
|
virtual |
Returns true if the algorithm instance is initialized and ready for execution.
Implements te::rp::Algorithm.
Definition at line 333 of file PCAFusion.cpp.
References m_isInitialized.
|
protected |
Load resampled data from the input image.
ressampledRasterPtr | The loaded and ressampled raster data. |
Definition at line 338 of file PCAFusion.cpp.
References te::rst::Raster::getBand(), te::rst::Grid::getExtent(), te::rst::Raster::getGrid(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Band::getProperty(), te::rst::Raster::getSRID(), te::rst::Interpolator::getValue(), te::sa::Grid, te::rp::PCAFusion::InputParameters::m_highResRasterPtr, m_inputParameters, te::rp::PCAFusion::InputParameters::m_interpMethod, te::rp::PCAFusion::InputParameters::m_lowResRasterBands, te::rp::PCAFusion::InputParameters::m_lowResRasterPtr, te::rst::BandProperty::m_noDataValue, te::rst::Raster::setValue(), TERP_LOG_AND_RETURN_FALSE, and te::common::Exception::what().
Referenced by execute().
|
virtual |
Clear all internal allocated objects and reset the algorithm to its initial state.
Implements te::rp::Algorithm.
Definition at line 279 of file PCAFusion.cpp.
References m_inputParameters, m_isInitialized, and te::rp::PCAFusion::InputParameters::reset().
Referenced by initialize(), te::rp::PCAFusion::InputParameters::InputParameters(), te::rp::PCAFusion::InputParameters::operator=(), te::rp::PCAFusion::OutputParameters::operator=(), te::rp::PCAFusion::OutputParameters::OutputParameters(), PCAFusion(), te::rp::PCAFusion::InputParameters::~InputParameters(), and te::rp::PCAFusion::OutputParameters::~OutputParameters().
|
protected |
Swap the band values by the normalized high resolution raster data.
pcaRaster | The PCA raster. |
pcaRasterBandIdx | The band index where the values will be swapped. |
Definition at line 425 of file PCAFusion.cpp.
References te::rst::Raster::getBand(), te::rp::GetDataTypeRange(), te::rp::GetMeanValue(), te::rst::Raster::getNumberOfBands(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Band::getProperty(), te::rp::GetStdDevValue(), te::rst::Band::getValue(), te::rp::PCAFusion::InputParameters::m_enableThreadedProcessing, te::rp::PCAFusion::InputParameters::m_highResRasterBand, te::rp::PCAFusion::InputParameters::m_highResRasterPtr, m_inputParameters, and te::rst::BandProperty::m_noDataValue.
Referenced by execute().
|
protected |
Input execution parameters.
Definition at line 140 of file PCAFusion.h.
Referenced by execute(), initialize(), loadRessampledRaster(), reset(), and swapBandByHighResRaster().
|
protected |
Tells if this instance is initialized.
Definition at line 142 of file PCAFusion.h.
Referenced by execute(), initialize(), isInitialized(), and reset().