Skip to content
Snippets Groups Projects
Commit 0d1911c0 authored by Julien Michel's avatar Julien Michel
Browse files

BUG: Track down upstream pipeline for each image in ImageList (fix #1516)

parent a2119c37
No related branches found
No related tags found
No related merge requests found
...@@ -121,7 +121,7 @@ public: ...@@ -121,7 +121,7 @@ public:
static const double MegabyteToByte; static const double MegabyteToByte;
/** Evaluate the print (in bytes) of a single data object */ /** Evaluate the print (in bytes) of a single data object */
MemoryPrintType EvaluateDataObjectPrint(DataObjectType * data) const; MemoryPrintType EvaluateDataObjectPrint(DataObjectType * data);
protected: protected:
/** Constructor */ /** Constructor */
......
...@@ -183,11 +183,16 @@ PipelineMemoryPrintCalculator ...@@ -183,11 +183,16 @@ PipelineMemoryPrintCalculator
{ \ { \
ImageList<Image<type, 2> > * imageList = dynamic_cast<otb::ImageList<otb::Image<type, 2> > *>(data); \ ImageList<Image<type, 2> > * imageList = dynamic_cast<otb::ImageList<otb::Image<type, 2> > *>(data); \
MemoryPrintType print(0); \ MemoryPrintType print(0); \
for(ImageList<Image<type, 2> >::ConstIterator it = imageList->Begin(); \ for(ImageList<Image<type, 2> >::Iterator it = imageList->Begin(); \
it != imageList->End(); ++it) \ it != imageList->End(); ++it) \
{ \ { \
print += it.Get()->GetRequestedRegion().GetNumberOfPixels() \ if(it.Get()->GetSource()) \
* it.Get()->GetNumberOfComponentsPerPixel() * sizeof(type); \ { \
it.Get()->PropagateRequestedRegion(); \
print += this->EvaluateProcessObjectPrintRecursive(it.Get()->GetSource());\
} \
else \
print += this->EvaluateDataObjectPrint(it.Get()); \
} \ } \
return print; \ return print; \
} \ } \
...@@ -198,8 +203,10 @@ PipelineMemoryPrintCalculator ...@@ -198,8 +203,10 @@ PipelineMemoryPrintCalculator
for(ImageList<VectorImage<type, 2> >::ConstIterator it = imageList->Begin(); \ for(ImageList<VectorImage<type, 2> >::ConstIterator it = imageList->Begin(); \
it != imageList->End(); ++it) \ it != imageList->End(); ++it) \
{ \ { \
print += it.Get()->GetRequestedRegion().GetNumberOfPixels() \ if(it.Get()->GetSource()) \
* it.Get()->GetNumberOfComponentsPerPixel() * sizeof(type); \ print += this->EvaluateProcessObjectPrintRecursive(it.Get()->GetSource());\
else \
print += this->EvaluateDataObjectPrint(it.Get()); \
} \ } \
return print; \ return print; \
} \ } \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment