Commit 178f2fee authored by Emmanuel Christophe's avatar Emmanuel Christophe

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

parent ec5dd058
......@@ -113,6 +113,17 @@ namespace otb
//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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment