[vtkusers] Padding filters
Joris van Zwieten
vanzwieten at gmail.com
Wed Dec 8 06:13:36 EST 2004
Hi all,
I'm trying to customize the vtkImagePadFilter and its derivatives.
Currently, the ImagePadFilter requires the output extend to be set
explicitly. I would like to modify its behaviour so it would
automatically adapt its OutputWholeExtent to the UpdateExtent required
by the downstream filters.
However, there seems to be a problem with the way the pipeline update
sequence works (or, I do not understand the mechanism correctly. I've
seen that much work is currently being done to migrate to a new
pipeline mechanism).
As I understand it, the PadFilter should set its new WholeExtent
during the RequestInformation call. But as this call is propagated
before RequestUpdateExtent, the PadFilter does not yet know the extent
of input required by the downstream filters.
As an example, consider a reader that outputs a volume with whole
extent [0,127,0,127,0,127]. After this comes the ImagePadFilter, and
then a convolution filter. The convolution filter uses a 1D kernel
with a support of 5 voxels and filters over the first axis. Therefore,
its RequestUpdateExtent will request an input whole extent of
[-2,129,0,127,0,127]. Now I would like the ImagePadFilter to say the
equivalent of: "OK, I can provide this to you". So far, I've been
getting the following error, which makes perfect sense, but I don't
know how to fix it:
10:32:15: ERROR: In
\afstuderen\code\Vtk\Filtering\vtkStreamingDemandDrivenPipeline.cxx,
line 561
vtkStreamingDemandDrivenPipeline (02265DD0): The update extent
specified in the information for output port 0 on algorithm
vtkMyImageExtendPad(02265B78) is -1 128 0 127 0 127, which is outside
the whole extent 0 127 0 127 0 127.
Any thoughts about this?
Thanks,
Joris van Zwieten
More information about the vtkusers
mailing list