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

BUG: Trying to fix monteverdi bug 134 (seems to work)

parent 7fb9b852
No related branches found
No related tags found
No related merge requests found
...@@ -37,7 +37,21 @@ ImageList<TImage> ...@@ -37,7 +37,21 @@ ImageList<TImage>
{ {
if (it.Get()->GetSource()) if (it.Get()->GetSource())
{ {
it.Get()->GetSource()->UpdateOutputData(it.Get()); it.Get()->GetSource()->PropagateRequestedRegion(it.Get());
// Check that the requested region lies within the largest possible region
if ( ! it.Get()->VerifyRequestedRegion() )
{
// invalid requested region, throw an exception
itk::InvalidRequestedRegionError e(__FILE__, __LINE__);
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());
} }
} }
} }
...@@ -49,30 +63,6 @@ ImageList<TImage> ...@@ -49,30 +63,6 @@ ImageList<TImage>
::PropagateRequestedRegion() throw (itk::InvalidRequestedRegionError) ::PropagateRequestedRegion() throw (itk::InvalidRequestedRegionError)
{ {
Superclass::PropagateRequestedRegion(); Superclass::PropagateRequestedRegion();
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()->PropagateRequestedRegion(it.Get());
}
}
// Check that the requested region lies within the largest possible region
if ( ! it.Get()->VerifyRequestedRegion() )
{
// invalid requested region, throw an exception
itk::InvalidRequestedRegionError e(__FILE__, __LINE__);
e.SetLocation(ITK_LOCATION);
e.SetDataObject(it.Get());
e.SetDescription("Requested region is (at least partially) outside the largest possible region.");
throw e;
}
}
} }
template <class TImage> template <class 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