Commit 16fb0fff authored by Cyrille Valladeau's avatar Cyrille Valladeau
Browse files

ENH : bug134 Monterverdi, supress PropagateRequestedRegion, trouble in a...

ENH : bug134 Monterverdi, supress PropagateRequestedRegion, trouble in a pipeline with the same input image
parent 6d4be143
......@@ -56,10 +56,10 @@ ImageListToVectorImageFilter<TImageList,TVectorImage>
InputImageListPointerType inputPtr = this->GetInput();
typename InputImageListType::ConstIterator inputListIt = inputPtr->Begin();
while (inputListIt!=inputPtr->End())
{
inputListIt.Get()->SetRequestedRegion(this->GetOutput()->GetRequestedRegion());
++inputListIt;
}
{
inputListIt.Get()->SetRequestedRegion(this->GetOutput()->GetRequestedRegion());
++inputListIt;
}
}
/**
* Main computation method
......
......@@ -59,7 +59,6 @@ public:
* Update images in the list.
*/
virtual void UpdateOutputInformation(void);
virtual void PropagateRequestedRegion(void) throw (itk::InvalidRequestedRegionError);
virtual void UpdateOutputData(void);
......
......@@ -29,6 +29,7 @@ ImageList<TImage>
::UpdateOutputData()
{
Superclass::UpdateOutputData();
for (ConstIterator it = this->Begin(); it!=this->End();++it)
{
if (it.Get()->GetUpdateMTime() < it.Get()->GetPipelineMTime()
......@@ -43,37 +44,6 @@ ImageList<TImage>
}
}
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()
|| 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>
void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment