You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I’m encountering some issues while adjusting the initial view state.
How can I adjust the initial view size, or is there a function similar to auto_range that scales the entire figure to fit within the visible area? Currently, if my images are large, only a small portion is displayed, making the initial view too zoomed in. I know there are parameters like scale, render_width, and render_height that can be adjusted, but if there are too many images or meshes, adjusting each one individually becomes tedious. Additionally, it’s hard to know the exact values to achieve the desired result.
Is there a way to set the coordinate center on the screen? In many cases, the range we’re interested in is greater than zero. For example, I may use three images to represent slices of a 3D medical CT scan or different directions of a 3D geological model, and typically, the coordinates I set are greater than zero. In this case, the generated figure appears shifted towards the top-right corner of the screen instead of being centered, requiring extra dragging to reach the center.
A more general/ultimate question: After adjusting a view (rotating, zooming, panning), how can I easily reproduce this exact state? As you know, when preparing publications or slides for presentations, we often need to display different datasets or results from the same perspective/view to facilitate comparison. This requires capturing the current visualization state after adjusting it to the optimal view, and then applying that state when visualizing other data.
I’d be grateful for your help. Thank you!
The text was updated successfully, but these errors were encountered:
I think the best we have for all of these is the camera handle API, which lets you read/write the camera state.
For your three questions:
There's no auto_range, but you can do some math to set the camera position, orientation, look at, FOV, etc programatically.
You can set camera.look_at to a length-3 tuple or numpy array to look at a specific point in the scene.
For saving/restoring the camera state, you can read these properties and then write them back later. This would also require code on your end, however.
For accessing the camera handle, one option is to do so when the client connects:
Hi! I’m encountering some issues while adjusting the initial view state.
How can I adjust the initial view size, or is there a function similar to
auto_range
that scales the entire figure to fit within the visible area? Currently, if my images are large, only a small portion is displayed, making the initial view too zoomed in. I know there are parameters likescale
,render_width
, andrender_height
that can be adjusted, but if there are too many images or meshes, adjusting each one individually becomes tedious. Additionally, it’s hard to know the exact values to achieve the desired result.Is there a way to set the coordinate center on the screen? In many cases, the range we’re interested in is greater than zero. For example, I may use three images to represent slices of a 3D medical CT scan or different directions of a 3D geological model, and typically, the coordinates I set are greater than zero. In this case, the generated figure appears shifted towards the top-right corner of the screen instead of being centered, requiring extra dragging to reach the center.
A more general/ultimate question: After adjusting a view (rotating, zooming, panning), how can I easily reproduce this exact state? As you know, when preparing publications or slides for presentations, we often need to display different datasets or results from the same perspective/view to facilitate comparison. This requires capturing the current visualization state after adjusting it to the optimal view, and then applying that state when visualizing other data.
I’d be grateful for your help. Thank you!
The text was updated successfully, but these errors were encountered: