diff --git a/Code/MultiScale/otbMorphologicalPyramidAnalyseFilter.h b/Code/MultiScale/otbMorphologicalPyramidAnalyseFilter.h
index a3a67abf5ded59419220a106467e2453310136c2..95629971003253681a2a5ca9c08790802dbeeb51 100644
--- a/Code/MultiScale/otbMorphologicalPyramidAnalyseFilter.h
+++ b/Code/MultiScale/otbMorphologicalPyramidAnalyseFilter.h
@@ -84,12 +84,32 @@ public:
   itkSetMacro(SubSampleScale, float);
   itkGetConstReferenceMacro(NumberOfIterations, int);
   itkGetConstReferenceMacro(SubSampleScale, float);
-  /** Details images lists getters */
-  itkGetConstReferenceMacro(SupFiltre,OutputImageListPointerType);
-  itkGetConstReferenceMacro(InfFiltre,OutputImageListPointerType);
-  itkGetConstReferenceMacro(SupDeci,OutputImageListPointerType);
-  itkGetConstReferenceMacro(InfDeci,OutputImageListPointerType);
-
+  /**
+   * Get The Analyse image at each level of the pyramid.
+   * \return The analysed image at each level of the pyramid.
+   */
+  OutputImageListType* GetOutput(void);
+  /**
+   * Get The SupFiltre details
+   * \return The brighter details extracted from the filtering operation.
+   */
+  OutputImageListType * GetSupFiltre(void);
+  /**
+   * Get The InfFiltre details
+   * \return The darker details extracted from the filtering operation.
+   */
+  OutputImageListType * GetInfFiltre(void);
+  /**
+   * Get The SupDeci details
+   * \return The brighter details extracted from the resampling operation.
+   */
+  OutputImageListType * GetSupDeci(void);
+  /**
+   * Get The InfDeci details
+   * \return The brighter details extracted from the resampling operation.
+   */
+  OutputImageListType * GetInfDeci(void);
+  
 protected:  
   /** Constructor */
   MorphologicalPyramidAnalyseFilter();
@@ -106,14 +126,6 @@ protected:
   int m_NumberOfIterations;
   /** Subsampling scale used */
   float m_SubSampleScale;
-  /** Sup details from filtering operations */
-  OutputImageListPointerType m_SupFiltre;
-  /** Inf details from filtering operations */
-  OutputImageListPointerType m_InfFiltre;
-  /** Sup details from subsampling operations */
-  OutputImageListPointerType m_SupDeci;
-  /** Inf details from subsampling operations */
-  OutputImageListPointerType m_InfDeci;
 };
 }// End namespace otb
 
diff --git a/Code/MultiScale/otbMorphologicalPyramidAnalyseFilter.txx b/Code/MultiScale/otbMorphologicalPyramidAnalyseFilter.txx
index 88a5fdfd6546095bd234b875c5f0a4dea71156b3..48e15bd79074aa673b55398371b441d939bea307 100644
--- a/Code/MultiScale/otbMorphologicalPyramidAnalyseFilter.txx
+++ b/Code/MultiScale/otbMorphologicalPyramidAnalyseFilter.txx
@@ -36,12 +36,19 @@ namespace otb
   MorphologicalPyramidAnalyseFilter<TInputImage,TOutputImage, TMorphoFilter>
   ::MorphologicalPyramidAnalyseFilter()
   {
+    this->SetNumberOfRequiredOutputs(2);
     m_SubSampleScale = 2.0;
     m_NumberOfIterations = 4;
-    m_SupFiltre = OutputImageListType::New();
-    m_InfFiltre = OutputImageListType::New();
-    m_SupDeci =   OutputImageListType::New();
-    m_InfDeci =   OutputImageListType::New();
+    OutputImageListPointerType supFiltre = OutputImageListType::New();
+    this->SetNthOutput(0,supFiltre.GetPointer());
+    OutputImageListPointerType infFiltre = OutputImageListType::New();
+    this->SetNthOutput(1,infFiltre.GetPointer());
+    OutputImageListPointerType outputList = OutputImageListType::New();
+    this->SetNthOutput(2,outputList.GetPointer());
+    OutputImageListPointerType supDeci =   OutputImageListType::New();
+    this->SetNthOutput(3,supDeci.GetPointer());
+    OutputImageListPointerType infDeci =   OutputImageListType::New();
+    this->SetNthOutput(4,infDeci.GetPointer());
   }
   /**
    * Destructor
@@ -49,6 +56,66 @@ namespace otb
   template <class TInputImage, class TOutputImage, class TMorphoFilter>
   MorphologicalPyramidAnalyseFilter<TInputImage,TOutputImage,TMorphoFilter>
   ::~MorphologicalPyramidAnalyseFilter(){}
+  /**
+   * Get The Analyse image at each level of the pyramid.
+   * \return The analysed image at each level of the pyramid.
+   */
+  template <class TInputImage, class TOutputImage, class TMorphoFilter>
+  typename MorphologicalPyramidAnalyseFilter<TInputImage,TOutputImage,TMorphoFilter>
+  ::OutputImageListType*
+  MorphologicalPyramidAnalyseFilter<TInputImage,TOutputImage,TMorphoFilter>
+  ::GetOutput(void)
+  {
+    return dynamic_cast<OutputImageListType*>(this->itk::ProcessObject::GetOutput(2));
+  }  
+  /**
+   * Get The SupFiltre details
+   * \return The brighter details extracted from the filtering operation.
+   */
+  template <class TInputImage, class TOutputImage, class TMorphoFilter>
+  typename MorphologicalPyramidAnalyseFilter<TInputImage,TOutputImage,TMorphoFilter>
+  ::OutputImageListType*
+  MorphologicalPyramidAnalyseFilter<TInputImage,TOutputImage,TMorphoFilter>
+  ::GetSupFiltre(void)
+  {
+    return dynamic_cast<OutputImageListType*>(this->itk::ProcessObject::GetOutput(0));
+  }
+  /**
+   * Get The InfFiltre details
+   * \return The darker details extracted from the filtering operation.
+   */
+  template <class TInputImage, class TOutputImage, class TMorphoFilter>
+  typename MorphologicalPyramidAnalyseFilter<TInputImage,TOutputImage,TMorphoFilter>
+  ::OutputImageListType*
+  MorphologicalPyramidAnalyseFilter<TInputImage,TOutputImage,TMorphoFilter>
+  ::GetInfFiltre(void)
+  {
+    return dynamic_cast<OutputImageListType*>(this->itk::ProcessObject::GetOutput(1));
+  }
+  /**
+   * Get The SupDeci details
+   * \return The brighter details extracted from the resampling operation.
+   */
+  template <class TInputImage, class TOutputImage, class TMorphoFilter>
+  typename MorphologicalPyramidAnalyseFilter<TInputImage,TOutputImage,TMorphoFilter>
+  ::OutputImageListType*
+  MorphologicalPyramidAnalyseFilter<TInputImage,TOutputImage,TMorphoFilter>
+  ::GetSupDeci(void)
+  {
+    return dynamic_cast<OutputImageListType*>(this->itk::ProcessObject::GetOutput(3));
+  }
+  /**
+   * Get The InfDeci details
+   * \return The brighter details extracted from the resampling operation.
+   */
+  template <class TInputImage, class TOutputImage, class TMorphoFilter>
+  typename MorphologicalPyramidAnalyseFilter<TInputImage,TOutputImage,TMorphoFilter>
+  ::OutputImageListType*
+  MorphologicalPyramidAnalyseFilter<TInputImage,TOutputImage,TMorphoFilter>
+  ::GetInfDeci(void)
+  {
+    return dynamic_cast<OutputImageListType*>(this->itk::ProcessObject::GetOutput(4));
+  }
   /**
    * Main computation method
    */
@@ -59,6 +126,13 @@ namespace otb
   { 
     // Input image pointer
     OutputImageListType *   OutputImageList   = this->GetOutput();
+
+    // Output images pointers
+    OutputImageListType * supFiltre = this->GetSupFiltre();
+    OutputImageListType * infFiltre = this->GetInfFiltre();
+    OutputImageListType * supDeci = this->GetSupDeci();
+    OutputImageListType * infDeci = this->GetInfDeci();
+
     // typedefs of the filters
     typedef itk::SubtractImageFilter<InputImageType,InputImageType,OutputImageType> SubtractFilterType;
     typedef itk::MaximumImageFilter<InputImageType,InputImageType,InputImageType> MaxFilterType;
@@ -119,8 +193,8 @@ namespace otb
 	subtract1->SetInput2(morphoFilter->GetOutput());
 	subtract1->Update();
 	otbMsgDebugMacro(<<"MorphologicalPyramidAnalyseFilter: subtract1 OK "<<subtract1->GetOutput()->GetLargestPossibleRegion().GetSize());
-	m_SupFiltre->PushBack(subtract1->GetOutput());
-	otbMsgDebugMacro("MorphologicalPyramidAnalyseFilter: step "<<i<<" - Image appended to m_SupFiltre");
+	supFiltre->PushBack(subtract1->GetOutput());
+	otbMsgDebugMacro("MorphologicalPyramidAnalyseFilter: step "<<i<<" - Image appended to SupFiltre");
 
 	// InfFiltre detail image computation
 	subtract2 = SubtractFilterType::New();
@@ -128,8 +202,8 @@ namespace otb
 	subtract2->SetInput2(currentImage);
 	subtract2->Update();
 	otbMsgDebugMacro(<<"MorphologicalPyramidAnalyseFilter: subtract2 OK "<<subtract2->GetOutput()->GetLargestPossibleRegion().GetSize());
-	m_InfFiltre->PushBack(subtract2->GetOutput());
-	otbMsgDebugMacro("MorphologicalPyramidAnalyseFilter: step "<<i<<" - Image appended to m_InfFiltre");
+	infFiltre->PushBack(subtract2->GetOutput());
+	otbMsgDebugMacro("MorphologicalPyramidAnalyseFilter: step "<<i<<" - Image appended to InfFiltre");
 	
 	// New  Size
 	size = morphoFilter->GetOutput()->GetLargestPossibleRegion().GetSize();
@@ -172,8 +246,8 @@ namespace otb
 	subtract4->SetInput2(morphoFilter->GetOutput());
 	subtract4->Update();
 	otbMsgDebugMacro(<<"MorphologicalPyramidAnalyseFilter: subtract4 OK "<<subtract4->GetOutput()->GetLargestPossibleRegion().GetSize());
-	m_InfDeci->PushBack(subtract4->GetOutput());
-	otbMsgDebugMacro("MorphologicalPyramidAnalyseFilter: step "<<i<<" - Image appended to m_InfDeci");
+	infDeci->PushBack(subtract4->GetOutput());
+	otbMsgDebugMacro("MorphologicalPyramidAnalyseFilter: step "<<i<<" - Image appended to InfDeci");
 
 	// SupDeci detail image computation
 	subtract3 = SubtractFilterType::New();
@@ -181,8 +255,8 @@ namespace otb
 	subtract3->SetInput2(resampler2->GetOutput());
 	subtract3->Update();
 	otbMsgDebugMacro(<<"MorphologicalPyramidAnalyseFilter: subtract3 OK "<<subtract3->GetOutput()->GetLargestPossibleRegion().GetSize());
-	m_SupDeci->PushBack(subtract3->GetOutput());
-	otbMsgDebugMacro("MorphologicalPyramidAnalyseFilter: step "<<i<<" - Image appended to m_SupDeci");
+	supDeci->PushBack(subtract3->GetOutput());
+	otbMsgDebugMacro("MorphologicalPyramidAnalyseFilter: step "<<i<<" - Image appended to SupDeci");
 
 	// Iteration ounter incrementation
 	i++;
diff --git a/Code/MultiScale/otbMorphologicalPyramidMRToMSConverter.h b/Code/MultiScale/otbMorphologicalPyramidMRToMSConverter.h
index 55f3bbc52ad0340585c4d54e8a68d67c90f646f2..8178bb334410e3332f9f59d92d03e4a3f2172fa0 100644
--- a/Code/MultiScale/otbMorphologicalPyramidMRToMSConverter.h
+++ b/Code/MultiScale/otbMorphologicalPyramidMRToMSConverter.h
@@ -1,20 +1,20 @@
 /*=========================================================================
 
-Program:   ORFEO Toolbox
-Language:  C++
-Date:      $Date$
-Version:   $Revision$
+ Program:   ORFEO Toolbox
+ Language:  C++
+ Date:      $Date$
+ Version:   $Revision$
 
 
-Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
-See OTBCopyright.txt for details.
+ 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.
+ 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 _otbMorphologicalPyramidMRToMSConverter_h
 #define _otbMorphologicalPyramidMRToMSConverter_h
 
@@ -52,25 +52,96 @@ namespace otb
 	  /** Input parameters typedefs */
 	  typedef TInputImage                                     InputImageType;
 	  typedef typename Superclass::InputImagePointer          InputImagePointer;
+	  typedef typename Superclass::InputImageListType         InputImageListType;
 	  typedef typename Superclass::InputImageListPointerType  InputImageListPointerType;
+	  typedef typename InputImageListType::Iterator           InputImageListIteratorType;
 	  /** Output parameters typedefs */
 	  typedef TOutputImage                                    OutputImageType;
 	  typedef typename Superclass::OutputImagePointer         OutputImagePointerType;
 	  typedef typename Superclass::OutputImageListType        OutputImageListType;
 	  typedef typename Superclass::OutputImageListPointerType OutputImageListPointerType;
-	  /** Input image lists setters */
-	  itkSetMacro(SupFiltre,InputImageListPointerType);
-	  itkSetMacro(InfFiltre,InputImageListPointerType);
-	  itkSetMacro(SupDeci,InputImageListPointerType);
-	  itkSetMacro(InfDeci,InputImageListPointerType);
+	  
+	  /**
+	   * Set The input list.
+	   * \param imageList The analysed image at each level of the pyramid.
+	   */
+	    void SetInput(InputImageListType * imageList);
+	  /**
+	   * Set The SupFiltre details
+	   * \param imageList The brighter details extracted from the filtering operation.
+	   */
+	  void SetSupFiltre(InputImageListType * imageList);
+	  /**
+	   * Set The InfFiltre details
+	   * \param imageList The darker details extracted from the filtering operation.
+	   */
+	  void SetInfFiltre(InputImageListType * imageList);
+	  /**
+	   * Set The SupDeci details
+	   * \param imageList The brighter details extracted from the filtering operation.
+	   */
+	  void SetSupDeci(InputImageListType * imageList);
+	  /**
+	   * Set The InfDeci details
+	   * \param imageList The darker details extracted from the filtering operation.
+	   */
+	  void SetInfDeci(InputImageListType * imageList);
+	  /**
+	   * Get the input list.
+	   * \return The list of the analysed image at each pyramid level.
+	   */
+	  InputImageListType* GetInput(void); 
+	  /**
+	   * Get The SupFiltre details
+	   * \return The brighter details extracted from the filtering operation.
+	   */
+	  InputImageListType* GetSupFiltre(void);   
+	  /**
+	   * Get The InfFiltre details
+	   * \return The darker details extracted from the filtering operation.
+	   */
+	  InputImageListType* GetInfFiltre(void);
+	  /**
+	   * Get The SupDeci details
+	   * \return The brighter details extracted from the resampling operation.
+	   */
+	  InputImageListType* GetSupDeci(void);
+	  /**
+	   * Get The InfDeci details
+	   * \return The brighter details extracted from the resampling operation.
+	   */
+	  InputImageListType* GetInfDeci(void);
+	  /**
+	   * Get The inputList at full resolution.
+	   * \return The analysed image at each pyramid level
+	   * resampled at full resolution.
+	   */
+	  OutputImageListType* GetOutput(void);
+	  /**
+	   * Get The SupFiltre details at full resolution.
+	   * \return The brighter details extracted from the filtering operation 
+	   * resampled at full resolution.
+	   */
+	  OutputImageListType * GetSupFiltreFullResolution(void);
+	  /**
+	   * Get The InfFiltre details at full resolution.
+	   * \return The darker details extracted from the filtering operation
+	   * resampled at full resolution.
+	   */
+	  OutputImageListType * GetInfFiltreFullResolution(void);
+	  /**
+	   * Get The SupDeci details at full resolution.
+	   * \return The brighter details extracted from the resampling operation 
+	   * resampled at full resolution.
+	   */
+	  OutputImageListType * GetSupDeciFullResolution(void);
+	  /**
+	   * Get The InfDeci details at full resolution.
+	   * \return The darker details extracted from the resampling operation
+	   * resampled at full resolution.
+	   */
+	  OutputImageListType * GetInfDeciFullResolution(void);
 
-	  /** Number of iterations accessors */
-	  itkSetMacro(NumberOfIterations, unsigned int);
-	  itkGetMacro(NumberOfIterations, unsigned int);
-
-	  /** Full resolution detail image lists getters */
-	  itkGetMacro(SupFiltreFullResolution,OutputImageListPointerType);
-	  itkGetMacro(InfFiltreFullResolution,OutputImageListPointerType);
 	protected:
 	  /** Constructor */
 	  MRToMSConverter();
@@ -85,18 +156,6 @@ namespace otb
 	  private :
 	    MRToMSConverter(const Self&); // purposely not implemented
 	  void operator=(const Self&); // purposely not implemented
-
-	  InputImageListPointerType  m_SupFiltre;
-	  InputImageListPointerType  m_InfFiltre;
-	  InputImageListPointerType  m_SupDeci;
-	  InputImageListPointerType  m_InfDeci;
-	  OutputImageListPointerType m_SupFiltreFullResolution;
-	  OutputImageListPointerType m_InfFiltreFullResolution;
-	  unsigned int m_NumberOfIterations;
-
-
-
-
 	};
     } // End namespace morphologicalPyramid
 }// End namespace otb
