Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Main Repositories
otb
Commits
bed47153
Commit
bed47153
authored
Feb 16, 2016
by
Guillaume Pasero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: protection against different mask and image sizes
parent
ab25bb11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
Modules/Filtering/ImageManipulation/include/otbMaskedIteratorDecorator.txx
.../ImageManipulation/include/otbMaskedIteratorDecorator.txx
+13
-4
No files found.
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
Markdown
is supported
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