<div dir="ltr">That is a great help.  Thanks a lot.</div><div class="gmail_extra"><br><div class="gmail_quote">2017-04-12 2:17 GMT+09:00 Derek Magee <span dir="ltr"><<a href="mailto:D.R.Magee@leeds.ac.uk" target="_blank">D.R.Magee@leeds.ac.uk</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-GB" link="blue" vlink="purple">
<div class="m_5755387436226848075WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">The logic I use is (pseudocode):<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">If
</span><span style="font-size:9.5pt;font-family:Consolas">tiff.ResolutionUnit==”<wbr>centimetre” : numerator = 10000 // microns in CM<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas">Else : numerator = 25400 // Microns in Inch<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas">// I’m not totally sure what other values there can be (I’ve never seen anything but “centimetre”, and the standard uses numbers*),
 but assume it’s inches if not cm. Technically there’s<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas">// a third option of “</span>No absolute unit of measurement.”, but rare enough not to worry about IMHO ….<span style="font-size:9.5pt;font-family:Consolas"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas">Mppx = numerator / tiff.XResolution<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas">Mppy = numerator / tiff.YResolution<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas">Where tiff.ResolutionUnit, tiff.XResolution, and tiff.YResolution come from openslide. These tags are standard and well documented:<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"><a href="http://www.awaresystems.be/imaging/tiff/tifftags/resolutionunit.html" target="_blank">http://www.awaresystems.be/<wbr>imaging/tiff/tifftags/<wbr>resolutionunit.html</a><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"><a href="http://www.awaresystems.be/imaging/tiff/tifftags/xresolution.html" target="_blank">http://www.awaresystems.be/<wbr>imaging/tiff/tifftags/<wbr>xresolution.html</a><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas"><a href="http://www.awaresystems.be/imaging/tiff/tifftags/yresolution.html" target="_blank">http://www.awaresystems.be/<wbr>imaging/tiff/tifftags/<wbr>yresolution.html</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">HTH<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Derek<u></u><u></u></span></p>
<p class="MsoNormal"><a name="m_5755387436226848075__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></a></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> openslide-users [mailto:<a href="mailto:openslide-users-bounces%2Bd.r.magee" target="_blank">openslide-users-<wbr>bounces+d.r.magee</a>=<a href="mailto:leeds.ac.uk@lists.andrew.cmu.edu" target="_blank">leeds.ac.uk@<wbr>lists.andrew.cmu.edu</a>]
<b>On Behalf Of </b>kyuhyoung choi<br>
<b>Sent:</b> 11 April 2017 16:08<br>
<b>To:</b> <a href="mailto:openslide-users@lists.andrew.cmu.edu" target="_blank">openslide-users@lists.andrew.<wbr>cmu.edu</a><br>
<b>Subject:</b> Relation between mpp-{x,y} and {X,Y}Resolution<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">I have many WSIs from 7 different sources (medical centers)<u></u><u></u></p>
<div>
<p class="MsoNormal">I want to scale the level 0 images of them to a standard resolution (given by me).<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">So I thinking about using mpp-{x, y} to do that.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">However, for some of the slides, I can not access mpp-{x, y} properties when I open them with openslide.<br>
Instead I found I can get the properties of {<span style="font-size:10.0pt;font-family:"Courier New";color:black">X, Y}Resolution and ResolutionUnit.</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New";color:black">Is there any equation between </span>{<span style="font-size:10.0pt;font-family:"Courier New";color:black">X, Y}Resolution and mpp-{x,y} ?</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:black">If not, how can I scale all the slides to the same resolution?</span><u></u><u></u></p>
</div>
</div>
</div></div></div>
</div>

</blockquote></div><br></div>