Commit 4b1248b2 authored by Brad King's avatar Brad King 💬
Browse files

BUG: RequestUpdateExtent should request the same extent of the stencil input...

BUG: RequestUpdateExtent should request the same extent of the stencil input as it does the main input.  This partially addresses bug#1452.
parent 5bf30d59
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <math.h> #include <math.h>
vtkCxxRevisionMacro(vtkImageAccumulate, "1.63"); vtkCxxRevisionMacro(vtkImageAccumulate, "1.64");
vtkStandardNewMacro(vtkImageAccumulate); vtkStandardNewMacro(vtkImageAccumulate);
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
...@@ -377,11 +377,24 @@ int vtkImageAccumulate::RequestUpdateExtent ( ...@@ -377,11 +377,24 @@ int vtkImageAccumulate::RequestUpdateExtent (
vtkInformationVector* vtkNotUsed( outputVector )) vtkInformationVector* vtkNotUsed( outputVector ))
{ {
// get the info objects // get the info objects
vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); vtkInformation* inInfo = inputVector[0]->GetInformationObject(0);
vtkInformation* stencilInfo = 0;
inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), if(inputVector[1]->GetNumberOfInformationObjects() > 0)
inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT()),6); {
stencilInfo = inputVector[1]->GetInformationObject(0);
}
// Use the whole extent of the first input as the update extent for
// both inputs. This way the stencil will be the same size as the
// input.
int extent[6] = {0,-1,0,-1,0,-1};
inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), extent);
inInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(), extent, 6);
if(stencilInfo)
{
stencilInfo->Set(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(),
extent, 6);
}
return 1; return 1;
} }
......
Supports Markdown
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