diff --git a/Code/MultiScale/otbMorphologicalPyramidMRToMSConverter.txx b/Code/MultiScale/otbMorphologicalPyramidMRToMSConverter.txx
index 15847087bec743f14ded947807f3c8c496c05277..ab36fa4c89e7eff5999ba96cce4887ce32b412c5 100644
--- a/Code/MultiScale/otbMorphologicalPyramidMRToMSConverter.txx
+++ b/Code/MultiScale/otbMorphologicalPyramidMRToMSConverter.txx
@@ -33,9 +33,198 @@ namespace otb
     MRToMSConverter<TInputImage, TOuputImage>
     ::MRToMSConverter()
     {
-      m_InfFiltreFullResolution = OutputImageListType::New();
-      m_SupFiltreFullResolution = OutputImageListType::New();
-      m_NumberOfIterations = 0;
+      this->SetNumberOfRequiredInputs(2);
+      this->SetNumberOfRequiredOutputs(2);
+      OutputImageListPointerType supFiltre = OutputImageListType::New();
+      this->SetNthOutput(0,supFiltre.GetPointer());
+      OutputImageListPointerType infFiltre = OutputImageListType::New();
+      this->SetNthOutput(1,infFiltre.GetPointer());
+      OutputImageListPointerType outputList = OutputImageListType::New();
+      this->SetNthOutput(2,outputList.GetPointer());
+      OutputImageListPointerType supDeci =   OutputImageListType::New();
+      this->SetNthOutput(3,supDeci.GetPointer());
+      OutputImageListPointerType infDeci =   OutputImageListType::New();
+      this->SetNthOutput(4,infDeci.GetPointer());
+    }
+    /**
+     * Get The inputList at full resolution.
+     * \return The analysed image at each pyramid level
+     * resampled at full resolution.
+     */
+    template <class TInputImage, class TOutputImage>
+    typename MRToMSConverter<TInputImage,TOutputImage>
+    ::OutputImageListType*
+    MRToMSConverter<TInputImage,TOutputImage>
+    ::GetOutput(void)
+    {
+      return dynamic_cast<OutputImageListType*>(this->itk::ProcessObject::GetOutput(2));
+    }
+    /**
+     * Get The SupFiltre details at full resolution.
+     * \return The brighter details extracted from the filtering operation.
+     * resampled at full resolution.
+     */
+    template <class TInputImage, class TOutputImage>
+    typename MRToMSConverter<TInputImage,TOutputImage>
+    ::OutputImageListType*
+    MRToMSConverter<TInputImage,TOutputImage>
+    ::GetSupFiltreFullResolution(void)
+    {
+      return dynamic_cast<OutputImageListType*>(this->itk::ProcessObject::GetOutput(0));
+    }
+    /**
+     * Get The InfFiltre details at full resolution.
+     * \return The darker details extracted from the filtering operation.
+     * resampled at full resolution.
+     */
+    template <class TInputImage, class TOutputImage>
+    typename MRToMSConverter<TInputImage,TOutputImage>
+    ::OutputImageListType*
+    MRToMSConverter<TInputImage,TOutputImage>
+    ::GetInfFiltreFullResolution(void)
+    {
+      return dynamic_cast<OutputImageListType*>(this->itk::ProcessObject::GetOutput(1));
+    }
+    /**
+     * Get The SupDeci details at full resolution.
+     * \return The brighter details extracted from the resampling operation.
+     * resampled at full resolution.
+     */
+    template <class TInputImage, class TOutputImage>
+    typename MRToMSConverter<TInputImage,TOutputImage>
+    ::OutputImageListType*
+    MRToMSConverter<TInputImage,TOutputImage>
+    ::GetSupDeciFullResolution(void)
+    {
+      return dynamic_cast<OutputImageListType*>(this->itk::ProcessObject::GetOutput(3));
+    }
+    /**
+     * Get The InfDeci details  at full resolution.
+     * \return The brighter details extracted from the resampling operation.
+     * resampled at full resolution.
+     */
+    template <class TInputImage, class TOutputImage>
+    typename MRToMSConverter<TInputImage,TOutputImage>
+    ::OutputImageListType*
+    MRToMSConverter<TInputImage,TOutputImage>
+    ::GetInfDeciFullResolution(void)
+    {
+      return dynamic_cast<OutputImageListType*>(this->itk::ProcessObject::GetOutput(4));
+    }
+    /**
+     * Set The input list.
+     * \param imageList The analysed image at each level of the pyramid.
+     */
+    template <class TInputImage, class TOutputImage>
+    void 
+    MRToMSConverter<TInputImage,TOutputImage>
+    ::SetInput(InputImageListType * imageList)
+    {
+      this->SetNthInput(2,const_cast<InputImageListType *>(imageList));
+    }
+    /**
+     * Set The SupFiltre details
+     * \param imageList The brighter details extracted from the filtering operation.
+     */
+    template <class TInputImage, class TOutputImage>
+    void 
+    MRToMSConverter<TInputImage,TOutputImage>
+    ::SetSupFiltre(InputImageListType * imageList)
+    {
+      this->SetNthInput(0,const_cast<InputImageListType *>(imageList));
+    }
+    /**
+     * Set The InfFiltre details
+     * \param imageList The darker details extracted from the filtering operation.
+     */
+    template <class TInputImage, class TOutputImage>
+    void 
+    MRToMSConverter<TInputImage,TOutputImage>
+    ::SetInfFiltre(InputImageListType * imageList)
+    {
+      this->SetNthInput(1,const_cast<InputImageListType *>(imageList));
+    }
+    /**
+     * Set The SupDeci details
+     * \param imageList The brighter details extracted from the filtering operation.
+     */
+    template <class TInputImage, class TOutputImage>
+    void 
+    MRToMSConverter<TInputImage,TOutputImage>
+    ::SetSupDeci(InputImageListType * imageList)
+    {
+      this->SetNthInput(3,const_cast<InputImageListType *>(imageList));
+    }
+    /**
+     * Set The InfDeci details
+     * \param imageList The darker details extracted from the filtering operation.
+     */
+    template <class TInputImage, class TOutputImage>
+    void 
+    MRToMSConverter<TInputImage,TOutputImage>
+    ::SetInfDeci(InputImageListType * imageList)
+    {
+      this->SetNthInput(4,const_cast<InputImageListType *>(imageList));
+    }
+    /**
+     * Get the input list.
+     * \return The list of the analysed image at each pyramid level.
+     */
+    template <class TInputImage, class TOutputImage>
+    typename MRToMSConverter<TInputImage,TOutputImage>
+    ::InputImageListType*
+    MRToMSConverter<TInputImage,TOutputImage>
+    ::GetInput(void)
+    {
+      return dynamic_cast<InputImageListType *>(this->itk::ProcessObject::GetInput(2));
+    }
+    /**
+     * Get The SupFiltre details.
+     * \return The brighter details extracted from the filtering operation 
+     */
+    template <class TInputImage, class TOutputImage>
+    typename MRToMSConverter<TInputImage,TOutputImage>
+    ::InputImageListType*
+    MRToMSConverter<TInputImage,TOutputImage>
+    ::GetSupFiltre(void)
+    {
+      return dynamic_cast<InputImageListType *>(this->itk::ProcessObject::GetInput(0));
+    }
+    /**
+     * Get The InfFiltre details.
+     * \return The darker details extracted from the filtering operation
+     */
+    template <class TInputImage, class TOutputImage>
+    typename MRToMSConverter<TInputImage,TOutputImage>
+    ::InputImageListType*
+    MRToMSConverter<TInputImage,TOutputImage>
+    ::GetInfFiltre(void)
+    {
+      return dynamic_cast<InputImageListType *>(this->itk::ProcessObject::GetInput(1));
+    }
+    /**
+     * Get The SupDeci details.
+     * \return The brighter details extracted from the resampling operation 
+     */
+    template <class TInputImage, class TOutputImage>
+    typename MRToMSConverter<TInputImage,TOutputImage>
+    ::InputImageListType*
+    MRToMSConverter<TInputImage,TOutputImage>
+    ::GetSupDeci(void)
+    {
+      return dynamic_cast<InputImageListType *>(this->itk::ProcessObject::GetInput(3));
+    }
+    /**
+     * Get The InfDeci details.
+     * \return The darker details extracted from the resampling operation.
+     */
+    template <class TInputImage, class TOutputImage>
+    typename MRToMSConverter<TInputImage,TOutputImage>
+    ::InputImageListType*
+    MRToMSConverter<TInputImage,TOutputImage>
+    ::GetInfDeci(void)
+    {
+      return dynamic_cast<InputImageListType *>(this->itk::ProcessObject::GetInput(4));
     }
     /**
      * Main computation method
@@ -45,6 +234,20 @@ namespace otb
     MRToMSConverter<TInputImage, TOuputImage>
     ::GenerateData()
     {
+      // Input images lists pointers
+      InputImageListPointerType  supFiltre = this->GetSupFiltre();
+      InputImageListPointerType  infFiltre = this->GetInfFiltre();
+      InputImageListPointerType  supDeci = this->GetSupDeci();
+      InputImageListPointerType  infDeci = this->GetInfDeci();
+      InputImageListPointerType  inputList = this->GetInput();
+      
+      // Output images lists pointers
+      OutputImageListPointerType  supFiltreFullResolution = this->GetSupFiltreFullResolution();
+      OutputImageListPointerType  infFiltreFullResolution = this->GetInfFiltreFullResolution();
+      OutputImageListPointerType  supDeciFullResolution = this->GetSupDeciFullResolution();
+      OutputImageListPointerType  infDeciFullResolution = this->GetInfDeciFullResolution();
+      OutputImageListPointerType  outputList = this->GetOutput();
+
       // typedef of the resampling filter
       typedef otb::morphologicalPyramid::Resampler<InputImageType,OutputImageType> ResamplerType;
 
@@ -52,31 +255,91 @@ namespace otb
       typename ResamplerType::Pointer resampler;
 
       // Full resolution size
-      typename InputImageType::SizeType frsize = m_SupFiltre->Front()->GetLargestPossibleRegion().GetSize();
-      otbMsgDebugMacro(<<"Full resolution size: "<<frsize);
-
-      /// Full resolution details reconstruction  
-      for(int i=0; i<m_NumberOfIterations; i++)
+      typename InputImageType::SizeType frsize = supFiltre->Front()->GetLargestPossibleRegion().GetSize();
+      otbMsgDebugMacro(<<"MRToMSConverter: Full resolution size: "<<frsize);
+      
+      // SupFiltre resampling
+      otbMsgDebugMacro(<<"MRToMSConverter: SupFiltre resampling.");
+      InputImageListIteratorType it = supFiltre->Begin();
+      // The first image does not need any resampling
+      supFiltreFullResolution->PushBack(it.Get());
+      ++it;
+      for(;it!=supFiltre->End();++it)
 	{
 	  resampler = ResamplerType::New();
 	  resampler->SetSize(frsize);
-	  resampler->SetInput(m_SupFiltre->GetNthElement(i));
-	  resampler->Update();
-	  m_SupFiltreFullResolution->PushBack(resampler->GetOutput());
-	  otbMsgDebugMacro(<<"SupFiltre Details reconstruction level "<<i<<" OK");
-	  resampler = ResamplerType::New();
-	  resampler->SetSize(frsize);
-	  resampler->SetInput(m_InfFiltre->GetNthElement(i));
+	  resampler->SetInput(it.Get());
 	  resampler->Update();
-	  m_InfFiltreFullResolution->PushBack(resampler->GetOutput());
-	  otbMsgDebugMacro(<<"InfFiltre Details reconstruction level "<<i<<" OK");
+	  supFiltreFullResolution->PushBack(resampler->GetOutput());
+	}
+      otbMsgDebugMacro(<<"MRToMSConverter: InfFiltre resampling.");
+      // InfFiltre resampling
+      it = infFiltre->Begin();
+      // The first image does not need any resampling
+      infFiltreFullResolution->PushBack(it.Get());
+      ++it;
+      for(;it!=infFiltre->End();++it)
+	{
 	  resampler = ResamplerType::New();
 	  resampler->SetSize(frsize);
-	  resampler->SetInput(this->GetInput()->GetNthElement(i));
+	  resampler->SetInput(it.Get());
 	  resampler->Update();
-	  this->GetOutput()->PushBack(resampler->GetOutput());
-	  otbMsgDebugMacro(<<"Analyse Details reconstruction level "<<i<<" OK");	   
-	} 
+	  infFiltreFullResolution->PushBack(resampler->GetOutput());
+	}
+
+      if(inputList)
+	{
+	  otbMsgDebugMacro(<<"MRToMSConverter: Optional inputList resampling.");
+	  // Analyse image resampling
+	  it = inputList->Begin();
+	  // The first image does not need any resampling
+	  outputList->PushBack(it.Get());
+	  ++it;
+	  for(;it!=inputList->End();++it)
+	    {
+	      resampler = ResamplerType::New();
+	      resampler->SetSize(frsize);
+	      resampler->SetInput(it.Get());
+	      resampler->Update();
+	      outputList->PushBack(resampler->GetOutput());
+	    }
+	}
+
+      if(supDeci)
+	{
+	  otbMsgDebugMacro(<<"MRToMSConverter: Optional supDeci resampling.");
+	  // SupDeci resampling
+	  it = supDeci->Begin();
+	  // The first image does not need any resampling
+	  supDeciFullResolution->PushBack(it.Get());
+	  ++it;
+	  for(;it!=supDeci->End();++it)
+	    {
+	      resampler = ResamplerType::New();
+	      resampler->SetSize(frsize);
+	      resampler->SetInput(it.Get());
+	      resampler->Update();
+	      supDeciFullResolution->PushBack(resampler->GetOutput());
+	    }
+	}
+
+      if(infDeci)
+	{
+	  otbMsgDebugMacro(<<"MRToMSConverter: Optional infDeci resampling.");
+	  // InfDeci resampling
+	  it = infDeci->Begin();
+	  // The first image does not need any resampling
+	  infDeciFullResolution->PushBack(it.Get());
+	  ++it;
+	  for(;it!=infDeci->End();++it)
+	    {
+	      resampler = ResamplerType::New();
+	      resampler->SetSize(frsize);
+	      resampler->SetInput(it.Get());
+	      resampler->Update();
+	      infDeciFullResolution->PushBack(resampler->GetOutput());
+	    }
+	}
     }
     /**
      * PrintSelf method
diff --git a/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.h b/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.h
new file mode 100644
index 0000000000000000000000000000000000000000..8cb9aec0d60ef3542b1e6a98b43116e0f57d9a69
--- /dev/null
+++ b/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.h
@@ -0,0 +1,160 @@
+/*=========================================================================
+
+  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 _otbMorphologicalPyramidSegmentationFilter_h
+#define _otbMorphologicalPyramidSegmentationFilter_h
+
+#include "otbImageListToImageListFilter.h"
+namespace otb
+{
+/** \class MorphologicalPyramidSegmentationFilter
+ * \brief This filter performs a segmentation of the details supFiltre and infFiltre extracted
+ * with the morphological pyramid.
+ *
+ * The first step is to convert the multi-resolution analysis from the pyramid to a multi-scale one using the
+ * MRToMSConverter filter.
+ *
+ * The segmentation algorithm used is based on seeds extraction using the ImageToPointSetFilter, followed by 
+ * a connected threshold segmentation using the ConnectedThresholdImageFilter. A final relabelling step is done
+ * with the LabelImageFilter adn RelabelImageFilter to remove object whose sizes are to small regarding the 
+ * MinimumObjectSize parameter. The threshold for seeds extraction and segmentation are computed using quantiles.
+ *
+ * A pre processing step is applied by multiplying the full resolution brighter details (resp. darker details) 
+ * with the original image (resp. the inverted original image). This perfoms an enhancement of the regions contour 
+ * precision.
+ * 
+ * The details from the pyramid are set via the SetBrighterDetails() and SetDarkerDetails() methods. The brighter and 
+ * darker details depends on the filter used in the pyramid analysis. If the OpeningClosing filter is used, then the 
+ * brighter details are those from the supFiltre image list, whereas if the ClosingOpening filter is used, the brighter 
+ * details are those from the infFiltre list.
+ * 
+ * The output of the segmentation filter is a single segmentation images list, containing first the brighter details 
+ * segmentation from higher scale to lower, and then the darker details in the same order. The attention of the used 
+ * is drawn to the fact that since the label filter used internally will deal with a large number of labels, so the
+ * OutputPixelType is required to be sufficiently precise. Unsigned short or Unsigned long would be a good choice, 
+ * unless the user has a very good reason to think that a less precise type will be sufficient.  
+ *
+ * \ingroup MultiScale
+ * \sa MorphologicalPyramidSynthesisFilter,OpeningClosingMorphologicalFilter,
+ * ClosingOpeningMorphologicalFilter, Segmenter, MRToMSConverter, Resampler
+ */
+template <class TInputImage, class TOutputImage>
+class MorphologicalPyramidSegmentationFilter
+  : public ImageListToImageListFilter<TInputImage,TOutputImage>
+{
+public:
+  /** Standard typedefs */
+  typedef MorphologicalPyramidSegmentationFilter               Self;
+  typedef ImageListToImageListFilter<TInputImage,TOutputImage> Superclass;
+  typedef itk::SmartPointer<Self>                              Pointer;
+  typedef itk::SmartPointer<const Self>                        ConstPointer;
+  /** Creation through object factory macro */
+  itkNewMacro(Self);
+  /** Type macro */
+  itkTypeMacro(MorphologicalPyramidSegmentationFilter,ImageListToImageListFilter);
+  /** Input image dimension constant macro */
+  itkStaticConstMacro(InputImageDimension, unsigned int,TInputImage::ImageDimension);
+  /** Output related typedefs */
+  typedef typename Superclass::OutputImageType         OutputImageType;
+  typedef typename OutputImageType::PixelType          OutputPixelType;
+  typedef typename Superclass::OutputImageListType     OutputImageListType;
+  typedef typename OutputImageListType::Pointer        OutputImageListPointerType;
+  typedef typename Superclass::OutputImagePointerType  OutputImagePointerType;
+  typedef typename OutputImageListType::Iterator       OutputImageListIteratorType;
+  /** Input related typedefs */
+  typedef typename Superclass::InputImageType          InputImageType;  
+  typedef typename InputImageType::PixelType           InputPixelType;        
+  typedef typename InputImageType::Pointer             InputImagePointerType;
+  typedef typename Superclass::InputImageListType      InputImageListType;
+  typedef typename InputImageListType::Pointer         InputImageListPointerType;
+  /** Vector of number of objects */
+  typedef std::vector<OutputPixelType>                 NumberOfObjectsVectorType;
+  /** Min object size parameter accessor */
+  itkSetMacro(MinimumObjectSize,unsigned long);
+  itkGetMacro(MinimumObjectSize,unsigned long);
+  /** Quantile for seeds extraction */
+  itkSetMacro(SeedsQuantile,float);
+  itkGetMacro(SeedsQuantile,float);
+  /** Quantile for connected thresholding */
+  itkSetMacro(ConnectedThresholdQuantile,float);
+  itkGetMacro(ConnectedThresholdQuantile,float);
+  /**
+   * Get a vector containing the number of segmented objects for each image.
+   * \return The vector.
+   */
+  NumberOfObjectsVectorType GetNumberOfObjectsVector(void);
+  /**
+   * Set the reference image.
+   * \param image The reference image which was decomposed by the pyramid.
+   */
+  void SetReferenceImage(InputImageType * image);
+  /**
+   * Set the brighter details from the pyramid. The brighter details are the supFiltre or
+   * infFiltre details from the pyramid, depending on the morphological filter used.
+   * \param imageList The brighter details extracted from the filtering operation.
+   */
+  void SetBrighterDetails(InputImageListType * imageList);
+  /**
+   * Set the darker details from the pyramid. The darker details are the supFiltre or
+   * infFiltre details from the pyramid, depending on the morphological filter used.
+   * \param imageList The darker details extracted from the filtering operation.
+   */
+  void SetDarkerDetails(InputImageListType * imageList);
+  /**
+   * Get the reference image
+   * \return The reference image.
+   */
+  InputImageType* GetReferenceImage(void);
+  /**
+   * Get the brighter details from the pyramid. The brighter details are the supFiltre or
+   * infFiltre details from the pyramid, depending on the morphological filter used.
+   * \return The brighter details extracted from the resampling operation.
+   */
+  InputImageListType* GetBrighterDetails(void);
+  /**
+   * Get the darker details from the pyramid. The darker details are the supFiltre or
+   * infFiltre details from the pyramid, depending on the morphological filter used.
+   * \return The darker details extracted from the resampling operation.
+   */
+  InputImageListType *GetDarkerDetails(void);
+
+protected:  
+  /** Constructor */
+  MorphologicalPyramidSegmentationFilter();
+  /** Destructor */
+  ~MorphologicalPyramidSegmentationFilter();
+  virtual void GenerateOutputInformation(){}; // does nothing
+  /** Main computation method */
+  virtual void GenerateData();
+  /** Printself method */
+  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;  
+ private:
+  unsigned long  m_MinimumObjectSize;
+  /** Quantile for seeds determination */
+  float m_SeedsQuantile;
+  /** Quantile to set the connectedThresholdFilter threshold */
+  float m_ConnectedThresholdQuantile;
+  /** Number of segmented objects per images */
+  NumberOfObjectsVectorType m_NumberOfObjectsVector;
+};
+}// End namespace otb
+
+#ifndef OTB_MANUAL_INSTANTIATION
+#include "otbMorphologicalPyramidSegmentationFilter.txx"
+#endif
+
+#endif
diff --git a/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.txx b/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.txx
new file mode 100644
index 0000000000000000000000000000000000000000..67becee280fba8a53b29d3cfe82df529724cd3ec
--- /dev/null
+++ b/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.txx
@@ -0,0 +1,208 @@
+/*=========================================================================
+
+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 _otbMorphologicalPyramidSegmentationFilter_txx
+#define _otbMorphologicalPyramidSegmentationFilter_txx
+
+#include "otbMorphologicalPyramidSegmentationFilter.h"
+
+#include "otbMorphologicalPyramidMRToMSConverter.h"
+#include "otbMorphologicalPyramidSegmenter.h"
+#include "otbMacro.h"
+
+namespace otb
+{
+/**
+ * Constructor
+ */
+template <class TInputImage, class TOutputImage>
+MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
+::MorphologicalPyramidSegmentationFilter() 
+{
+  this->SetNumberOfRequiredInputs(3);
+}
+/**
+ * Destructor
+ */
+template <class TInputImage, class TOutputImage>
+MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
+::~MorphologicalPyramidSegmentationFilter() {}
+  
+/**
+ * Set the reference image.
+ * \param image The reference image which was decomposed by the pyramid.
+ */
+template <class TInputImage, class TOutputImage>
+void 
+MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
+::SetReferenceImage(InputImageType * image)
+{
+  this->SetNthInput(0,const_cast<InputImageType *>(image));
+}
+/**
+ * Set the brighter details from the pyramid. The brighter details are the supFiltre or
+ * infFiltre details from the pyramid, depending on the morphological filter used.
+ * \param imageList The brighter details extracted from the filtering operation.
+ */
+template <class TInputImage, class TOutputImage>
+void 
+MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
+::SetBrighterDetails(InputImageListType * imageList)
+{
+  this->SetNthInput(1,const_cast<InputImageListType *>(imageList));
+}
+/**
+ * Set the darker details from the pyramid. The darker details are the supFiltre or
+ * infFiltre details from the pyramid, depending on the morphological filter used.
+ * \param imageList The darker details extracted from the filtering operation.
+ */
+template <class TInputImage, class TOutputImage>
+void 
+MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
+::SetDarkerDetails(InputImageListType * imageList)
+{
+this->SetNthInput(2,const_cast<InputImageListType *>(imageList));
+}
+/**
+ * Get the reference image
+ * \return The reference image.
+ */
+template <class TInputImage, class TOutputImage>
+typename MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
+::InputImageType*
+MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
+::GetReferenceImage(void)
+{
+  return dynamic_cast<InputImageType *>(this->itk::ProcessObject::GetInput(0));
+}
+/**
+ * Get the brighter details from the pyramid. The brighter details are the supFiltre or
+ * infFiltre details from the pyramid, depending on the morphological filter used.
+ * \param imageList The brighter details extracted from the filtering operation.
+ */
+template <class TInputImage, class TOutputImage>
+typename MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
+::InputImageListType*
+MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
+::GetBrighterDetails(void)
+{
+  return dynamic_cast<InputImageListType *>(this->itk::ProcessObject::GetInput(1));
+}
+/**
+ * Get the darker details from the pyramid. The darker details are the supFiltre or
+ * infFiltre details from the pyramid, depending on the morphological filter used.
+ * \return The darker details extracted from the resampling operation.
+ */
+template <class TInputImage, class TOutputImage>
+typename MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
+::InputImageListType*
+MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
+::GetDarkerDetails(void)
+{
+  return dynamic_cast<InputImageListType *>(this->itk::ProcessObject::GetInput(2));
+}
+
+/**
+ * Get a vector containing the number of segmented objects for each image.
+ * \return The vector.
+ */
+template <class TInputImage, class TOutputImage>
+typename MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
+::NumberOfObjectsVectorType
+MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
+::GetNumberOfObjectsVector(void)
+{
+  return m_NumberOfObjectsVector;
+}
+/**
+ * Main computation method
+ */
+template <class TInputImage, class TOutputImage>
+void
+MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
+::GenerateData(void)
+{
+  // Reference image pointer
+  InputImagePointerType referenceImage = this->GetReferenceImage();
+  otbMsgDebugMacro("SegmentationFilter: reference image size: "<<referenceImage->GetLargestPossibleRegion().GetSize());
+
+  // Output images list pointer
+  OutputImageListPointerType outputList = this->GetOutput();
+
+  // Multi resolution to multi scale filter typedef
+  typedef otb::morphologicalPyramid::MRToMSConverter<InputImageType,InputImageType> MRToMSConverterType;
+
+  // Segmentation filter typedef
+  typedef otb::morphologicalPyramid::Segmenter<InputImageType,OutputImageType> SegmenterType;
+
+  // MR To MS conversion
+  typename MRToMSConverterType::Pointer mrtoms = MRToMSConverterType::New();
+  mrtoms->SetSupFiltre(this->GetBrighterDetails());
+  mrtoms->SetInfFiltre(this->GetDarkerDetails());
+  mrtoms->Update();
+  
+  // Full resolution Input images lists pointers
+  InputImageListPointerType brighter = mrtoms->GetSupFiltreFullResolution();
+  InputImageListPointerType darker = mrtoms->GetInfFiltreFullResolution();
+
+  // Segmentation filter definition
+  typename SegmenterType::Pointer segmenter;
+  typename InputImageListType::Iterator it; 
+  // Segment the supfiltre details
+  for(it= brighter->Begin();it!=brighter->End();++it)
+    {
+      segmenter = SegmenterType::New();
+      segmenter->SetMinimumObjectSize(m_MinimumObjectSize);
+      segmenter->SetSeedsQuantile(m_SeedsQuantile);
+      segmenter->SetConnectedThresholdQuantile(m_ConnectedThresholdQuantile);
+      segmenter->SetOriginalImage(referenceImage);
+      segmenter->SetDetailsImage(it.Get());
+      segmenter->Update();
+      m_NumberOfObjectsVector.push_back(segmenter->GetNumberOfObjects());
+      outputList->PushBack(segmenter->GetOutput());
+    }
+  
+  
+  // Segment the infFiltre details
+  for(it= darker->Begin();it!= darker->End();++it)
+    {
+      segmenter = SegmenterType::New();
+      segmenter->SetMinimumObjectSize(m_MinimumObjectSize);
+      segmenter->SetSeedsQuantile(m_SeedsQuantile);
+      segmenter->SetConnectedThresholdQuantile(m_ConnectedThresholdQuantile);
+      segmenter->SetOriginalImage(referenceImage);
+      segmenter->SetSegmentDarkDetailsBool(true);
+      segmenter->SetDetailsImage(it.Get());
+      segmenter->Update();
+      m_NumberOfObjectsVector.push_back(segmenter->GetNumberOfObjects());
+      outputList->PushBack(segmenter->GetOutput());
+    }
+}
+/**
+ * PrintSelf method
+ */
+template <class TInputImage, class TOutputImage>
+void
+MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
+::PrintSelf(std::ostream& os, itk::Indent indent) const
+{
+  Superclass::PrintSelf(os, indent);
+}
+} // End namespace otb
+
+#endif
+
diff --git a/Code/MultiScale/otbMorphologicalPyramidSegmenter.h b/Code/MultiScale/otbMorphologicalPyramidSegmenter.h
index 76b6f90ad22bd08a84e60db332961fdb29d661db..0f8e402ca19b8b9a8f18895f71547e912d9cb180 100644
--- a/Code/MultiScale/otbMorphologicalPyramidSegmenter.h
+++ b/Code/MultiScale/otbMorphologicalPyramidSegmenter.h
@@ -98,13 +98,17 @@ namespace otb
 	  /** Min object size parameter accessor */
 	  itkSetMacro(MinimumObjectSize,unsigned long);
 	  itkGetMacro(MinimumObjectSize,unsigned long);
