[vtkusers] UpdateExtents

hansen steffen at kdab.com
Mon Nov 29 08:56:26 EST 2010


Hi VTK Users.

I'm pretty new with VTK and could use a bit of advice to steer me in the
right direction.

My setup is this: I have a vtkImageAlgorithm subclass that loads a custom
data format into a 3D vtkImageData, the data is then colored with a
vtkImageMapToColors and finally the user displays 2D slices of the data with
a vtkImageActor.

The data is actually multidimensional, so the user can choose a dimension >3
to display and an index into that dimension, and the app has to fill in the
values data[x,y,z,w[i]]. 

Right now this means that the whole cube needs to be processed when the user
changes i or w. This is too slow for interactive performance, and loading
all dimensions into memory is not even feasible for larger datasets, so I'm
trying to implement lazy/demand loading of the data.

How would I do that with VTK? I'm looking at the virtual functions
RequestUpdateExtent(), RequestInformation() and RequestData() in
vtkImageAlgorithm. I imagine it would be possible to have the actor
displaying the 2D slice request only the extent that it is actually wants to
display, so I don't have to read data into the entire (x,y,z) cube.

Are there any examples available that shows how to use the update extent to
do partial image data? I'm unsure if I have to create a new vtkImageData the
size of the update-extent every time it changes, or if I should allocate a
single full size image and only change the subset of it asked for via
update-extents...

Thank you a lot for anything that can help me in the right direction.
SH
-- 
View this message in context: http://vtk.1045678.n5.nabble.com/UpdateExtents-tp3284435p3284435.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list