Commit 9e06bc36 authored by Manuel Grizonnet's avatar Manuel Grizonnet
Browse files

ENH: start from a clean buffer before rasterization (patch provided by R. Cresson)

parent dfd59264
......@@ -259,6 +259,15 @@ VectorDataToLabelImageFilter<TVectorData, TOutputImage>::GenerateData()
// Get the buffered region
OutputImageRegionType bufferedRegion = this->GetOutput()->GetBufferedRegion();
//Start from a clean buffer
//Patch provided by R. Cresson on otb-developers
typename itk::ImageRegionIterator<OutputImageType> outputIt(this->GetOutput(), bufferedRegion);
for (outputIt.GoToBegin(); !outputIt.IsAtEnd(); ++outputIt)
outputIt.Set(itk::NumericTraits<typename OutputImageType::InternalPixelType>::Zero);
// nb bands
unsigned int nbBands = this->GetOutput()->GetNumberOfComponentsPerPixel();
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