+	  /** Quantile for seeds extraction */
 	  itkSetMacro(SeedsQuantile,float);
 	  itkGetMacro(SeedsQuantile,float);
+	  /** Quantile for connected thresholding */
 	  itkSetMacro(ConnectedThresholdQuantile,float);
 	  itkGetMacro(ConnectedThresholdQuantile,float);
+	  /** Toogle the darker detail segmentation */
 	  itkSetMacro(SegmentDarkDetailsBool,bool);
 	  itkGetMacro(SegmentDarkDetailsBool,bool);
 	  itkBooleanMacro(SegmentDarkDetailsBool);
+	  /** Get the number of segmented objects */
 	  itkGetMacro(NumberOfObjects,OutputPixelType);
 
 	protected:
diff --git a/Code/MultiScale/otbMorphologicalPyramidSegmenter.txx b/Code/MultiScale/otbMorphologicalPyramidSegmenter.txx
index b0d6c7c2ea1f5a9552b08f5254192e1ea6ff6c41..a43a138a5279dac05ab28328c3bda5252bed9bd9 100644
--- a/Code/MultiScale/otbMorphologicalPyramidSegmenter.txx
+++ b/Code/MultiScale/otbMorphologicalPyramidSegmenter.txx
@@ -203,13 +203,20 @@ Segmenter<TInputImage, TOuputImage>
 
   // Filter instantiation
   typename HistGeneratorType::Pointer histogram = HistGeneratorType::New();
