Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Main Repositories
otb
Commits
bed47153
Commit
bed47153
authored
Feb 16, 2016
by
Guillaume Pasero
Browse files
ENH: protection against different mask and image sizes
parent
ab25bb11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Modules/Filtering/ImageManipulation/include/otbMaskedIteratorDecorator.txx
View file @
bed47153
...
...
@@ -19,6 +19,7 @@
#define otbMaskedIteratorDecorator_hxx
#include "otbMaskedIteratorDecorator.h"
#include "otbMacro.h"
namespace otb
{
...
...
@@ -36,10 +37,18 @@ MaskedIteratorDecorator<TIteratorType,TMaskIteratorType>
}
else
{
m_UseMask = true;
m_ItMask = TMaskIteratorType(mask,region);
m_StartMask = TMaskIteratorType(mask,region);
m_StartImage = TIteratorType(image,region);
if (image->GetLargestPossibleRegion() != mask->GetLargestPossibleRegion())
{
m_UseMask = false;
otbWarningMacro("Input image and mask have different largest regions : mask is discarded!");
}
else
{
m_UseMask = true;
m_ItMask = TMaskIteratorType(mask,region);
m_StartMask = TMaskIteratorType(mask,region);
m_StartImage = TIteratorType(image,region);
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment