Showing overview of image viewer...

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Showing overview of image viewer...

Amey
Hello,
We have implemented a 2D image viewer using JOGL to display large medical images. It allows the user to smoothly pan, zoom the image. Now we want to display the overview of this viewer which will display the entire image in a small viewport (preferably in the bottom right corner of the viewer) with a rectangle displaying area which is presently visible in the viewer.

Are there any existing options from JOGL/OpenGL to achieve this?
If not, can someone give us directions to implement the overview?

Thanks a lot for your help,
Amey.
Reply | Threaded
Open this post in threaded view
|

Re: Showing overview of image viewer...

gouessej
Administrator
Hi

I assume that you'd like to show a kind of minimap like in some video games. Do you store each large image into several textures? It shouldn't be difficult to draw them in the bottom right corner.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Showing overview of image viewer...

Wade Walker
Administrator
In reply to this post by Amey
Often I've seen people do this purely in 2D graphics -- they just draw a scaled-down version of the full image, then draw a box on top of it, using their windowing toolkit's 2D graphics calls :) This can be the best option if your overview image is outside the main 3D viewport of your app.  But if you wanted to do this in JOGL, it would be straightforward. You'd just apply a scaled-down version of your full image to a quad as a texture, then draw 3D lines above it (i.e. between the quad and the camera). You're probably already doing something very similar to this to draw the pannable/zoomable version of the image.
Reply | Threaded
Open this post in threaded view
|

Re: Showing overview of image viewer...

Amey
Yes. At present I am doing the first option you suggested. That is, drawing the scaled down version of full image using SWT graphics on a composite (I take a snapshot of the GLCanvas and draw its scaled down version on the composite). But, I wanted to check if OpenGL has some easy way to achieve this. My image is tiled image, so the entire image consists of may textures arranged in grid. Drawing those all textures for the overview seems like lot of work.
Reply | Threaded
Open this post in threaded view
|

Re: Showing overview of image viewer...

Wade Walker
Administrator
Well, you could just render the overview in a second viewport with the camera much farther away and stationary, and put a square of 3D lines over that. If you have good mipmapping for all your textures this might get good performance. But I'm assuming your original image must be very large or you wouldn't have it tiled, so mipmapping all of these is probably not a good solution, since it'll just use up more texture memory :)