-  // Thresholds are computed from the quantile
-  histogram->SetInput(rescaler->GetOutput());
+  // Seeds Threshold is computed from the quantile
+  histogram->SetInput(details);
   histogram->SetNumberOfBins(255);
   histogram->SetMarginalScale(10.0);
   histogram->Compute();
   InputPixelType  pointSetThreshold = 
     static_cast<InputPixelType>(histogram->GetOutput()->Quantile(0,m_SeedsQuantile));
+
+  // Segmentation Threshold is computed from the quantile
+  histogram = HistGeneratorType::New();
+  histogram->SetInput(rescaler->GetOutput());
+  histogram->SetNumberOfBins(255);
+  histogram->SetMarginalScale(10.0);
+  histogram->Compute();
   InputPixelType  connectedThresholdValue = 
     static_cast<InputPixelType>(histogram->GetOutput()->Quantile(0,m_ConnectedThresholdQuantile));
 
diff --git a/Code/MultiScale/otbMorphologicalPyramidSynthesisFilter.h b/Code/MultiScale/otbMorphologicalPyramidSynthesisFilter.h
index a6be0dc713e02226fd1011169d37fc3625c112f6..254f43dce99a2276498c66de00a452ac2ddaf62b 100644
--- a/Code/MultiScale/otbMorphologicalPyramidSynthesisFilter.h
+++ b/Code/MultiScale/otbMorphologicalPyramidSynthesisFilter.h
@@ -72,15 +72,52 @@ public:
   typedef typename InputImageType::ValueType                            ValueType;  
   typedef typename InputImageType::PixelType                            PixelType;
   typedef typename InputImageType::SpacingType                          SpacingType;
