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

BUG: Only call UpdateOutputData() if object has Source

parent 3e227125
No related branches found
No related tags found
2 merge requests!32Bugfix RAM parameter not used,!9Resolve "PipelineMemoryPrintEstimator stops at ImageList"
......@@ -68,6 +68,8 @@ public:
throw (itk::InvalidRequestedRegionError) ITK_OVERRIDE;
void UpdateOutputData(void) ITK_OVERRIDE;
void SetRequestedRegion(const itk::DataObject * source);
protected:
/** Constructor */
ImageList() {};
......
......@@ -35,7 +35,15 @@ ImageList<TImage>
Superclass::UpdateOutputData();
for (ConstIterator it = this->Begin(); it != this->End(); ++it)
{
if (it.Get()->GetUpdateMTime() < it.Get()->GetPipelineMTime()
|| it.Get()->GetDataReleased()
|| it.Get()->RequestedRegionIsOutsideOfTheBufferedRegion())
{
if(it.Get()->GetSource())
{
it.Get()->GetSource()->UpdateOutputData(it.Get());
}
}
}
}
......@@ -52,6 +60,8 @@ ImageList<TImage>
|| it.Get()->GetDataReleased()
|| it.Get()->RequestedRegionIsOutsideOfTheBufferedRegion())
{
std::cout<<"Requested region: "<<it.Get()<<" "<<it.Get()->GetRequestedRegion()<<std::endl;
if (it.Get()->GetSource())
{
it.Get()->GetSource()->PropagateRequestedRegion(it.Get());
......@@ -72,6 +82,17 @@ ImageList<TImage>
}
}
template<class TImage>
void
ImageList<TImage>
::SetRequestedRegion(const itk::DataObject * source)
{
for (ConstIterator it = this->Begin(); it != this->End(); ++it)
{
it.Get()->SetRequestedRegion(source);
}
}
template <class TImage>
void
ImageList<TImage>
......
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