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

BUG: Moving PropageRequestedRegion() at the correct place in ImageList, and...

BUG: Moving PropageRequestedRegion() at the correct place in ImageList, and remove the unnecessary call in PipelineMemoryPrintCalculator (part of fir for #1516)
parent c47e4540
No related branches found
No related tags found
2 merge requests!32Bugfix RAM parameter not used,!9Resolve "PipelineMemoryPrintEstimator stops at ImageList"
...@@ -33,6 +33,19 @@ ImageList<TImage> ...@@ -33,6 +33,19 @@ ImageList<TImage>
::UpdateOutputData() ::UpdateOutputData()
{ {
Superclass::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) for (ConstIterator it = this->Begin(); it != this->End(); ++it)
{ {
if (it.Get()->GetUpdateMTime() < it.Get()->GetPipelineMTime() if (it.Get()->GetUpdateMTime() < it.Get()->GetPipelineMTime()
...@@ -42,7 +55,7 @@ ImageList<TImage> ...@@ -42,7 +55,7 @@ ImageList<TImage>
if (it.Get()->GetSource()) if (it.Get()->GetSource())
{ {
it.Get()->GetSource()->PropagateRequestedRegion(it.Get()); it.Get()->GetSource()->PropagateRequestedRegion(it.Get());
// Check that the requested region lies within the largest possible region // Check that the requested region lies within the largest possible region
if (!it.Get()->VerifyRequestedRegion()) if (!it.Get()->VerifyRequestedRegion())
{ {
...@@ -51,22 +64,12 @@ ImageList<TImage> ...@@ -51,22 +64,12 @@ ImageList<TImage>
e.SetLocation(ITK_LOCATION); e.SetLocation(ITK_LOCATION);
e.SetDataObject(it.Get()); e.SetDataObject(it.Get());
e.SetDescription("Requested region is (at least partially) outside the largest possible region."); e.SetDescription("Requested region is (at least partially) outside the largest possible region.");
throw e; throw e;
} }
it.Get()->GetSource()->UpdateOutputData(it.Get());
} }
} }
} }
}
template <class TImage>
void
ImageList<TImage>
::PropagateRequestedRegion() throw (itk::InvalidRequestedRegionError)
{
Superclass::PropagateRequestedRegion();
} }
template <class TImage> template <class TImage>
......
...@@ -187,11 +187,8 @@ PipelineMemoryPrintCalculator ...@@ -187,11 +187,8 @@ PipelineMemoryPrintCalculator
it != imageList->End(); ++it) \ it != imageList->End(); ++it) \
{ \ { \
if(it.Get()->GetSource()) \ if(it.Get()->GetSource()) \
{ \
it.Get()->PropagateRequestedRegion(); \
print += this->EvaluateProcessObjectPrintRecursive(it.Get()->GetSource());\ print += this->EvaluateProcessObjectPrintRecursive(it.Get()->GetSource());\
} \ else \
else \
print += this->EvaluateDataObjectPrint(it.Get()); \ 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