<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>thx</p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<div class="BodyFragment"><font size="2">
<div class="PlainText">Matthew Dougherty<br>
National Center for Macromolecular Imaging<br>
Baylor College of Medicine<br>
<span style="font-size:13.0pt; font-family:Calibri">=================================================</span><br>
</div>
<div class="PlainText"><span style="font-size:13pt; font-family:Calibri">=================================================</span><span style="font-size:13.0pt; font-family:Calibri"><br>
</span></div>
</font></div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Tom Goddard <goddard@sonic.net><br>
<b>Sent:</b> Friday, April 7, 2017 12:58:14 PM<br>
<b>To:</b> Dougherty, Matthew T<br>
<b>Cc:</b> chimera-dev@cgl.ucsf.edu<br>
<b>Subject:</b> Re: [chimera-dev] programming question: volume display</font>
<div> </div>
</div>
<div>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>
<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" 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;" 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="">Got it, thx. Was wondering if there was an alternate API. </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 style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">having a problem with ijk_step using this:</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""> 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 style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">The min and max act correctly, but it<span style="font-size: 12pt;" class=""> jumps into other step sizes when I vary min & max. </span></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="font-size: 12pt;" class="">would think the step size would be </span></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">when the relative min/max is small (i.e., volume is small) the gui step size is one.</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">as the volume increases, the step size increases.</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">if I maximize the volume and manually set the gui step size to one, then the python call works as expected. </div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Any ideas?</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">also, if I wanted to get the min/max values for the region, how do I get that.</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: 750.671875px;" 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 <<a href="mailto:goddard@sonic.net" class="">goddard@sonic.net</a>><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 <<a href="mailto:matthewd@bcm.edu" class="">matthewd@bcm.edu</a>> 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 <<a href="mailto:goddard@sonic.net" class="">goddard@sonic.net</a>><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 <<a href="mailto:matthewd@bcm.edu" class="">matthewd@bcm.edu</a>> 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>
<br class="">
</div>
</div>
</body>
</html>