<div dir="ltr"><div class="gmail_default" style="font-size:small">Tom,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thank you for your swift reply! :)</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Best,</div><div class="gmail_default" style="font-size:small">Junha.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 5, 2018 at 4:18 PM, Tom Goddard <span dir="ltr"><<a href="mailto:goddard@sonic.net" target="_blank">goddard@sonic.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Hi Junha,<div><br></div><div>  You use the “vop scale” command to scale and convert a 32-bit float map to 16-bit integer.  The reason you get just 4 spikes in the histogram of a converted map is because the floating point values ranged say from 0 - 3.5 and when converted to integer those get rounded to 0,1,2,3.  In order to use the full 16-bit integer range (+/-  32000) you’d want to scale the float values.  The scale factor you need depends on the range of data values (which is shown in the Volume Viewer dialog below the histogram).  So for example if the floating point range of values was 0 to 3.5 I could use</div><div><br></div><div><span class="m_7236322797551574680Apple-tab-span" style="white-space:pre-wrap">      </span>vop scale #1 factor -8000 value int16</div><div><br></div><div>If you want to convert to an unsigned integer type (uint16) then you need to scale and shift the float values to put them in the range 0-65355, values out of range (e.g. negative) will be clamped (e.g. to 0).</div><div><br></div><div><a href="https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/vop.html#scale" target="_blank">https://www.cgl.ucsf.edu/<wbr>chimera/docs/UsersGuide/midas/<wbr>vop.html#scale</a></div><div><br></div><div><span class="m_7236322797551574680Apple-tab-span" style="white-space:pre-wrap">      </span>Tom</div><div><br><div><br><blockquote type="cite"><div><div class="h5"><div>On Apr 5, 2018, at 3:50 PM, Jun Ha Song wrote:</div><br class="m_7236322797551574680Apple-interchange-newline"></div></div><div><div><div class="h5"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hello,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I sometimes invert my map using Fiji, and I also convert my 32bit map into 16bit map using Fiji's "Image →  Type 

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">→ 16-bit" function, but the only way to retrieve the map from Fiji is to save the map as .tif stack, then use IMOD's "tif2mrc" to get it back as .mrc file.</span></div><div class="gmail_default" style="font-size:small"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div class="gmail_default" style="font-size:small"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">However, once I save my map as .tif, the pixel spacing information of the map is set to 1,1,1. Because of this, I always have to re-adjust the pixel spacing back to original using IMOD's "alterheader" once I use Fiji for any kind of image adjustment.</span></div><div class="gmail_default" style="font-size:small"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div class="gmail_default" style="font-size:small">I know I can invert a map in Chimera (without setting the pixel spacing to 1,1,1 like Fiji) by using "Volume Filter 

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">→ Filter Type : Scale 

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">→ Scale by -1", but I don't know how to turn my 32bit map into 16bit map.</span></span></div><div class="gmail_default" style="font-size:small"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></span></div><div class="gmail_default" style="font-size:small">Although the "Value Type" of scale filter allows me to specify which bit I want the map to be in, when I filter my float32 map with value type set to either int16 or uint16, the filtered map shows histogram with only few lines.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Can UCSF Chimera turn float32bit map into 16bit map?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Best,</div><div class="gmail_default" style="font-size:small">Junha Song.</div></div>
</div></div><span id="m_7236322797551574680cid:E1B8A9B0-A9B0-4F42-9480-FB41AEB38C3E@cgl.ucsf.edu"><ScaleFloat32to16int.png></span>_____<wbr>______________________________<wbr>____________<br>Chimera-users mailing list: <a href="mailto:Chimera-users@cgl.ucsf.edu" target="_blank">Chimera-users@cgl.ucsf.edu</a><br>Manage subscription: <a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users" target="_blank">http://plato.cgl.ucsf.edu/<wbr>mailman/listinfo/chimera-users</a><br></div></blockquote></div><br></div></div></blockquote></div><br></div>