+  typedef otb::ImageList<InputImageType>                                InputImageListType;
+  typedef typename InputImageListType::Pointer                          InputImageListPointerType;
   /** Size vector typedefs */
   typedef std::vector<SizeType>                                         SizeVectorType;
   typedef typename SizeVectorType::iterator                             SizeIterator;
-  typedef typename SizeVectorType::reverse_iterator                     SizeReverseIterator;
-  /** Details images lists setters */
-  itkSetMacro(SupFiltre,OutputImageListPointerType);
-  itkSetMacro(InfFiltre,OutputImageListPointerType);
-  itkSetMacro(SupDeci,OutputImageListPointerType);
-  itkSetMacro(InfDeci,OutputImageListPointerType);  
+  typedef typename SizeVectorType::reverse_iterator                     SizeReverseIterator;  
+  /**
+   * Set The SupFiltre details
+   * \param imageList The brighter details extracted from the filtering operation.
+   */
+  void SetSupFiltre(InputImageListType * imageList);
+  /**
+   * Set The InfFiltre details
+   * \param imageList The darker details extracted from the filtering operation.
+   */
+  void SetInfFiltre(InputImageListType * imageList);
+  /**
+   * Set The SupDeci details
+   * \param imageList The brighter details extracted from the filtering operation.
+   */
+  void SetSupDeci(InputImageListType * imageList);
+  /**
+   * Set The InfDeci details
+   * \param imageList The darker details extracted from the filtering operation.
+   */
+  void SetInfDeci(InputImageListType * imageList);
+  /**
+   * Get The SupFiltre details
+   * \return The brighter details extracted from the filtering operation.
+   */
+  InputImageListType* GetSupFiltre(void);   
+  /**
+   * Get The InfFiltre details
+   * \return The darker details extracted from the filtering operation.
+   */
+  InputImageListType* GetInfFiltre(void);
+  /**
+   * Get The SupDeci details
+   * \return The brighter details extracted from the resampling operation.
+   */
+  InputImageListType* GetSupDeci(void);
+  /**
+   * Get The InfDeci details
+   * \return The brighter details extracted from the resampling operation.
+   */
+  InputImageListType* GetInfDeci(void);
 
 protected:
   /** Constructor */
@@ -92,14 +129,6 @@ protected:
   virtual void GenerateData();
   /** Printself method */
   virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;  
-   /** Sup details from filtering operations */
-  OutputImageListPointerType m_SupFiltre;
-  /** Inf details from filtering operations */
-  OutputImageListPointerType m_InfFiltre;
-  /** Sup details from subsampling operations */
-  OutputImageListPointerType m_SupDeci;
-  /** Inf details from subsampling operations */
-  OutputImageListPointerType m_InfDeci;
 };
 }// End namespace otb
 
diff --git a/Code/MultiScale/otbMorphologicalPyramidSynthesisFilter.txx b/Code/MultiScale/otbMorphologicalPyramidSynthesisFilter.txx
index 89f937070a4b87908982f4b8cd4031baf7a9d5c9..fda9461bf7822b76d25c0a3bb39d50d572d03e39 100644
--- a/Code/MultiScale/otbMorphologicalPyramidSynthesisFilter.txx
+++ b/Code/MultiScale/otbMorphologicalPyramidSynthesisFilter.txx
@@ -33,13 +33,110 @@ namespace otb
  */
 template <class TInputImage, class TOutputImage>
 MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
-::MorphologicalPyramidSynthesisFilter() {}
+::MorphologicalPyramidSynthesisFilter() 
+{
+  this->SetNumberOfRequiredInputs(5);
+}
 /**
  * Destructor
  */
 template <class TInputImage, class TOutputImage>
 MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
 ::~MorphologicalPyramidSynthesisFilter() {}
+/**
+ * Set The SupFiltre details
+ * \param imageList The brighter details extracted from the filtering operation.
+ */
+template <class TInputImage, class TOutputImage>
+void 
+MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
+::SetSupFiltre(InputImageListType * imageList)
+{
+  this->SetNthInput(1,const_cast<InputImageListType *>(imageList));
+}
+  /**
+   * Set The InfFiltre details
+   * \param imageList The darker details extracted from the filtering operation.
+   */
+template <class TInputImage, class TOutputImage>
+void 
+MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
+::SetInfFiltre(InputImageListType * imageList)
+{
+this->SetNthInput(2,const_cast<InputImageListType *>(imageList));
+}
+
+ /**
+   * Set The SupDeci details
+   * \param imageList The brighter details extracted from the filtering operation.
+   */
+template <class TInputImage, class TOutputImage>
+void 
+MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
+::SetSupDeci(InputImageListType * imageList)
+{
+this->SetNthInput(3,const_cast<InputImageListType *>(imageList));
+}
+  /**
+   * Set The InfDeci details
+   * \param imageList The darker details extracted from the filtering operation.
+   */
+template <class TInputImage, class TOutputImage>
+void 
+MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
+::SetInfDeci(InputImageListType * imageList)
+{
+this->SetNthInput(4,const_cast<InputImageListType *>(imageList));
+}
+
+/**
+ * Get The SupFiltre details
+ * \return The brighter details extracted from the filtering operation.
+ */
+template <class TInputImage, class TOutputImage>
+typename MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
+::InputImageListType*
+MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
+::GetSupFiltre(void)
+{
+  return dynamic_cast<InputImageListType *>(this->itk::ProcessObject::GetInput(1));
+}
+/**
+ * Get The InfFiltre details
+ * \return The darker details extracted from the filtering operation.
+ */
+template <class TInputImage, class TOutputImage>
+typename MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
+::InputImageListType*
+MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
+::GetInfFiltre(void)
+{
+  return dynamic_cast<InputImageListType *>(this->itk::ProcessObject::GetInput(2));
+}
+/**
+ * Get The SupDeci details
+ * \return The brighter details extracted from the resampling operation.
+ */
+template <class TInputImage, class TOutputImage>
+typename MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
+::InputImageListType*
+MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
+::GetSupDeci(void)
+{
+  return dynamic_cast<InputImageListType *>(this->itk::ProcessObject::GetInput(3));
+}
+/**
+ * Get The InfDeci details
+ * \return The darker details extracted from the resampling operation.
+ */
+template <class TInputImage, class TOutputImage>
+typename MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
+::InputImageListType*
+MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
+::GetInfDeci(void)
+{
+  return dynamic_cast<InputImageListType *>(this->itk::ProcessObject::GetInput(4));
+}
 /**
  * Main computation method
  */
