Skip to content
Snippets Groups Projects
Commit 178f2fee authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

ENH: Add verification for correct XS/PAN size before fusion

parent ec5dd058
No related branches found
No related tags found
No related merge requests found
......@@ -113,6 +113,17 @@ namespace otb
::GenerateData()
{
//Check if size is correct
typename InternalImageType::SizeType sizePan;
typename InternalVectorImageType::SizeType sizeXs;
sizePan = this->GetPanInput()->GetLargestPossibleRegion().GetSize();
sizeXs = this->GetXsInput()->GetLargestPossibleRegion().GetSize();
if ((sizePan[0] != sizeXs[0]) || (sizePan[1] != sizeXs[1]))
{
itkExceptionMacro(<<"SimpleRcsPanSharpeningFusionImageFilter: Wrong Pan/Xs size");
}
//Process the fusion
m_ConvolutionFilter->SetInput( this->GetPanInput() );
m_ConvolutionFilter->SetRadius( this->m_Radius);
m_ConvolutionFilter->SetFilter( this->m_Filter);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment