[vtkusers] Update() vs. UpdateWholeExtent()

David Gobbi david.gobbi at gmail.com
Mon Jan 24 20:34:00 EST 2011


On Mon, Jan 24, 2011 at 5:12 PM, chrisyeshi <chrisyeshi at gmail.com> wrote:
>
> So, in my understanding, extent is a bounding box.
>
> SetUpdateExtent() / SetOutputExtent() will set a bounding box which is
> smaller than the whole extent.
> As a result, Update() will only update the smaller bounding box.
>
> Am I correct?

Not quite.  The WholeExtent of the output is always exactly equal to
SetOutputExtent.  So the best way to think of it is that
SetUpdateExtent sets the update extent, and SetOutputExtent sets the
whole extent.  But SetOutputExtent does't set the WholeExtent
immediately: the WholeExtent won't be set until the next Update or the
next UpdateInformation.

> When I use Update() instead of UpdateWholeExtent(),
> I am getting "ERROR: ****: Updateextent does not lie within whole extent"
> "Update extent is: 0, 255, 0, 127, 0, 0"
> "Whole extent is: 0, 63, 0, 63, 0, 0"

What is happenning is exactly what it says.  The UpdateExtent is being
set to larger than the WholeExtent.  This is not allowed, so VTK
prints an error.  Whoever wrote the code must have written it for a
particular image size.

 - David



More information about the vtkusers mailing list