@@ -50,7 +147,16 @@ MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
 {
   otbMsgDebugMacro(<<"MorphologicalPyramidSynthesisFilter : Entering main method.");
   // Input image pointer
+  InputImageListType * supFiltre = this->GetSupFiltre();
+  InputImageListType * infFiltre = this->GetInfFiltre();
+  InputImageListType * supDeci = this->GetSupDeci();
+  InputImageListType * infDeci = this->GetInfDeci();
+  
+  // Output pointer
   OutputImageListType *   OutputImageList   = this->GetOutput();
+ 
+
+
   // typedefs of the filters
   typedef itk::SubtractImageFilter<InputImageType,InputImageType,OutputImageType> SubtractFilterType;
   typedef itk::AddImageFilter<InputImageType,InputImageType,InputImageType> AddFilterType;
@@ -74,9 +180,9 @@ MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
   // Size vector computation
   SizeVectorType size;
 
-  ImageListIterator it = m_SupFiltre->Begin();
+  ImageListIterator it = supFiltre->Begin();
   
-  while(it!=m_SupFiltre->End())
+  while(it!=supFiltre->End())
     {
       size.push_back(it.Get()->GetLargestPossibleRegion().GetSize());
       ++it;
@@ -84,20 +190,20 @@ MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
   otbMsgDebugMacro(<<"MorphologicalPyramidSynthesisFilter : Size vector computation OK");
 
   // Iterators definition  
-  ImageListReverseIterator itInfFiltre = m_InfFiltre->ReverseBegin();
-  ImageListReverseIterator itSupFiltre = m_SupFiltre->ReverseBegin();
-  ImageListReverseIterator itInfDeci = m_InfDeci->ReverseBegin();
-  ImageListReverseIterator itSupDeci = m_SupDeci->ReverseBegin();
+  ImageListReverseIterator itinfFiltre = infFiltre->ReverseBegin();
+  ImageListReverseIterator itsupFiltre = supFiltre->ReverseBegin();
+  ImageListReverseIterator itinfDeci = infDeci->ReverseBegin();
+  ImageListReverseIterator itsupDeci = supDeci->ReverseBegin();
   SizeReverseIterator itSize = size.rbegin();
 
   int i =1;
  //--------------------------------------------------------//
   //                      Main loop                         //
   //--------------------------------------------------------//
-  while(   itInfFiltre!=m_InfFiltre->ReverseEnd()
-	&& itSupFiltre!=m_SupFiltre->ReverseEnd()
-	&& itInfDeci!=m_InfDeci->ReverseEnd()
-	&& itSupDeci!=m_SupDeci->ReverseEnd()
+  while(   itinfFiltre!=infFiltre->ReverseEnd()
+	&& itsupFiltre!=supFiltre->ReverseEnd()
+	&& itinfDeci!=infDeci->ReverseEnd()
+	&& itsupDeci!=supDeci->ReverseEnd()
 	&& itSize!=size.rend())
     {
 
@@ -108,21 +214,21 @@ MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
     resampler->SetInput(currentImage);
     resampler->Update();
     otbMsgDebugMacro(<<"MorphologicalPyramidSynthesisFilter: step "<<i<<" Upsampling OK");
-    // Adding *Sup details from current level
+    // Adding *sup details from current level
     add1= AddFilterType::New();
     add1->SetInput1(resampler->GetOutput());
-    add1->SetInput2(itSupFiltre.Get());
+    add1->SetInput2(itsupFiltre.Get());
     add2= AddFilterType::New();
     add2->SetInput1(add1->GetOutput());
-    add2->SetInput2(itSupDeci.Get());
+    add2->SetInput2(itsupDeci.Get());
 
-    // Adding *Inf details from current level
+    // Adding *inf details from current level
     subtract1= SubtractFilterType::New();
     subtract1->SetInput1(add2->GetOutput());
-    subtract1->SetInput2(itInfFiltre.Get());
+    subtract1->SetInput2(itinfFiltre.Get());
     subtract2= SubtractFilterType::New();
     subtract2->SetInput1(subtract1->GetOutput());
-    subtract2->SetInput2(itInfDeci.Get());
+    subtract2->SetInput2(itinfDeci.Get());
     subtract2->Update();
     otbMsgDebugMacro(<<"MorphologicalPyramidSynthesisFilter: step "<<i<<" Details addition OK");
     
@@ -132,10 +238,10 @@ MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
     OutputImageList->PushBack(currentImage);
     
     // Iterators incrementation
-    ++itSupFiltre;
-    ++itInfFiltre;
-    ++itSupDeci;
-    ++itInfDeci;
+    ++itsupFiltre;
+    ++itinfFiltre;
+    ++itsupDeci;
+    ++itinfDeci;
     ++itSize;
     } 
   otbMsgDebugMacro(<<"MorphologicalPyramidSynthesisFilter: Exiting main method.");
diff --git a/Testing/Code/MultiScale/CMakeLists.txt b/Testing/Code/MultiScale/CMakeLists.txt
index 7b2e4f6060ef8756cee7e3b70b3fd44099db4135..962dbb8fa6d98499af6e4e6d6fab73aa00a66ec2 100644
--- a/Testing/Code/MultiScale/CMakeLists.txt
+++ b/Testing/Code/MultiScale/CMakeLists.txt
@@ -128,6 +128,35 @@ ADD_TEST(msTvMorphoPyrSegmentDark ${MULTISCALE_TESTS}
 	 10
 )
 
+
+# -------            otb::MorphologicalPyramidSegmentationFilter   ----------
+
+ADD_TEST(msTuMorphoPyrSegmentationFilterNew ${MULTISCALE_TESTS} 
+         otbMorphologicalPyramidSegmentationFilterNew)
+
+ADD_TEST(msTvMorphoPyrSegmentationFilter ${MULTISCALE_TESTS} 
+   --compare-n-images ${TOL} 4
+		   ${BASELINE}/msPyrSegmentation_IKO_Halles_2.tif	
+ 		   ${TEMP}/msPyrSegmentation_IKO_Halles_2.tif
+		   ${BASELINE}/msPyrSegmentation_IKO_Halles_4.tif
+ 		   ${TEMP}/msPyrSegmentation_IKO_Halles_4.tif
+		   ${BASELINE}/msPyrSegmentation_IKO_Halles_5.tif
+ 		   ${TEMP}/msPyrSegmentation_IKO_Halles_5.tif
+ 		   ${BASELINE}/msPyrSegmentation_IKO_Halles_7.tif
+ 		   ${TEMP}/msPyrSegmentation_IKO_Halles_7.tif
+         otbMorphologicalPyramidSegmentationFilter
+	 ${INPUTDATA}/ROI_IKO_PAN_LesHalles.tif
+	 ${TEMP}/msPyrSegmentation_IKO_Halles_
+	 tif
+	 4
+	 2.0
+	 0.9
+	 0.9
+	 10
+)
+
+
+
 # -------       Fichiers sources CXX -----------------------------------
 SET(BasicMultiScale_SRCS
 otbMorphologicalPyramidResamplerNew.cxx
@@ -140,6 +169,8 @@ otbMorphologicalPyramidMRToMSConverterNew.cxx
 otbMorphologicalPyramidMRToMSConverter.cxx
 otbMorphologicalPyramidSegmenterNew.cxx
 otbMorphologicalPyramidSegmenter.cxx
+otbMorphologicalPyramidSegmentationFilterNew.cxx
+otbMorphologicalPyramidSegmentationFilter.cxx
 )
 
 
diff --git a/Testing/Code/MultiScale/otbMorphologicalPyramidAnalyseFilter.cxx b/Testing/Code/MultiScale/otbMorphologicalPyramidAnalyseFilter.cxx
index 52443d8dccc57a911e11b1bf962f725f4a6d1986..2e63755ea5c7b77b8c27e709d8f5e6a4372f1b6d 100644
--- a/Testing/Code/MultiScale/otbMorphologicalPyramidAnalyseFilter.cxx
+++ b/Testing/Code/MultiScale/otbMorphologicalPyramidAnalyseFilter.cxx
@@ -73,6 +73,7 @@ int otbMorphologicalPyramidAnalyseFilter(int argc, char * argv[])
       WriterType::Pointer writer =  WriterType::New();
 
       int i=1;
+      std::stringstream oss;
       // Writing the results images
       std::cout<<(itAnalyse!=(pyramid->GetOutput()->End()))<<std::endl;
       while((itAnalyse!=pyramid->GetOutput()->End())
@@ -82,7 +83,6 @@ int otbMorphologicalPyramidAnalyseFilter(int argc, char * argv[])
 	    &&(itSupDeci!=pyramid->GetSupDeci()->End())
 	    )
 	{
-	  std::stringstream oss;
 	  oss<<outputFilenamePrefix<<"_an_"<<i<<"."<<outputFilenameSuffix;
 	  writer->SetInput(itAnalyse.Get());
 	  writer->SetFileName(oss.str().c_str());	  
diff --git a/Testing/Code/MultiScale/otbMorphologicalPyramidMRToMSConverter.cxx b/Testing/Code/MultiScale/otbMorphologicalPyramidMRToMSConverter.cxx
index 0a06fc0289c2a8ffabccd0b5ad9734d90fcd9e85..872f31f8e8be2e5d710e549424ca351cc6d81058 100644
--- a/Testing/Code/MultiScale/otbMorphologicalPyramidMRToMSConverter.cxx
+++ b/Testing/Code/MultiScale/otbMorphologicalPyramidMRToMSConverter.cxx
@@ -63,12 +63,10 @@ int otbMorphologicalPyramidMRToMSConverter(int argc, char * argv[])
       pyramidAnalyse->SetNumberOfIterations(numberOfIterations);
       pyramidAnalyse->SetSubSampleScale(subSampleScale);
       pyramidAnalyse->SetInput(reader->GetOutput());
-      pyramidAnalyse->Update();
 
       // From multi resolution to multi scale
       MRToMSConverterType::Pointer mrtoms = MRToMSConverterType::New();
       mrtoms->SetInput(pyramidAnalyse->GetOutput());
-      mrtoms->SetNumberOfIterations(numberOfIterations);
       mrtoms->SetSupFiltre(pyramidAnalyse->GetSupFiltre());
       mrtoms->SetSupDeci(pyramidAnalyse->GetSupDeci());
       mrtoms->SetInfFiltre(pyramidAnalyse->GetInfFiltre());
diff --git a/Testing/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.cxx b/Testing/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..4b3fa075ec5fc65e3991580ecba595735ffe309b
--- /dev/null
+++ b/Testing/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.cxx
@@ -0,0 +1,111 @@
+/*=========================================================================
+
+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.
+
+=========================================================================*/
+#include "itkExceptionObject.h"
+#include "otbMorphologicalPyramidSegmentationFilter.h"
+#include "otbOpeningClosingMorphologicalFilter.h"
+#include "itkBinaryBallStructuringElement.h"
+#include "otbMorphologicalPyramidAnalyseFilter.h"
+#include "otbImageFileReader.h"
+#include "otbImageFileWriter.h"
+#include "otbImage.h"
+
+int otbMorphologicalPyramidSegmentationFilter(int argc, char * argv[])
+{
+  try
+    {
+      const char* inputFilename = argv[1];
+      const char* outputFilenamePrefix = argv[2];
+      const char * outputFilenameSuffix = argv[3];
+      const unsigned int numberOfIterations = atoi(argv[4]);
+      const double subSampleScale = atof(argv[5]);
+      const float seedsQuantile = atof(argv[6]);
+      const float segmentationQuantile = atof(argv[7]);
+      const unsigned int minObjectSize = atoi(argv[8]);
+
+      const unsigned int Dimension = 2;
+      typedef unsigned char InputPixelType;
+      typedef unsigned short OutputPixelType;
+
+      typedef otb::Image<InputPixelType,Dimension> InputImageType;
+      typedef otb::Image<OutputPixelType,Dimension> OutputImageType;
+
+      typedef otb::ImageFileReader<InputImageType> ReaderType;
+      typedef otb::ImageFileWriter<OutputImageType> WriterType;
+      
+      typedef itk::BinaryBallStructuringElement<InputPixelType,Dimension> StructuringElementType;
+      typedef otb::OpeningClosingMorphologicalFilter<InputImageType,InputImageType,StructuringElementType>
+	OpeningClosingFilterType;
+      typedef otb::MorphologicalPyramidAnalyseFilter<InputImageType,InputImageType,OpeningClosingFilterType>
+	PyramidFilterType;
+      typedef otb::MorphologicalPyramidSegmentationFilter<InputImageType,OutputImageType>
+	SegmentationFilterType;
+      typedef SegmentationFilterType::OutputImageListIteratorType OutputListIteratorType;
+
+      // Input images reading
+      ReaderType::Pointer reader = ReaderType::New();
+      reader->SetFileName(inputFilename);
+
+      //Analyse
+      PyramidFilterType::Pointer pyramid = PyramidFilterType::New();
+      pyramid->SetNumberOfIterations(numberOfIterations);
+      pyramid->SetSubSampleScale(subSampleScale);
+      pyramid->SetInput(reader->GetOutput());
+
+      // Segmentation
+      SegmentationFilterType::Pointer segmentation = SegmentationFilterType::New();
+      segmentation->SetReferenceImage(reader->GetOutput());
+      segmentation->SetBrighterDetails(pyramid->GetSupFiltre());
+      segmentation->SetDarkerDetails(pyramid->GetInfFiltre());
+      segmentation->SetSeedsQuantile(seedsQuantile);
+      segmentation->SetConnectedThresholdQuantile(segmentationQuantile);
+      segmentation->SetMinimumObjectSize(minObjectSize);
+      segmentation->Update();
+
+      // Output writing
+      OutputListIteratorType it = segmentation->GetOutput()->Begin();
+      WriterType::Pointer writer;
+      int index = 1;
+      std::stringstream oss;
+      while(it!=segmentation->GetOutput()->End())
+	{
+	  oss<<outputFilenamePrefix<<index<<"."<<outputFilenameSuffix;
+	  writer = WriterType::New();
+	  writer->SetInput(it.Get());
+	  writer->SetFileName(oss.str().c_str());	  
+	  writer->Update();
+	  std::cout<<oss.str()<<" file written."<<std::endl;
+	  oss.str("");
+	  ++index;
+	  ++it;
+	}
+    }
+      catch( itk::ExceptionObject & err ) 
+	{ 
+	  std::cout << "Exception itk::ExceptionObject thrown !" << std::endl;
+	  std::cout << err << std::endl; 
+	  return EXIT_FAILURE;
+	} 
+
+      catch( ... ) 
+	{ 
+	  std::cout << "Unknown exception thrown !" << std::endl; 
+	  return EXIT_FAILURE;
+	} 
+
+      return EXIT_SUCCESS;
+    }
diff --git a/Testing/Code/MultiScale/otbMorphologicalPyramidSegmentationFilterNew.cxx b/Testing/Code/MultiScale/otbMorphologicalPyramidSegmentationFilterNew.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..523c653c2a1ed07e6253f57ff98edca8defa85dd
--- /dev/null
+++ b/Testing/Code/MultiScale/otbMorphologicalPyramidSegmentationFilterNew.cxx
@@ -0,0 +1,55 @@
+/*=========================================================================
+
+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.
+
+=========================================================================*/
+#include "itkExceptionObject.h"
+#include "otbMorphologicalPyramidSegmentationFilter.h"
+#include "otbImage.h"
+
+int otbMorphologicalPyramidSegmentationFilterNew(int argc, char * argv[])
+{
+  try
+    {
+      
+      const unsigned int Dimension = 2;
+      typedef unsigned char InputPixelType;
+      typedef unsigned short OutputPixelType;
+
+      typedef otb::Image<InputPixelType,Dimension> InputImageType;
+      typedef otb::Image<OutputPixelType,Dimension> OutputImageType;
+
+      typedef otb::MorphologicalPyramidSegmentationFilter<InputImageType,OutputImageType>
+	SegmentationFilterType;
+
+      // Instantiation
+      SegmentationFilterType::Pointer segmentation = SegmentationFilterType::New();
+
+    }
+      catch( itk::ExceptionObject & err ) 
+	{ 
+	  std::cout << "Exception itk::ExceptionObject thrown !" << std::endl;
+	  std::cout << err << std::endl; 
+	  return EXIT_FAILURE;
+	} 
+
+      catch( ... ) 
+	{ 
+	  std::cout << "Unknown exception thrown !" << std::endl; 
+	  return EXIT_FAILURE;
+	} 
+
+      return EXIT_SUCCESS;
+    }
diff --git a/Testing/Code/MultiScale/otbMorphologicalPyramidSynthesisFilter.cxx b/Testing/Code/MultiScale/otbMorphologicalPyramidSynthesisFilter.cxx
index 872bcf4528e4136da29422a0acf96f19ef2ac8cd..f9805108e9304cb0d2b810709beb81467f04ae71 100644
--- a/Testing/Code/MultiScale/otbMorphologicalPyramidSynthesisFilter.cxx
+++ b/Testing/Code/MultiScale/otbMorphologicalPyramidSynthesisFilter.cxx
@@ -64,7 +64,7 @@ int otbMorphologicalPyramidSynthesisFilter(int argc, char * argv[])
       pyramidAnalyse->Update();
 
       // Synthesis
-      PyramidSynthesisFilterType::Pointer pyramidSynthesis = PyramidSynthesisFilterType::New();
+      PyramidSynthesisFilterType::Pointer pyramidSynthesis = PyramidSynthesisFilterType::New();      
       pyramidSynthesis->SetInput(pyramidAnalyse->GetOutput()->Back());
       pyramidSynthesis->SetSupFiltre(pyramidAnalyse->GetSupFiltre());
       pyramidSynthesis->SetSupDeci(pyramidAnalyse->GetSupDeci());
diff --git a/Testing/Code/MultiScale/otbMultiScaleTests.cxx b/Testing/Code/MultiScale/otbMultiScaleTests.cxx
index 18b1ba8c84a207238051f714eeff3ae5da50f7ff..cae7d44735f8d8ab18c7c64981aed8a17ffdc4d7 100644
--- a/Testing/Code/MultiScale/otbMultiScaleTests.cxx
+++ b/Testing/Code/MultiScale/otbMultiScaleTests.cxx
@@ -36,4 +36,6 @@ REGISTER_TEST(otbMorphologicalPyramidMRToMSConverterNew);
 REGISTER_TEST(otbMorphologicalPyramidMRToMSConverter);
 REGISTER_TEST(otbMorphologicalPyramidSegmenterNew);
 REGISTER_TEST(otbMorphologicalPyramidSegmenter);
+REGISTER_TEST(otbMorphologicalPyramidSegmentationFilterNew);
+REGISTER_TEST(otbMorphologicalPyramidSegmentationFilter);
 }