Get values from other chimera dialogs

Hello everyone! I feel you will get tired of me asking so many questions hehe Anyway, I continue developing my plugin and I'd like to know if there's any way to get values from other chimera dialogs although they are not open. For example, when my map is loaded I need the values, from the Volume Viewer, of the voxel size (in Coordinates panel) and the cutoff, but I didn't find how to get them and I really don't know if this is possible or not. Thank you in advance and, as usual, kind regards! Pablo.

Hi Pablo, I am not the expert on the volume viewer or volumes in general — our expert is on vacation until the end of next week — but here’s what I’ve got. First, this will find the Volume Viewer dialog instance for you: from chimera import dialogs vdlg = dialogs.find(“volume viewer”) Then, the following will return strings containing the voxel size and counter level respectively. You would have to apply float() to them to turn them into numbers… voxel_size = vdlg.coordinates_panel.voxel_size.get() contour_level = vdlg.thresholds_panel.threshold.get() —Eric Eric Pettersen UCSF Computer Graphics Lab
On Apr 27, 2017, at 11:11 AM, Pablo Solar Rodríguez <pablosolar.r@gmail.com> wrote:
Hello everyone!
I feel you will get tired of me asking so many questions hehe
Anyway, I continue developing my plugin and I'd like to know if there's any way to get values from other chimera dialogs although they are not open.
For example, when my map is loaded I need the values, from the Volume Viewer, of the voxel size (in Coordinates panel) and the cutoff, but I didn't find how to get them and I really don't know if this is possible or not.
Thank you in advance and, as usual, kind regards!
Pablo.
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev

Hi Pablo, Do you really want the volume dialog settings, or do you just want the settings of a specific Python volume object? I’m guessing the latter. If v is the volume, the voxel size is v.data.step and the surface contour levels are v.surface_levels which is a list (since a volume can show surfaces at multiple levels). The Chimera Python scripts page gives an example http://plato.cgl.ucsf.edu/trac/chimera/attachment/wiki/Scripts/readvol.py <http://plato.cgl.ucsf.edu/trac/chimera/attachment/wiki/Scripts/readvol.py> and the Volume class and Grid_Data class (v.data) are defined in Python code http://plato.cgl.ucsf.edu/trac/chimera/browser/trunk/libs/VolumeViewer/volum... <http://plato.cgl.ucsf.edu/trac/chimera/browser/trunk/libs/VolumeViewer/volume.py> http://plato.cgl.ucsf.edu/trac/chimera/browser/trunk/libs/VolumeData/griddat... Tom
On Apr 27, 2017, at 11:11 AM, Pablo Solar Rodríguez wrote:
Hello everyone!
I feel you will get tired of me asking so many questions hehe
Anyway, I continue developing my plugin and I'd like to know if there's any way to get values from other chimera dialogs although they are not open.
For example, when my map is loaded I need the values, from the Volume Viewer, of the voxel size (in Coordinates panel) and the cutoff, but I didn't find how to get them and I really don't know if this is possible or not.
Thank you in advance and, as usual, kind regards!
Pablo.
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
participants (3)
-
Eric Pettersen
-
Pablo Solar Rodríguez
-
Tom Goddard