diff --git a/Modules/Core/ObjectList/include/otbImageList.txx b/Modules/Core/ObjectList/include/otbImageList.txx index dc0cbc9b6fef35e3430891fb9cd08a7e4324aefd..80b7276454eeabd2c2228857162e1e26a521a5f2 100644 --- a/Modules/Core/ObjectList/include/otbImageList.txx +++ b/Modules/Core/ObjectList/include/otbImageList.txx @@ -33,6 +33,19 @@ ImageList<TImage> ::UpdateOutputData() { Superclass::UpdateOutputData(); + for (ConstIterator it = this->Begin(); it != this->End(); ++it) + { + it.Get()->GetSource()->UpdateOutputData(it.Get()); + } +} + +template <class TImage> +void +ImageList<TImage> +::PropagateRequestedRegion() throw (itk::InvalidRequestedRegionError) + { + Superclass::PropagateRequestedRegion(); + for (ConstIterator it = this->Begin(); it != this->End(); ++it) { if (it.Get()->GetUpdateMTime() < it.Get()->GetPipelineMTime() @@ -42,7 +55,7 @@ ImageList<TImage> if (it.Get()->GetSource()) { it.Get()->GetSource()->PropagateRequestedRegion(it.Get()); - + // Check that the requested region lies within the largest possible region if (!it.Get()->VerifyRequestedRegion()) { @@ -51,22 +64,12 @@ ImageList<TImage> e.SetLocation(ITK_LOCATION); e.SetDataObject(it.Get()); e.SetDescription("Requested region is (at least partially) outside the largest possible region."); - + throw e; } - - it.Get()->GetSource()->UpdateOutputData(it.Get()); } } } -} - -template <class TImage> -void -ImageList<TImage> -::PropagateRequestedRegion() throw (itk::InvalidRequestedRegionError) - { - Superclass::PropagateRequestedRegion(); } template <class TImage> diff --git a/Modules/Core/Streaming/src/otbPipelineMemoryPrintCalculator.cxx b/Modules/Core/Streaming/src/otbPipelineMemoryPrintCalculator.cxx index 3287a6c03ad2a58765ef72eef31832c6fe1291b1..d7d62e8c88cd6a779425feb92d5c9eeea7a71497 100644 --- a/Modules/Core/Streaming/src/otbPipelineMemoryPrintCalculator.cxx +++ b/Modules/Core/Streaming/src/otbPipelineMemoryPrintCalculator.cxx @@ -187,11 +187,8 @@ PipelineMemoryPrintCalculator it != imageList->End(); ++it) \ { \ if(it.Get()->GetSource()) \ - { \ - it.Get()->PropagateRequestedRegion(); \ print += this->EvaluateProcessObjectPrintRecursive(it.Get()->GetSource());\ - } \ -else \ + else \ print += this->EvaluateDataObjectPrint(it.Get()); \ } \ return print; \