<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Alexis,<div class=""><br class=""></div><div class=""> You are right "volume onesmask #1 onGrid #2" where #1 is a surface and #2 is a map, produces a new map with ones inside the surface on a grid that is usually smaller than map #2. What it is doing is using a subregion of #2 that covers the surface #1. That may sometimes be desirable to make a smaler map, but seems like the wrong default. So I've changed it so it now produces a volume that is exactly the same size as #2. To get the old behavior where it uses a subregion I added the "fullMap" option, "volume onesmask #1 onGrid #2 fullMap false" will give a subregion, but the default is fullMap true.</div><div class=""><br class=""></div><div class=""> If you want to use the full grid with older ChimeraX you can use "volume onesmask #1 onGrid #2 border 1". Formerly if the "border" option was non-zero then it used the full map. If you specify the onGrid option the border option is now ignored (logically it would extend the onGrid map, but I don't have time to add capabilities that no one has ever needed, so for now border only is used if you do not specify onGrid).</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=""><div><br class=""><blockquote type="cite" class=""><div class="">On Mar 28, 2020, at 8:19 PM, Alexis Rohou <<a href="mailto:a.rohou@gmail.com" class="">a.rohou@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Tom,<div class=""><br class=""></div><div class="">Old thread, but I was playing with volume onesmask #n onGrid #m today, and it was not giving an output of the same dimensions as volume #m. Easy enough to then do a volume resample onGrid, but this was not the behavior I expected.</div><div class=""><br class=""></div><div class="">This was with 0.92 (2020-02-20, the palindrome version!) so not the latest, but I wonder whether you can reproduce this and confirm whether that's expected behavior.</div><div class=""><br class=""></div><div class="">Cheers,<br class="">Alexis</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 11, 2019 at 4:22 PM Alexis Rohou <<a href="mailto:a.rohou@gmail.com" class="">a.rohou@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="">Hi Tom,<div class=""><br class=""></div><div class="">Excellent! Turning maps into masks is a pretty common task and I think this will be my new favorite way to do it. </div><div class=""><br class=""></div><div class="">Thanks a lot!</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Alexis</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 11, 2019 at 2:48 PM Tom Goddard <<a href="mailto:goddard@sonic.net" target="_blank" class="">goddard@sonic.net</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="">Hi Alexis,<div class=""><br class=""></div><div class=""> I added an onGrid option to the volume onesmask command. So you can create a mask from the volume #1 surface on the grid of volume #1 using</div><div class=""><br class=""></div><div class=""><span style="white-space:pre-wrap" class=""> </span>volume onesmask #1 ongrid #1</div><div class=""><br class=""></div><div class="">This will be in tonight's ChimeraX builds.</div><div class=""><br class=""></div><div class=""><span style="white-space:pre-wrap" class=""> </span>Tom</div><div class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Dec 11, 2019, at 10:20 AM, Alexis Rohou <<a href="mailto:a.rohou@gmail.com" target="_blank" class="">a.rohou@gmail.com</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class="">Thanks Elaine,<div class=""><br class=""></div><div class="">Thanks for the clarification - I figured I wasn't reading things carefully enough. </div><div class=""><div class=""><br class=""></div><div class="">I worked with "volume mask" followed by "volume threshold" exactly as you suggest, and it worked fine. </div><div class=""><br class=""></div><div class="">The "volume onesmask" as it is now stands out from most other volume operations in that it creates an entirely new grid and doesn't even let us stay on the same grid as the input. This makes it not-very-useful for my regular work, but I'm sure there was a good reason initially.</div><div class=""><br class=""></div><div class="">Just saw Tom's email re. surface v volume distinction. Makes sense of course, though I do think harmonizing the options across volume operations would be nice if easily achievable. </div></div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Alexis</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 11, 2019 at 10:15 AM Elaine Meng <<a href="mailto:meng@cgl.ucsf.edu" target="_blank" class="">meng@cgl.ucsf.edu</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Alexis,<br class="">
The “remaining options” referred to those which are shown in the usage line for “volume onesmask” but not explained directly in that section:<br class="">
<br class="">
• volume onesmask surface-spec [ border B ] [ spacing S | Sx,Sy,Sz ] [ pad distance ] [ extend N ] [ slab width | d1,d2 ] [ invertMask true | false ] [ axis vector-spec ] [ sandwich true | false ] [ fillOverlap true | false ] [ modelId M ]<br class="">
<br class="">
<<a href="http://rbvi.ucsf.edu/chimerax/docs/user/commands/volume.html#onesmask" rel="noreferrer" target="_blank" class="">http://rbvi.ucsf.edu/chimerax/docs/user/commands/volume.html#onesmask</a>><br class="">
<br class="">
Options not shown in that usage line are not available, at least as far as I knew when I wrote the documentation. You can always check with the “usage” command, e.g. “usage volume onesmask” will show all of its current options in the Log.<br class="">
<br class="">
The differences are that mask has a fullmap option whereas onesmask has border and spacing options. I don’t know the rationale for the differences, sorry. I imagine you might be able to get the result you wanted with a combination of operations, maybe using “volume mask” first and then “volume threshold” to reset all nonzero values to 1, but I don’t know how well that would work, and it seems unnecessarily indirect. If I think of anything better, will let you know. <br class="">
Elaine<br class="">
-----<br class="">
Elaine C. Meng, Ph.D.<br class="">
UCSF Chimera(X) team<br class="">
Department of Pharmaceutical Chemistry<br class="">
University of California, San Francisco<br class="">
<br class="">
> On Dec 11, 2019, at 9:58 AM, Alexis Rohou <<a href="mailto:a.rohou@gmail.com" target="_blank" class="">a.rohou@gmail.com</a>> wrote:<br class="">
> <br class="">
> Hi there,<br class="">
> <br class="">
> I was trying to use "volume onesmask" to go quickly from a dusted surface of a low-pass-filtered volume to a mask volume with the same dimensions, spacing, etc. as the input map. <br class="">
> <br class="">
> I thought "fullmap" might be a way to achieve this (the doc says "The remaining options are the same as described for volume mask"), but I don't think that option actually works with "volume onesmask":<br class="">
> <br class="">
> volume onesmask #3 fullmap true<br class="">
> Expected a keyword<br class="">
> <br class="">
> Is there a "onesmask"-like operation or set of options that creates an output volume that's on the same grid as the input volume?<br class="">
> <br class="">
> Thanks,<br class="">
> Alexis<br class="">
<br class="">
</blockquote></div>
_______________________________________________<br class="">ChimeraX-users mailing list<br class=""><a href="mailto:ChimeraX-users@cgl.ucsf.edu" target="_blank" class="">ChimeraX-users@cgl.ucsf.edu</a><br class="">Manage subscription:<br class=""><a href="http://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users" target="_blank" class="">http://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users</a><br class=""></div></blockquote></div><br class=""></div></div></blockquote></div>
</blockquote></div>
</div></blockquote></div><br class=""></div></body></html>