Commit c5c18476 authored by Guillaume Pasero's avatar Guillaume Pasero

ENH: throw exception if mask and image don't match

parent 31a5e9fd
......@@ -19,7 +19,7 @@
#define otbMaskedIteratorDecorator_hxx
#include "otbMaskedIteratorDecorator.h"
#include "otbMacro.h"
#include "itkMacro.h"
namespace otb
{
......@@ -39,8 +39,7 @@ MaskedIteratorDecorator<TIteratorType,TMaskIteratorType>
{
if (image->GetLargestPossibleRegion() != mask->GetLargestPossibleRegion())
{
m_UseMask = false;
otbWarningMacro("Input image and mask have different largest regions : mask is discarded!");
itkGenericExceptionMacro("Input image and mask have different largest regions : mask is discarded!");
}
else
{
......
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