<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The logic I use is (pseudocode):<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></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;mso-fareast-language:EN-US">tiff.ResolutionUnit==”centimetre” : numerator = 10000 // microns in CM<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-language:EN-US">Else : numerator = 25400 // Microns in Inch<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-language:EN-US">// 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<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-language:EN-US">// 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;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-language:EN-US">Mppx = numerator / tiff.XResolution<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-language:EN-US">Mppy = numerator / tiff.YResolution<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-language:EN-US">Where tiff.ResolutionUnit, tiff.XResolution, and tiff.YResolution come from openslide. These tags are standard and well documented:<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-language:EN-US"><a href="http://www.awaresystems.be/imaging/tiff/tifftags/resolutionunit.html">http://www.awaresystems.be/imaging/tiff/tifftags/resolutionunit.html</a><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-language:EN-US"><a href="http://www.awaresystems.be/imaging/tiff/tifftags/xresolution.html">http://www.awaresystems.be/imaging/tiff/tifftags/xresolution.html</a><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;mso-fareast-language:EN-US"><a href="http://www.awaresystems.be/imaging/tiff/tifftags/yresolution.html">http://www.awaresystems.be/imaging/tiff/tifftags/yresolution.html</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">HTH<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Derek<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></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:openslide-users-bounces+d.r.magee=leeds.ac.uk@lists.andrew.cmu.edu]
<b>On Behalf Of </b>kyuhyoung choi<br>
<b>Sent:</b> 11 April 2017 16:08<br>
<b>To:</b> openslide-users@lists.andrew.cmu.edu<br>
<b>Subject:</b> Relation between mpp-{x,y} and {X,Y}Resolution<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">I have many WSIs from 7 different sources (medical centers)<o:p></o:p></p>
<div>
<p class="MsoNormal">I want to scale the level 0 images of them to a standard resolution (given by me).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">So I thinking about using mpp-{x, y} to do that.<o:p></o:p></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><o:p></o:p></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><o:p></o:p></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><o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>