Zoom Annotation

Hi ParaView Team,

Is there a way to show the Zoom level interactivity? There is a Time Annotation that will update as the time is updated, Is there a way to do this with the Zoom level, that is an annotation that would update as the Zoom level changes? I was thinking if there was, the Python Annotation or the Programmable Annotation could be used, but I have not found a way to do this yet. Has someone done this already, or should I write up a feature request for this?

Thanks for your help,

-Phil

Phil,

Zoom isn’t a real property of the VTK camera. You can zoom in or out, but this changes the position of the camera only, it doesn’t change some zoom factor that you can display. You could and potentially display the distance from the camera to the focal point.

A complication is that data sources like Programmable Source don’t have any concept of views, hence they don’t have access to any camera properties. You would have to use ParaView’s Python scripting interface to get the camera property you want to show and then set the properties of, say, a Text source. There might be a way to set up a callback function in ParaView’s Python scripting layer that is executed every time a view is rendered and do the update that way, but that is a hack and it wouldn’t be saved in a state file for example.

Probably the easiest way to add this would be to add it to the text that is shown in a view when the setting Render View → Show Annotation is enabled. That should be able to access the camera and display any properties you want.

1 Like

Indeed, it is even more complicated because sometimes the “zoom” gesture can dolly the camera as @cory.quammen noted and sometimes it can change the camera’s field-of-view angle and sometimes it can change the camera’s parallel-scale factor (when parallel projection is enabled). All of the factors above are relative to the previous camera state, not relative to some absolute “zoom level.”