From 190063829df20b964263e4199e086b09e1377c49 Mon Sep 17 00:00:00 2001 From: Manuel Grizonnet <manuel.grizonnet@gmail.com> Date: Fri, 19 Nov 2010 15:31:02 +0100 Subject: [PATCH] WRG:use patched itkPixelBuilder to initialize itkVariableLenghtVector --- Code/Visualization/otbImageLayer.txx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Code/Visualization/otbImageLayer.txx b/Code/Visualization/otbImageLayer.txx index 08d97e5b5c..c93eeeae24 100644 --- a/Code/Visualization/otbImageLayer.txx +++ b/Code/Visualization/otbImageLayer.txx @@ -27,7 +27,7 @@ #include "otbImageKeywordlist.h" #include "otbImageMetadataInterfaceBase.h" #include "itkMetaDataDictionary.h" -#include "otbImageMetadataInterfaceFactory.h" +#include "itkPixelBuilder.h" #include "vnl/vnl_random.h" namespace otb @@ -377,7 +377,8 @@ ImageLayer<TImage, TOutputImage> //FIXME only if necessary this->UpdateListSample(); - PixelType pixel; + PixelType pixel; + itk::PixelBuilder<PixelType>::Zero(pixel,(m_Image->GetNumberOfComponentsPerPixel())); // Ensure rendering function initialization m_RenderingFunction->Initialize(m_Image->GetMetaDataDictionary()); //FIXME check, but the call must be done in the generator. To be moved to the layer? -- GitLab