Skip to content
Snippets Groups Projects
Commit a7e87a13 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

BUG: make sure output iterator runs over the whole requested region

parent 3080885b
No related branches found
No related tags found
No related merge requests found
......@@ -260,8 +260,7 @@ ImageClassificationFilter<TInputImage, TOutputImage, TMaskImage>
typename TargetListSampleType::ConstIterator labIt = labels->Begin();
maskIt.GoToBegin();
for (outIt.GoToBegin(); labIt!=labels->End() && !outIt.IsAtEnd();
++outIt)
for (outIt.GoToBegin(); !outIt.IsAtEnd(); ++outIt)
{
double confidenceIndex = 0.0;
TargetValueType labelValue(m_DefaultLabel);
......@@ -270,7 +269,7 @@ ImageClassificationFilter<TInputImage, TOutputImage, TMaskImage>
validPoint = maskIt.Get() > 0;
++maskIt;
}
if (validPoint)
if (validPoint && labIt!=labels->End())
{
labelValue = labIt.GetMeasurementVector()[0];
......
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