<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Matt,<div class=""><br class=""></div><div class=""> If you want to erase inside the sphere displayed by the volume erase dialog, first get that dialog then call its erase method:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>from VolumeEraser.gui import volume_erase_dialog</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>d = volume_eraser_dialog(create = True)</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>d.erase_inside_sphere()</div><div class=""><br class=""></div><div class=""> Tom</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span><br class=""><div><blockquote type="cite" class=""><div class="">On Apr 7, 2017, at 5:37 PM, Dougherty, Matthew T wrote:</div><br class="Apple-interchange-newline"><div class=""><div id="divtagdefaultwrapper" dir="ltr" style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif;" class=""><div style="margin-top: 0px; margin-bottom: 0px;" class="">here is a related question, let me know if I should open a new thread. </div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">The VolumeEraser code does this for erasing: self.erase_inside_sphere()</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">writing python code, how can I activate that code in my modules?</div><div style="margin-top: 0px; margin-bottom: 0px;" class="">assuming I have issued a 'start Volume Eraser' command to get the gui up.</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div id="Signature" class=""><div id="divtagdefaultwrapper" style="font-size: 12pt; background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif;" class=""><div class="BodyFragment"><font size="2" class=""><div class="PlainText">Matthew Dougherty<br class="">National Center for Macromolecular Imaging<br class="">Baylor College of Medicine<br class=""><span style="font-size: 13pt; font-family: Calibri;" class="">=================================================</span><br class=""></div><div class="PlainText"><span style="font-size: 13pt; font-family: Calibri;" class="">=================================================</span><span style="font-size: 13pt; font-family: Calibri;" class=""><br class=""></span></div></font></div></div></div></div><hr tabindex="-1" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline-block; width: 760.46875px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""></span><div id="divRplyFwdMsg" dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><font face="Calibri, sans-serif" style="font-size: 11pt;" class=""><b class="">From:</b><span class="Apple-converted-space"> </span>Dougherty, Matthew T<br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Friday, April 7, 2017 2:03:55 PM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Tom Goddard<br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:chimera-dev@cgl.ucsf.edu" class="">chimera-dev@cgl.ucsf.edu</a><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [chimera-dev] programming question: volume display</font><div class=""> </div></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif;" class=""><div style="margin-top: 0px; margin-bottom: 0px;" class="">thx</div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div id="Signature" class=""><div id="divtagdefaultwrapper" style="font-size: 12pt; background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif;" class=""><div class="BodyFragment"><font size="2" class=""><div class="PlainText">Matthew Dougherty<br class="">National Center for Macromolecular Imaging<br class="">Baylor College of Medicine<br class=""><span style="font-size: 13pt; font-family: Calibri;" class="">=================================================</span><br class=""></div><div class="PlainText"><span style="font-size: 13pt; font-family: Calibri;" class="">=================================================</span><span style="font-size: 13pt; font-family: Calibri;" class=""><br class=""></span></div></font></div></div></div></div><hr tabindex="-1" style="display: inline-block; width: 760.46875px;" class=""><div id="divRplyFwdMsg" dir="ltr" class=""><font face="Calibri, sans-serif" style="font-size: 11pt;" class=""><b class="">From:</b><span class="Apple-converted-space"> </span>Tom Goddard <br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Friday, April 7, 2017 12:58:14 PM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Dougherty, Matthew T<br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:chimera-dev@cgl.ucsf.edu" class="">chimera-dev@cgl.ucsf.edu</a><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [chimera-dev] programming question: volume display</font><div class=""> </div></div><div class="">Hi Matt,<div class=""><br class=""></div><div class=""> To get the current region and step for a volume</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space: pre;"></span>ijk_min, ijk_max, ijk_step = v.region</div><div class=""><br class=""></div><div class="">To avoid having the step adjust automatically in the new_region() call use</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space: pre;"></span>new_region(..., adjust_step = False)</div><div class=""><br class=""></div><div class="">Chimera adusts the step to show no more than some specified number of grid points (e.g. 2 million) and this parameter is</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space: pre;"></span>v.rendering_options.voxel_limit = 1 # In millions of voxels</div><div class=""><span class="Apple-tab-span" style="white-space: pre;"></span>v.rendering_options.limit_voxel_count = True # Whether to auto-adjust step</div><div class=""><br class=""></div><div class="">These options are also present in the Volume Viewer dialog, menu Features / Data Display Options.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space: pre;"></span>Tom</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Apr 7, 2017, at 10:52 AM, Dougherty, Matthew T wrote:</div><br class="Apple-interchange-newline"><div class=""><div id="divtagdefaultwrapper" dir="ltr" class="" style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif;"><div id="divtagdefaultwrapper" dir="ltr" class="" style="font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif;"><div class="" style="margin-top: 0px; margin-bottom: 0px;">Got it, thx. Was wondering if there was an alternate API. </div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;">having a problem with ijk_step using this:</div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;"> v.new_region(ijk_min=(i_min, j_min, k_min), ijk_max=(i_max, j_max, k_max), ijk_step=(1,1,1))<br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;">The min and max act correctly, but it<span class="" style="font-size: 12pt;"> jumps into other step sizes when I vary min & max. </span></div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><span class="" style="font-size: 12pt;">would think the step size would be </span></div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;">when the relative min/max is small (i.e., volume is small) the gui step size is one.</div><div class="" style="margin-top: 0px; margin-bottom: 0px;">as the volume increases, the step size increases.</div><div class="" style="margin-top: 0px; margin-bottom: 0px;">if I maximize the volume and manually set the gui step size to one, then the python call works as expected. </div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;">Any ideas?</div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;">also, if I wanted to get the min/max values for the region, how do I get that.</div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div id="Signature" class=""><div id="divtagdefaultwrapper" class="" style="font-size: 12pt; background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif;"><div class="BodyFragment"><font size="2" class=""><div class="PlainText">Matthew Dougherty<br class="">National Center for Macromolecular Imaging<br class="">Baylor College of Medicine<br class=""><span class="" style="font-size: 13pt; font-family: Calibri;">=================================================</span><br class=""></div><div class="PlainText"><span class="" style="font-size: 13pt; font-family: Calibri;">=================================================</span><span class="" style="font-size: 13pt; font-family: Calibri;"><br class=""></span></div></font></div></div></div></div><hr tabindex="-1" class="" style="display: inline-block; width: 750.671875px;"><div id="divRplyFwdMsg" dir="ltr" class=""><font face="Calibri, sans-serif" class="" style="font-size: 11pt;"><b class="">From:</b><span class="Apple-converted-space"> </span>Tom Goddard <br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Wednesday, April 5, 2017 2:13:06 PM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Dougherty, Matthew T<br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:chimera-dev@cgl.ucsf.edu" class="">chimera-dev@cgl.ucsf.edu</a><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [chimera-dev] programming question: volume display</font><div class=""> </div></div><div class="">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). <div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space: pre;"></span>Tom</div><div class=""><br class=""></div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Apr 5, 2017, at 12:00 PM, Dougherty, Matthew T wrote:</div><br class="Apple-interchange-newline"><div class=""><div id="divtagdefaultwrapper" dir="ltr" class="" style="font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif;"><div class="" style="margin-top: 0px; margin-bottom: 0px;">thx</div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;">is volume.py where I would find how to change step size, plane number & depth?</div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div id="Signature" class=""><div id="divtagdefaultwrapper" class="" style="font-size: 12pt; background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif;"><div class="BodyFragment"><font size="2" class=""><div class="PlainText">Matthew Dougherty<br class="">National Center for Macromolecular Imaging<br class="">Baylor College of Medicine<br class=""><span class="" style="font-size: 13pt; font-family: Calibri;">=================================================</span><br class=""></div><div class="PlainText"><span class="" style="font-size: 13pt; font-family: Calibri;">=================================================</span><span class="" style="font-size: 13pt; font-family: Calibri;"><br class=""></span></div></font></div></div></div></div><hr tabindex="-1" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; display: inline-block; width: 754.59375px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; float: none; display: inline !important;"></span><div id="divRplyFwdMsg" dir="ltr" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><font face="Calibri, sans-serif" class="" style="font-size: 11pt;"><b class="">From:</b><span class="Apple-converted-space"> </span>Tom Goddard <br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Wednesday, April 5, 2017 11:41:35 AM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Dougherty, Matthew T<br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:chimera-dev@cgl.ucsf.edu" class="">chimera-dev@cgl.ucsf.edu</a><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [chimera-dev] programming question: volume display</font><div class=""> </div></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><font size="2" class=""><b class="">***CAUTION:*** This email is not from a BCM Source. Only click links or open attachments you know are safe.</b></font><hr class="">To change the region bounds of a volume v in Python:<div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space: pre;"></span>v.new_region((0,0,0), (50,60,70))</div><div class=""><br class=""></div><div class="">Here’s the Python declaration in chimera/share/VolumeViewer/volume.py where the Volume class is defined.<br class=""><div class=""><br class=""></div><div class=""><div class=""> def new_region(self, ijk_min = None, ijk_max = None, ijk_step = None,</div><div class=""> show = True, adjust_step = True, save_in_region_queue = True):</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space: pre;"></span>Tom</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class="">On Apr 4, 2017, at 3:58 PM, Dougherty, Matthew T wrote:</div><br class="Apple-interchange-newline"><div class=""><div id="divtagdefaultwrapper" dir="ltr" class="" style="font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif;"><div class="" style="margin-top: 0px; margin-bottom: 0px;">I am trying to modify the region bounds of the volume viewer using python.</div><div class="" style="margin-top: 0px; margin-bottom: 0px;">What module should I be looking at to determine the api calls?</div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div class="" style="margin-top: 0px; margin-bottom: 0px;">thanks, </div><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""></div><div id="Signature" class=""><div id="divtagdefaultwrapper" class="" style="font-size: 12pt; background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif;"><div class="BodyFragment"><font size="2" class=""><div class="PlainText">Matthew Dougherty<br class="">National Center for Macromolecular Imaging<br class="">Baylor College of Medicine<br class=""><span class="" style="font-size: 13pt; font-family: Calibri;">=================================================</span><br class=""></div><div class="PlainText"><span class="" style="font-size: 13pt; font-family: Calibri;">=================================================</span><span class="" style="font-size: 13pt; font-family: Calibri;"><br class=""></span></div></font></div></div></div></div><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; float: none; display: inline !important;">_______________________________________________</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; float: none; display: inline !important;">Chimera-dev mailing list</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><a href="mailto:Chimera-dev@cgl.ucsf.edu" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">Chimera-dev@cgl.ucsf.edu</a><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__plato.cgl.ucsf.edu_mailman_listinfo_chimera-2Ddev&d=DwMFaQ&c=ZQs-KZ8oxEw0p81sqgiaRA&r=lEMX2_AJ6Iksc5dFd0-VOg&m=yLoyNoWMgD5zwzJG94wrmIzOc4932AAOH-JyYzFd4lE&s=cGwvu-f8x6yixXfp3-QcfYHccDDif6Z9jWo8btcToNY&e=" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev</a></div></blockquote></div></div></div></div></div></blockquote></div></div></div></div></div></blockquote></div></div></div></div></div></blockquote></div><br class=""></div></body></html>