<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 Junha,<div class=""><br class=""></div><div class=""> 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 class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>vop scale #1 factor -8000 value int16</div><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class=""><a href="https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/vop.html#scale" class="">https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/vop.html#scale</a></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><br class=""><blockquote type="cite" class=""><div class="">On Apr 5, 2018, at 3:50 PM, Jun Ha Song wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-size:small">Hello,</div><div class="gmail_default" style="font-size:small"><br class=""></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" class="">→ 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" class=""><br class=""></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" class="">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" class=""><br class=""></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" class="">→ 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" class="">→ 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" class=""><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" class=""><br class=""></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 class=""></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 class=""></div><div class="gmail_default" style="font-size:small">Best,</div><div class="gmail_default" style="font-size:small">Junha Song.</div></div>
<span id="cid:E1B8A9B0-A9B0-4F42-9480-FB41AEB38C3E@cgl.ucsf.edu"><ScaleFloat32to16int.png></span>_______________________________________________<br class="">Chimera-users mailing list: <a href="mailto:Chimera-users@cgl.ucsf.edu" class="">Chimera-users@cgl.ucsf.edu</a><br class="">Manage subscription: <a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users" class="">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a><br class=""></div></blockquote></div><br class=""></div></body></html>