diff --git a/Code/Learning/otbROIdataConversion.txx b/Code/Learning/otbROIdataConversion.txx
index 97e3dd65b640573bbbf033087feeb0233abd3ad2..7e4255521fc9b1d611c2a7edcdd381fd38807575 100644
--- a/Code/Learning/otbROIdataConversion.txx
+++ b/Code/Learning/otbROIdataConversion.txx
@@ -75,10 +75,7 @@ ROIdataConversion< TInputImage, TInputROIImage >
   typename OutputImageType::Pointer outputPtr = this->GetOutput();
   
   outputPtr->Allocate();
-  typename InputImageType::PixelType defaultPix;
-  defaultPix.SetSize(inputImagePtr->GetNumberOfComponentsPerPixel());
-  defaultPix.Fill(0);
-  outputPtr->FillBuffer(defaultPix);
+  outputPtr->FillBuffer(static_cast<typename InputImageType::PixelType>(0));
 
 
   itk::ImageRegionConstIterator< InputImageType > inputIter
diff --git a/Testing/Code/Learning/otbROIdataConversion.cxx b/Testing/Code/Learning/otbROIdataConversion.cxx
index 64ba648691a0065e9e5958ef8a37ab24aa9e5176..f9c8200373c34b38c70279ca907fc88f3b2f18d1 100644
--- a/Testing/Code/Learning/otbROIdataConversion.cxx
+++ b/Testing/Code/Learning/otbROIdataConversion.cxx
@@ -30,20 +30,18 @@
 
 int otbROIdataConversion( int argc, char* argv[] )
 {
-  typedef double                                                    PixelType;
-  const   unsigned int                                              Dimension = 2;
-  typedef otb::VectorImage< PixelType,  Dimension >                 InputImageType;
-  typedef otb::Image< PixelType,  Dimension >                       InputROIImageType;
-  typedef otb::ROIdataConversion<InputImageType, InputROIImageType> ConvertorType;
-  typedef ConvertorType::OutputImageType                            OutputImageType;
+  typedef double                                                 PixelType;
+  const   unsigned int                                           Dimension = 2;
+  typedef otb::Image< PixelType,  Dimension >                    InputImageType;
+  typedef otb::ROIdataConversion<InputImageType, InputImageType> ConvertorType;
+  typedef ConvertorType::OutputImageType                         OutputImageType;
 
   typedef otb::ImageFileReader<InputImageType>    ReaderType;
-  typedef otb::ImageFileReader<InputROIImageType> ReaderROIType;
   typedef otb::ImageFileWriter<OutputImageType>   WriterType;
 
   ConvertorType::Pointer convertor = ConvertorType::New();
   ReaderType::Pointer readerIm = ReaderType::New();
-  ReaderROIType::Pointer readerTr = ReaderROIType::New();
+  ReaderType::Pointer readerTr = ReaderType::New();
 
   readerIm->SetFileName(argv[1]);
   readerTr->SetFileName(argv[2]);