diff --git a/Code/Visualization/otbDirectRenderingFunction.h b/Code/Visualization/otbDirectRenderingFunction.h
deleted file mode 100644
index 58ab89e1fedfa5969b10eda97081cf0cfe857dd7..0000000000000000000000000000000000000000
--- a/Code/Visualization/otbDirectRenderingFunction.h
+++ /dev/null
@@ -1,204 +0,0 @@
-/*=========================================================================
-
-  Program:   ORFEO Toolbox
-  Language:  C++
-  Date:      $Date$
-  Version:   $Revision$
-
-
-  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
-  See OTBCopyright.txt for details.
-
-
-     This software is distributed WITHOUT ANY WARRANTY; without even
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-     PURPOSE.  See the above copyright notices for more information.
-
-=========================================================================*/
-#ifndef __otbDirectRenderingFunction_h
-#define __otbDirectRenderingFunction_h
-
-#include "otbRenderingFunction.h"
-#include "otbMacro.h"
-#include <assert.h>
-#include <iomanip>
-
-namespace otb
-{
-namespace Function
-{
-
-/** \class DirectRenderingFunction
- * \brief Standard rendering.
- *
- * This function just reproduce the input value at the output
- * with the risk of truncated values. Use it if you know that
- * your input values are between 0 and 255.
- *
- *  \ingroup Visualization
- */
-template <class TPixelPrecision, class TRGBPixel >
-class DirectRenderingFunction
-  : public RenderingFunction<TPixelPrecision,TRGBPixel>
-{
-public:
-  /** Standard class typedefs */
-  typedef DirectRenderingFunction                   Self;
-  typedef RenderingFunction<TPixelPrecision,TRGBPixel> Superclass;
-  typedef itk::SmartPointer<Self>                      Pointer;
-  typedef itk::SmartPointer<const Self>                ConstPointer;
-
-  /** type macro */
-  itkTypeMacro(DirectRenderingFunction,RenderingFunction);
-
-  /** new macro */
-  itkNewMacro(Self);
-
-  /** PixelType macros */
-  typedef TRGBPixel                                  OutputPixelType;
-  typedef typename OutputPixelType::ValueType        OutputValueType;
-  typedef TPixelPrecision                            PixelType;
-  typedef typename itk::NumericTraits<PixelType>::ValueType ScalarType;
-  typedef itk::VariableLengthVector<ScalarType>       VectorPixelType;
-  typedef itk::RGBPixel<ScalarType> RGBPixelType;
-  typedef itk::RGBAPixel<ScalarType> RGBAPixelType;
-
-  /** Evaluate method (scalar version) */
-  inline virtual const OutputPixelType Evaluate(ScalarType spixel) const
-  {
-    OutputPixelType resp;
-    resp.SetRed(spixel);
-    resp.SetGreen(spixel);
-    resp.SetBlue(spixel);
-    return resp;
-  }
-  /** Evaluate method (vector version) */
-  inline virtual const OutputPixelType Evaluate(const VectorPixelType & vpixel) const
-  {
-    OutputPixelType resp;
-    resp.Fill(itk::NumericTraits<typename OutputPixelType::ValueType>::max());
-    resp.SetRed(vpixel[m_RedChannelIndex]);
-    resp.SetGreen(vpixel[m_GreenChannelIndex]);
-    resp.SetBlue(vpixel[m_BlueChannelIndex]);
-    return resp;
-  }
-  /** Evaluate method (RGB pixel version) */
-  inline virtual const OutputPixelType Evaluate(const RGBPixelType & vpixel) const
-  {
-    OutputPixelType resp;
-    resp.Fill(itk::NumericTraits<typename OutputPixelType::ValueType>::max());
-    resp.SetRed(vpixel[m_RedChannelIndex]);
-    resp.SetGreen(vpixel[m_GreenChannelIndex]);
-    resp.SetBlue(vpixel[m_BlueChannelIndex]);
-    return resp;
-  }
-  /** Evaluate method (RGBA pixel version) */
-  inline virtual const OutputPixelType Evaluate(const RGBAPixelType & vpixel) const
-  {
-    OutputPixelType resp;
-//     resp.Fill(itk::NumericTraits<typename OutputPixelType::ValueType>::max());
-    if (OutputPixelType::Length == 4)
-    {//Propagate the alpha channel
-      resp[3] = vpixel[3];
-    }
-    resp.SetRed(vpixel[m_RedChannelIndex]);
-    resp.SetGreen(vpixel[m_GreenChannelIndex]);
-    resp.SetBlue(vpixel[m_BlueChannelIndex]);
-    return resp;
-  }
-
-  inline const std::string Describe(ScalarType spixel) const
-  {
-    itk::OStringStream oss;
-    OutputPixelType output = this->Evaluate(spixel);
-    oss<<"Grayscale [value: "<< static_cast<typename itk::NumericTraits<PixelType>::PrintType>(spixel)<<", displayed: "<< static_cast<unsigned int>(output[0])<<"]";
-    return oss.str();
-  }
-
-  inline const std::string Describe(const VectorPixelType & vpixel) const
-  {
-    itk::OStringStream oss;
-    OutputPixelType output = this->Evaluate(vpixel);
-    for(unsigned int channel = 0; channel < vpixel.Size();++channel)
-      {
-      oss<<"c= "<< channel << ", ";
-      if(channel == m_RedChannelIndex)
-        {
-        oss <<"R= " << std::setw(3) <<(int)output[0]<< ", ";
-        }
-      else if(channel == m_GreenChannelIndex)
-        {
-        oss <<"G= " << std::setw(3) <<(int)output[1]<< ", ";
-        }
-      else if(channel == m_BlueChannelIndex)
-        {
-        oss <<"B= " << std::setw(3) <<(int)output[2]<< ", ";
-        }
-      else
-        {
-        oss <<"       ";
-        }
-        oss<<"v= "<<static_cast<typename itk::NumericTraits<PixelType>::PrintType>(vpixel[channel])<<std::endl;
-      }
-    return oss.str();
-  }
-
-  inline const std::string Describe(const RGBPixelType & spixel) const
-  {
-    itk::OStringStream oss;
-    OutputPixelType output = this->Evaluate(spixel);
-    oss<<"RGB value: "<< static_cast<typename itk::NumericTraits<ScalarType>::PrintType>(spixel[0])
-        << ", "<< static_cast<typename itk::NumericTraits<ScalarType>::PrintType>(spixel[1])
-        << ", "<< static_cast<typename itk::NumericTraits<ScalarType>::PrintType>(spixel[2])
-        << std::endl;
-    oss <<"   displayed: "<< static_cast<typename itk::NumericTraits<ScalarType>::PrintType>(output[0])
-        << ", "<< static_cast<typename itk::NumericTraits<ScalarType>::PrintType>(output[1])
-        << ", "<< static_cast<typename itk::NumericTraits<ScalarType>::PrintType>(output[2])
-        <<std::endl;
-    return oss.str();
-  }
-
-  inline const std::string Describe(const RGBAPixelType & spixel) const
-  {
-    itk::OStringStream oss;
-    OutputPixelType output = this->Evaluate(spixel);
-    oss<<"RGBA value: "<< static_cast<typename itk::NumericTraits<ScalarType>::PrintType>(spixel[0])
-        << ", "<< static_cast<typename itk::NumericTraits<ScalarType>::PrintType>(spixel[1])
-        << ", "<< static_cast<typename itk::NumericTraits<ScalarType>::PrintType>(spixel[2])
-        << " alpha: "<< static_cast<typename itk::NumericTraits<ScalarType>::PrintType>(spixel[3])
-        << std::endl;
-    oss <<"   displayed: "<< static_cast<typename itk::NumericTraits<ScalarType>::PrintType>(output[0])
-        << ", "<< static_cast<typename itk::NumericTraits<ScalarType>::PrintType>(output[1])
-        << ", "<< static_cast<typename itk::NumericTraits<ScalarType>::PrintType>(output[2])
-        << " alpha: "<< static_cast<typename itk::NumericTraits<ScalarType>::PrintType>(output[3])
-        <<std::endl;
-    return oss.str();
-  }
-
-
-
-protected:
-  /** Constructor */
-  DirectRenderingFunction() : m_RedChannelIndex(0), m_GreenChannelIndex(1), m_BlueChannelIndex(2)
-  {}
-  /** Destructor */
-  ~DirectRenderingFunction() {}
-
-private:
-  DirectRenderingFunction(const Self&); //purposely not implemented
-  void operator=(const Self&); //purposely not implemented
-
-  /** Index of the channels to display (vector mode only, has no effet
-   *  on scalar mode)
-   */
-  unsigned int m_RedChannelIndex;
-  unsigned int m_GreenChannelIndex;
-  unsigned int m_BlueChannelIndex;
-
-};
-} // end namespace Functor
-} // end namespace otb
-
-#endif
-
-
diff --git a/Code/Visualization/otbRenderingFunction.h b/Code/Visualization/otbRenderingFunction.h
index 32855feca62345b19bafbdbfb7e0122fa7fdcb1b..f365db199f3c5cc68b2572fb3b688b845b1bc0cd 100644
--- a/Code/Visualization/otbRenderingFunction.h
+++ b/Code/Visualization/otbRenderingFunction.h
@@ -126,6 +126,11 @@ public:
     itkExceptionMacro(<<"Subclasses should override this method");
   }
 
+  virtual void SetAutoMinMax(bool autoMinMax)
+  {
+    itkExceptionMacro(<<"Subclasses should override this method");
+  }
+
   /** Get the histogram of the pixel representation generated from the sample list */
   virtual HistogramListPointerType GetHistogramList()
   {
diff --git a/Code/Visualization/otbRenderingImageFilter.h b/Code/Visualization/otbRenderingImageFilter.h
index df63a4138ccc78a95416f466dfbbfbffde2bf8a2..6f5c865a0b025b00d048afe821bfd486a01c8ed5 100644
--- a/Code/Visualization/otbRenderingImageFilter.h
+++ b/Code/Visualization/otbRenderingImageFilter.h
@@ -197,7 +197,9 @@ public:
 
     //Check if the rendering function channels are compatible with the image
     //might want to be more generic here one day.
-    unsigned int numberOfInputChannels = this->GetInput()->GetNumberOfComponentsPerPixel();
+//     unsigned int numberOfInputChannels = this->GetInput()->GetNumberOfComponentsPerPixel();
+    itk::ImageRegionConstIterator<TInputImage> it(this->GetInput(),this->GetInput()->GetBufferedRegion());
+    unsigned int numberOfInputChannels = VisualizationPixelTraits::PixelSize(it.Get());
     std::vector<unsigned int> channels = (this->GetFunctor().GetFunction())->GetChannelList();
     for (unsigned int i=0; i<channels.size(); ++i)
     {
diff --git a/Code/Visualization/otbStandardRenderingFunction.h b/Code/Visualization/otbStandardRenderingFunction.h
index e66cbea5424cfd54fd56541775790f7f51c4ee90..248f71c787338b077d25d6b5e6668ce0613bb7c9 100644
--- a/Code/Visualization/otbStandardRenderingFunction.h
+++ b/Code/Visualization/otbStandardRenderingFunction.h
@@ -142,14 +142,7 @@ public:
 //            << "m_TransferFunction(spixel[0])" << m_TransferFunction(spixel[0])
 //            << ", m_TransferedMinimum[0] " << m_TransferedMinimum[0]
 //            << ", m_TransferedMaximum[0] " << m_TransferedMaximum[0])
-//     otbMsgDevMacro(<<"StandardRenderingFunction::EvaluateTransferFunction "
-//            << "m_TransferFunction(spixel[1])" << m_TransferFunction(spixel[1])
-//            << ", m_TransferedMinimum[1] " << m_TransferedMinimum[1]
-//            << ", m_TransferedMaximum[1] " << m_TransferedMaximum[1])
-//     otbMsgDevMacro(<<"StandardRenderingFunction::EvaluateTransferFunction "
-//            << "m_TransferFunction(spixel[2])" << m_TransferFunction(spixel[2])
-//            << ", m_TransferedMinimum[2] " << m_TransferedMinimum[2]
-//            << ", m_TransferedMaximum[2] " << m_TransferedMaximum[2])
+
     if (spixel.Size() == 1)
     {
       OutputValueType value = ClampRescale(m_TransferFunction(spixel[0]),m_TransferedMinimum[0],m_TransferedMaximum[0]);
@@ -225,6 +218,18 @@ public:
         }
 
       }
+      else
+      {
+        unsigned int nbComps = m_PixelRepresentationFunction.GetOutputSize();
+        if (m_Minimum.empty())
+        {
+          m_Minimum.resize(nbComps,0);
+        }
+        if (m_Maximum.empty())
+        {
+          m_Maximum.resize(nbComps,255);
+        }
+      }
 
       typename ExtremaVectorType::const_iterator minIt = this->m_Minimum.begin();
       typename ExtremaVectorType::const_iterator maxIt = this->m_Maximum.begin();
@@ -280,75 +285,6 @@ public:
     return oss.str();
   }
 
-//   inline const std::string Describe(const ScalarType & spixel) const //FIXME not updated yet
-//   {
-//     itk::OStringStream oss;
-//     OutputPixelType output = this->Evaluate(spixel);
-//     oss<<"Grayscale [value: "<< static_cast<typename itk::NumericTraits<PixelType>::PrintType>(spixel)<<", displayed: "<< static_cast<unsigned int>(output[0])<<"]";
-//     return oss.str();
-//   }
-//
-//   inline const std::string Describe(const VectorPixelType & vpixel) const//FIXME not updated yet
-//   {
-//     itk::OStringStream oss;
-//     OutputPixelType output = this->Evaluate(vpixel);
-//
-//     for(unsigned int channel = 0; channel < vpixel.Size();++channel)
-//       {
-//       oss<<"c= "<< channel << ", ";
-//       if(channel == m_RedChannelIndex)
-//         {
-//         oss <<"R= " << std::setw(3) <<(int)output[0]<< ", ";
-//         }
-//       else if(channel == m_GreenChannelIndex)
-//         {
-//         oss <<"G= " << std::setw(3) <<(int)output[1]<< ", ";
-//         }
-//       else if(channel == m_BlueChannelIndex)
-//         {
-//         oss <<"B= " << std::setw(3) <<(int)output[2]<< ", ";
-//         }
-//       else
-//         {
-//         oss <<"       ";
-//         }
-//         oss<<"v= "<<static_cast<typename itk::NumericTraits<PixelType>::PrintType>(vpixel[channel])<<std::endl;
-//       }
-//     return oss.str();
-//   }
-//
-//   inline const std::string Describe(const RGBPixelType & spixel) const //FIXME not updated yet
-//   {
-//     itk::OStringStream oss;
-//     OutputPixelType output = this->Evaluate(spixel);
-//     oss<<"RGB value: "<< static_cast<typename itk::NumericTraits<ScalarType>::PrintType>(spixel[0])
-//         << ", "<< static_cast<typename itk::NumericTraits<ScalarType>::PrintType>(spixel[1])
-//         << ", "<< static_cast<typename itk::NumericTraits<ScalarType>::PrintType>(spixel[2])
-//         << std::endl;
-//     oss <<"   displayed: "<< static_cast<typename itk::NumericTraits<OutputPixelType>::PrintType>(output[0])
-//         << ", "<< static_cast<typename itk::NumericTraits<OutputPixelType>::PrintType>(output[1])
-//         << ", "<< static_cast<typename itk::NumericTraits<OutputPixelType>::PrintType>(output[2])
-//         <<std::endl;
-//     return oss.str();
-//   }
-//
-//   inline const std::string Describe(const RGBAPixelType & spixel) const //FIXME not updated yet
-//   {
-//     itk::OStringStream oss;
-//     OutputPixelType output = this->Evaluate(spixel);
-//     oss<<"RGBA value: "<< static_cast<typename itk::NumericTraits<ScalarType>::PrintType>(spixel[0])
-//         << ", "<< static_cast<typename itk::NumericTraits<ScalarType>::PrintType>(spixel[1])
-//         << ", "<< static_cast<typename itk::NumericTraits<ScalarType>::PrintType>(spixel[2])
-//         << " alpha: "<< static_cast<typename itk::NumericTraits<ScalarType>::PrintType>(spixel[3])
-//         << std::endl;
-//     oss <<"   displayed: "<< static_cast<typename itk::NumericTraits<OutputPixelType>::PrintType>(output[0])
-//         << ", "<< static_cast<typename itk::NumericTraits<OutputPixelType>::PrintType>(output[1])
-//         << ", "<< static_cast<typename itk::NumericTraits<OutputPixelType>::PrintType>(output[2])
-//         << " alpha: "<< static_cast<typename itk::NumericTraits<OutputPixelType>::PrintType>(output[3])
-//         <<std::endl;
-//     return oss.str();
-//   }
-
    /** Set the minimum and maximum for the different bands.
      * Has to be provided as [minBand0, maxBand0, minBand1, maxBand1,...]
      */
diff --git a/Code/Visualization/otbVisualizationPixelTraits.h b/Code/Visualization/otbVisualizationPixelTraits.h
index e7c7b5fd4acf998caf2ef1cd419570417a728414..bc72ebdc8d150768ec01c12c1886e610c8ffcd28 100644
--- a/Code/Visualization/otbVisualizationPixelTraits.h
+++ b/Code/Visualization/otbVisualizationPixelTraits.h
@@ -105,9 +105,7 @@ public:
   template< class TScalarTypeInput >
   static unsigned int PixelSize(const itk::RGBAPixel<TScalarTypeInput>& in)
   {
-    //We return only the useful size of the pixel, the alpha channel may be used later
-    //but only for display purposes
-    return 3;
+    return 4;
   }
 
   template< class TScalarTypeInput >