I am trying to write some python scripts relating to volume viewer.
two things I need to have are: 1) the ability to figure out what dataset is active on the volume viewer. I will manually pick that with the mouse, my python sw will process the active model in volume viewer. 2) on the selected dataset I need to know what the min/max values are.
In a unrelated problem: lately I completely avoid changing the camera scale value, I always want it to be 1.0. The mouse scroll wheel changes the scale value, so I am having accidental changes to camera scale values. How do I halt wheel commands from changing scale? under preferences/mouse I have "use mouse scroll wheel" set to false.
side note: I just bought a logitech G600 mouse which has 12 buttons on the mouse that can be programmed through mode (3) and shift(2) buttons to have 12*3*2 active buttons that I can set to accelerator commands. So one of my modes will be dedicated to volume viewer controls, another for stereo/dome/camera, the other is general chimera commands.
Matthew Dougherty National Center for Macromolecular Imaging Baylor College of Medicine
Hi Matt, The mouse scrolling when it is set to false in Preferences sounds distinctly buglike… I've reproduced this and will be submitting a bugreport.
I don't know if people other than Tom G can answer the python stuff. (It might have to wait until his return, sorry.) Best, Elaine ---------- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Jun 28, 2013, at 9:22 PM, "Dougherty, Matthew T" matthewd@bcm.edu wrote:
I am trying to write some python scripts relating to volume viewer.
two things I need to have are:
- the ability to figure out what dataset is active on the volume viewer. I will manually pick that with the mouse, my python sw will process the active model in volume viewer.
- on the selected dataset I need to know what the min/max values are.
In a unrelated problem: lately I completely avoid changing the camera scale value, I always want it to be 1.0. The mouse scroll wheel changes the scale value, so I am having accidental changes to camera scale values. How do I halt wheel commands from changing scale? under preferences/mouse I have "use mouse scroll wheel" set to false.
side note: I just bought a logitech G600 mouse which has 12 buttons on the mouse that can be programmed through mode (3) and shift(2) buttons to have 12*3*2 active buttons that I can set to accelerator commands. So one of my modes will be dedicated to volume viewer controls, another for stereo/dome/camera, the other is general chimera commands.
Matthew Dougherty National Center for Macromolecular Imaging Baylor College of Medicine
On Jul 1, 2013, at 10:26 AM, Elaine Meng meng@cgl.ucsf.edu wrote:
The mouse scrolling when it is set to false in Preferences sounds distinctly buglike… I've reproduced this and will be submitting a bug report.
That preference does work for me, but I'm using a Magic Mouse rather than a mouse with a true scroll wheel…
--Eric
Eric Pettersen UCSF Computer Graphics Lab http://www.cgl.ucsf.edu
On Jun 28, 2013, at 9:22 PM, "Dougherty, Matthew T" matthewd@bcm.edu wrote:
I am trying to write some python scripts relating to volume viewer.
two things I need to have are:
- the ability to figure out what dataset is active on the volume viewer. I will manually pick that with the mouse, my python sw will process the active model in volume viewer.
- on the selected dataset I need to know what the min/max values are.
Hi Matt, As you know, Tom Goddard is on vacation -- so these answers are for novelty purposes only. :-)
1) I'm pretty sure that VolumeViewer.volumedialog.active_volume() will return the active volume (can return None of course in some cases).
2) I think that calling the volume's matrix_value_statistics method will return an object whose .minimum and .maximum attributes are what you want. Maybe.
--Eric
Eric Pettersen UCSF Computer Graphics Lab http://www.cgl.ucsf.edu
Hi Matt,
Eric is right. Here it is with example Python code
from VolumeViewer import active_volume v = active_volume() s = v.matrix_value_statistics() print s.minimum, s.maximum
The active_volume() call can return None, for example if no data set is open. The matrix_value_statistics() call returns the values at the currently displayed subsampling (ie. step size).
Your comment about the "use mouse scroll wheel" setting not working is a bug that I will look at soon.
http://plato.cgl.ucsf.edu/trac/chimera/ticket/12187
Tom
On Jul 1, 2013, at 11:14 AM, Eric Pettersen wrote:
On Jun 28, 2013, at 9:22 PM, "Dougherty, Matthew T" wrote:
I am trying to write some python scripts relating to volume viewer.
two things I need to have are:
- the ability to figure out what dataset is active on the volume viewer. I will manually pick that with the mouse, my python sw will process the active model in volume viewer.
- on the selected dataset I need to know what the min/max values are.
Hi Matt, As you know, Tom Goddard is on vacation -- so these answers are for novelty purposes only. :-)
I'm pretty sure that VolumeViewer.volumedialog.active_volume() will return the active volume (can return None of course in some cases).
I think that calling the volume's matrix_value_statistics method will return an object whose .minimum and .maximum attributes are what you want. Maybe.
--Eric
Eric Pettersen UCSF Computer Graphics Lab http://www.cgl.ucsf.edu
Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
The broken "use mouse scroll wheel" setting was fixed by Eric a week ago. Only effected Mac platform.
Tom
On Jul 8, 2013, at 2:03 PM, Tom Goddard wrote:
Hi Matt,
Eric is right. Here it is with example Python code
from VolumeViewer import active_volume v = active_volume() s = v.matrix_value_statistics() print s.minimum, s.maximum
The active_volume() call can return None, for example if no data set is open. The matrix_value_statistics() call returns the values at the currently displayed subsampling (ie. step size).
Your comment about the "use mouse scroll wheel" setting not working is a bug that I will look at soon.
http://plato.cgl.ucsf.edu/trac/chimera/ticket/12187
Tom
On Jul 1, 2013, at 11:14 AM, Eric Pettersen wrote:
On Jun 28, 2013, at 9:22 PM, "Dougherty, Matthew T" wrote:
I am trying to write some python scripts relating to volume viewer.
two things I need to have are:
- the ability to figure out what dataset is active on the volume viewer. I will manually pick that with the mouse, my python sw will process the active model in volume viewer.
- on the selected dataset I need to know what the min/max values are.
Hi Matt, As you know, Tom Goddard is on vacation -- so these answers are for novelty purposes only. :-)
I'm pretty sure that VolumeViewer.volumedialog.active_volume() will return the active volume (can return None of course in some cases).
I think that calling the volume's matrix_value_statistics method will return an object whose .minimum and .maximum attributes are what you want. Maybe.
--Eric
Eric Pettersen UCSF Computer Graphics Lab http://www.cgl.ucsf.edu
Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
participants (4)
-
Dougherty, Matthew T
-
Elaine Meng
-
Eric Pettersen
-
Tom Goddard