Volume eraser shows a sphere.  There is no code to show a box.  Would not be too hard to add such code, but we are not making such feature improvements to Chimera since our development of new features is in the next generation ChimeraX.

Tom

On Apr 10, 2017, at 11:22 AM, Dougherty, Matthew T <matthewd@bcm.edu> wrote:

thx

I noticed in the source and the accelerators that I can erase a box (inside or out).  How can I display the box instead of the sphere?
I assume I would disable the sphere graphic and write a box graphic, i.e. there is no api I am missing.

Matthew Dougherty
National Center for Macromolecular Imaging
Baylor College of Medicine
=================================================
=================================================

From: Tom Goddard <goddard@sonic.net>
Sent: Monday, April 10, 2017 12:15:12 PM
To: Dougherty, Matthew T
Cc: chimera-dev@cgl.ucsf.edu
Subject: Re: [chimera-dev] programming question: volume display
 
Hi Matt,

  If you want to erase inside the sphere displayed by the volume erase dialog, first get that dialog then call its erase method:

from VolumeEraser.gui import volume_erase_dialog
d = volume_eraser_dialog(create = True)
d.erase_inside_sphere()

  Tom



On Apr 7, 2017, at 5:37 PM, Dougherty, Matthew T  wrote:

here is a related question, let me know if I should open a new thread. 

The VolumeEraser code does this for erasing:  self.erase_inside_sphere()

writing python code, how can I activate that code in my modules?
assuming I have issued a 'start Volume Eraser' command to get the gui up.


Matthew Dougherty
National Center for Macromolecular Imaging
Baylor College of Medicine
=================================================
=================================================

From: Dougherty, Matthew T
Sent: Friday, April 7, 2017 2:03:55 PM
To: Tom Goddard
Cc: chimera-dev@cgl.ucsf.edu
Subject: Re: [chimera-dev] programming question: volume display
 
thx

Matthew Dougherty
National Center for Macromolecular Imaging
Baylor College of Medicine
=================================================
=================================================

From: Tom Goddard 
Sent: Friday, April 7, 2017 12:58:14 PM
To: Dougherty, Matthew T
Cc: chimera-dev@cgl.ucsf.edu
Subject: Re: [chimera-dev] programming question: volume display
 
Hi Matt,

  To get the current region and step for a volume

ijk_min, ijk_max, ijk_step = v.region

To avoid having the step adjust automatically in the new_region() call use

new_region(..., adjust_step = False)

Chimera adusts the step to show no more than some specified number of grid points (e.g. 2 million) and this parameter is

v.rendering_options.voxel_limit = 1    # In millions of voxels
v.rendering_options.limit_voxel_count = True  # Whether to auto-adjust step

These options are also present in the Volume Viewer dialog, menu Features / Data Display Options.

Tom

On Apr 7, 2017, at 10:52 AM, Dougherty, Matthew T wrote:

Got it, thx.  Was wondering if there was an alternate API. 



having a problem with ijk_step using this:

   v.new_region(ijk_min=(i_min, j_min, k_min), ijk_max=(i_max, j_max, k_max), ijk_step=(1,1,1))

The min and max act correctly, but it jumps into other step sizes when I vary min & max. 
would think the step size would be 

when the relative min/max is small (i.e., volume is small) the gui step size is one.
as the volume increases, the step size increases.
if I maximize the volume and manually set the gui step size to one, then the python call works as expected. 

Any ideas?

also, if I wanted to get the min/max values for the region, how do I get that.

Matthew Dougherty
National Center for Macromolecular Imaging
Baylor College of Medicine
=================================================
=================================================

From: Tom Goddard 
Sent: Wednesday, April 5, 2017 2:13:06 PM
To: Dougherty, Matthew T
Cc: chimera-dev@cgl.ucsf.edu
Subject: Re: [chimera-dev] programming question: volume display
 
Yes.  In fact all that is done with the new_region() routine.  (set step with the ijk_step argument, eg. ijk_step = (2,2,2).  Set plane number by setting ijk_min, ijk_max to show one plane).  

Tom


On Apr 5, 2017, at 12:00 PM, Dougherty, Matthew T wrote:

thx

is volume.py where I would find how to change step size, plane number & depth?

Matthew Dougherty
National Center for Macromolecular Imaging
Baylor College of Medicine
=================================================
=================================================

From: Tom Goddard 
Sent: Wednesday, April 5, 2017 11:41:35 AM
To: Dougherty, Matthew T
Cc: chimera-dev@cgl.ucsf.edu
Subject: Re: [chimera-dev] programming question: volume display
 
***CAUTION:*** This email is not from a BCM Source. Only click links or open attachments you know are safe.
To change the region bounds of a volume v in Python:

v.new_region((0,0,0), (50,60,70))

Here’s the Python declaration in chimera/share/VolumeViewer/volume.py where the Volume class is defined.

  def new_region(self, ijk_min = None, ijk_max = None, ijk_step = None,
                 show = True, adjust_step = True, save_in_region_queue = True):

Tom


On Apr 4, 2017, at 3:58 PM, Dougherty, Matthew T wrote:

I am trying to modify the region bounds of the volume viewer using python.
What module should I be looking at to determine the api calls?

thanks, 

Matthew Dougherty
National Center for Macromolecular Imaging
Baylor College of Medicine
=================================================
=================================================
_______________________________________________
Chimera-dev mailing list
Chimera-dev@cgl.ucsf.edu
http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev