diff --git a/Code/IO/otbDEMToImageGenerator.h b/Code/IO/otbDEMToImageGenerator.h
index 9b44a4af106c893e0be868d70c893d3abf7738c8..b2d0d9ee7d3ac53a94eba4fa7a1e78019b81891a 100644
--- a/Code/IO/otbDEMToImageGenerator.h
+++ b/Code/IO/otbDEMToImageGenerator.h
@@ -103,7 +103,6 @@ protected:
   ~DEMToImageGenerator(){};
 
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
-  void BeforeThreadedGenerateData();
   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
                        int threadId);
   virtual void GenerateOutputInformation();
diff --git a/Code/IO/otbDEMToImageGenerator.txx b/Code/IO/otbDEMToImageGenerator.txx
index 6a42936e7bba9e01ec88374a44809e1f0d05ae7f..896a234938164d8199c2b514a952924212fc0be6 100644
--- a/Code/IO/otbDEMToImageGenerator.txx
+++ b/Code/IO/otbDEMToImageGenerator.txx
@@ -71,20 +71,6 @@ void DEMToImageGenerator<TDEMImage>
   output->SetOrigin(m_OutputOrigin);
 }
 
-
-template <class TDEMImage>
-void
-DEMToImageGenerator<TDEMImage>
-::BeforeThreadedGenerateData()
-{
-  DEMImagePointerType  DEMImage = this->GetOutput();
-
-  // allocate the output buffer
-  DEMImage->SetBufferedRegion( DEMImage->GetRequestedRegion() );
-  DEMImage->Allocate();
-  DEMImage->FillBuffer(0);
-}
-
 template <class TDEMImage>
 void
 DEMToImageGenerator<TDEMImage>
@@ -94,7 +80,7 @@ DEMToImageGenerator<TDEMImage>
   DEMImagePointerType  DEMImage = this->GetOutput();
 
   // Create an iterator that will walk the output region
-  ImageIteratorType outIt = ImageIteratorType(DEMImage,outputRegionForThread);
+  ImageIteratorType outIt = ImageIteratorType(DEMImage, outputRegionForThread);
 
   // support progress methods/callbacks
   itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
diff --git a/Code/IO/otbDEMToOrthoImageGenerator.h b/Code/IO/otbDEMToOrthoImageGenerator.h
index 7391ab9f086f82542520536e41e769b958f06412..67dc24051f2f1b9a8df8325c3bdb926319a6fea7 100644
--- a/Code/IO/otbDEMToOrthoImageGenerator.h
+++ b/Code/IO/otbDEMToOrthoImageGenerator.h
@@ -104,6 +104,7 @@ protected:
 
   void PrintSelf(std::ostream& os, Indent indent) const;
   virtual void GenerateOutputInformation();
+//   void AllocateOutputs();
   void BeforeThreadedGenerateData();
   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
                        int threadId);
diff --git a/Testing/Code/IO/CMakeLists.txt b/Testing/Code/IO/CMakeLists.txt
index ef9dcadf75083036f9cc3565991724c33ae198f2..0883a34fb56a0a1991ff1d4c7281beb9de56a8ce 100755
--- a/Testing/Code/IO/CMakeLists.txt
+++ b/Testing/Code/IO/CMakeLists.txt
@@ -1448,13 +1448,13 @@ ADD_TEST(ioTvossimElevManagerTest ${IO_TESTS12}
         otbOssimElevManagerTest
          ${INPUTDATA}/DEM/srtm_directory
          ${TEMP}/ioTvossimElevManagerTest.tif
-	 6.5
-         44.5
-	 0.002
-	 0.002
-	 500
-	 500
-         )
+        6.5
+        44.5
+        0.002
+        0.002
+        500
+        500
+        )
 
 ADD_TEST(ioTvossimElevManagerTest2 ${IO_TESTS12}
 --compare-ascii ${EPSILON_9}  ${BASELINE_FILES}/ioTvossimElevManagerTest2.txt
diff --git a/Testing/Code/IO/otbDEMToImageGeneratorTest.cxx b/Testing/Code/IO/otbDEMToImageGeneratorTest.cxx
index 205674ee5cb32af9f583e3535692d4e15b7f82b6..c0f0171fdf91ac61309083d15a13d02a6211d522 100644
--- a/Testing/Code/IO/otbDEMToImageGeneratorTest.cxx
+++ b/Testing/Code/IO/otbDEMToImageGeneratorTest.cxx
@@ -18,7 +18,7 @@
 #include "itkExceptionObject.h"
 
 #include "otbDEMToImageGenerator.h"
-#include "otbImageFileWriter.h"
+#include "otbStreamingImageFileWriter.h"
 #include "otbImage.h"
 #include "otbStandardFilterWatcher.h"
 
@@ -40,7 +40,7 @@ int otbDEMToImageGeneratorTest(int argc, char * argv[])
   typedef DEMHandlerType::PointType                PointType;
   typedef DEMToImageGeneratorType::SizeType        SizeType;
   typedef DEMToImageGeneratorType::SpacingType     SpacingType;
-  typedef otb::ImageFileWriter<ImageType>          WriterType;
+  typedef otb::StreamingImageFileWriter<ImageType>          WriterType;
 
   // Instantiating object
   DEMToImageGeneratorType::Pointer object = DEMToImageGeneratorType::New();
diff --git a/Testing/Code/IO/otbDEMToOrthoImageGeneratorTest.cxx b/Testing/Code/IO/otbDEMToOrthoImageGeneratorTest.cxx
index 338eab0f78458d4f7e3e0d1376caf1c40dc98264..90fdc098fd1e9099a884aff9ea0f1aa4336d1c62 100644
--- a/Testing/Code/IO/otbDEMToOrthoImageGeneratorTest.cxx
+++ b/Testing/Code/IO/otbDEMToOrthoImageGeneratorTest.cxx
@@ -19,7 +19,7 @@
 
 #include "otbDEMToOrthoImageGenerator.h"
 #include "otbMapProjections.h"
-#include "otbImageFileWriter.h"
+#include "otbStreamingImageFileWriter.h"
 #include "otbImage.h"
 #include "otbStandardFilterWatcher.h"
 
@@ -42,7 +42,7 @@ int otbDEMToOrthoImageGeneratorTest(int argc, char * argv[])
   typedef DEMHandlerType::PointType                                           PointType;
   typedef DEMToImageGeneratorType::SizeType                                   SizeType;
   typedef DEMToImageGeneratorType::SpacingType                                SpacingType;
-  typedef otb::ImageFileWriter<ImageType>                                     WriterType;
+  typedef otb::StreamingImageFileWriter<ImageType>                                     WriterType;
 
   // Instantiating object
   MapProjectionType::Pointer       mapProj = MapProjectionType::New();
@@ -77,6 +77,5 @@ int otbDEMToOrthoImageGeneratorTest(int argc, char * argv[])
 
   writer->Update();
 
-
   return EXIT_SUCCESS;
 }