[vtkusers] tiling and paging large images

David.Pont at scionresearch.com David.Pont at scionresearch.com
Wed Jul 22 17:19:16 EDT 2009


Philip Winston <pwinston at gmail.com> wrote on 22/07/2009 01:23:01 p.m.:

> We have an existing VTK application which operates on a single
> moderate sized image.  We want to extend it to support arbitrarily
> large images.  We figure the the image needs to be broken into tiles,
> and only the needed tiles are loaded into memory.  As you pan around
> the image, tiles are load off disk, kind of like google maps.
>
> Has anyone done something like this with VTK? We have an existing
> pipeline with some color mapping and blending, so it's not a simple
> static image.  We were thinking of just making an N x N array of the
> same pipeline, having a bunch of vtkImageActors in the scene, and
> creating/destroying/moving them as needed.

Hi Philip,
   Is it easier to simply create and keep an NxN array of actors and all
upstream filters - ultimately to the appropriate kind of image reader. As
you need to load new tiles you change the reader 'Filename' and call
'Update'. This avoid creating and destroying lots of objects repeatedly.
You would presumably play with the screen positions of the actors as new
tiles come in but existing ones stay for a while, rather than reloading NxN
images each time, ie new tiles would require updating the pipeline from
reader through to actor, but existing tiles would just be moved in the view
window.

> At first I thought of
> maybe extending vtkOpenGLImageActor to manage the tiling under the
> hood, but then I realized the other steps in the pipeline would need
> to be tile aware also.  Any other ideas?  Thanks.

If you keep a persistent NxN pipeline you should not have to extend any vtk
objects, just write the code to manage file reads and actor positions as
the user pans. If you support zoom the NxN becomes variable. I'd create an
initial set, say N=3, if zoom out requires say N=5 create new pipelines
when required but don't bother to delete them, just manage which are
visible and thus require update on pan or zoom.

I've never had to implement such a paging scheme so I'm guessing, and for
sure there will be plenty of knowledge out there on good strategies...

  cheers, Dave P

>
> -Philip
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://
> www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090723/a3f6b997/attachment.htm>


More information about the vtkusers mailing list