From 901e7dd3f1306ebb79dc4914997f857bcd54f281 Mon Sep 17 00:00:00 2001
From: Julien Michel <julien.michel@orfeo-toolbox.org>
Date: Tue, 27 Jan 2009 16:53:00 +0100
Subject: [PATCH] BUG: Fixing some pipeline updating troubles for RCC8 graphs

---
 Code/SpatialReasoning/otbRCC8Graph.h             | 2 ++
 Code/SpatialReasoning/otbRCC8GraphFileWriter.txx | 9 +++++----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/Code/SpatialReasoning/otbRCC8Graph.h b/Code/SpatialReasoning/otbRCC8Graph.h
index 2bbdb1153f..0398a46b42 100644
--- a/Code/SpatialReasoning/otbRCC8Graph.h
+++ b/Code/SpatialReasoning/otbRCC8Graph.h
@@ -122,6 +122,8 @@ protected:
      */
     void Initialize( unsigned int num);
 
+
+
 private:
 
   /** Defines the number of vertices (ie total number of segmentation regions)*/
diff --git a/Code/SpatialReasoning/otbRCC8GraphFileWriter.txx b/Code/SpatialReasoning/otbRCC8GraphFileWriter.txx
index ad673acae8..be6643faf5 100644
--- a/Code/SpatialReasoning/otbRCC8GraphFileWriter.txx
+++ b/Code/SpatialReasoning/otbRCC8GraphFileWriter.txx
@@ -104,10 +104,11 @@ RCC8GraphFileWriter<TInputGraph>
     itkExceptionMacro(<<"No filename was specified");
     }
 
-  if(input->GetSource())
-    {
-      input->GetSource()->UpdateOutputData(input);
-    }
+  // Pipeline updating sequence
+  input->UpdateOutputInformation();
+  input->PropagateRequestedRegion();
+  input->UpdateOutputData();
+  // GenerateData (actually write file)
   this->GenerateData();
 }
 /**
-- 
GitLab