<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=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 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:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.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 90.0pt 72.0pt 90.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="FR-CA" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-CA">While reading some code, I stumbled on a GetLength() function that wasn’t returning the length of the current projectionLine…<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA">The resulting image doesn’t change much. So I can’t say if it makes the image better or worse.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA">In detail:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA">Source: \src\projector\iProjectorIncrementalSiddonMulti.cc<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:blue">(line:189) if</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black"> (mp_Scanner->GetRdmPositionsAndOrientations(
</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:gray">ap_ProjectionLine</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black">->GetIndex1(),
</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:gray">ap_ProjectionLine</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black">->GetIndex2(),
<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black"> </span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:gray">ap_ProjectionLine</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black">->GetPosition1(),
</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:gray">ap_ProjectionLine</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black">->GetPosition2(),<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black"> </span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:gray">ap_ProjectionLine</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black">->GetOrientation1(),
</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:gray">ap_ProjectionLine</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black">->GetOrientation2() ))<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black">[…]<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black"> </span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:green">// **************************************</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black"> </span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:green">// STEP 1: LOR length calculation</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black"> </span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:green">// **************************************</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:blue">(line:213)</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:#6F008A">HPFLTNB</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black"> length_LOR =
</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:gray">ap_ProjectionLine</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black">->GetLength();<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA">GetLength() does not take into account the length change caused by
</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black">mp_Scanner->GetRdmPositionsAndOrientations<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA">If it wasn’t intentional, a simple solution would be to add a call to ComputeLineLength():<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black"> </span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:green">// **************************************</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:green">// STEP 1: LOR length calculation</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:green">// **************************************<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:green">
</span><span style="font-size:9.5pt;font-family:Consolas;color:gray">ap_ProjectionLine</span><span style="font-size:9.5pt;font-family:Consolas;color:black">->ComputeLineLength();</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:green"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:#6F008A">HPFLTNB</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black"> length_LOR =
</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:gray">ap_ProjectionLine</span><span lang="EN-CA" style="font-size:9.5pt;font-family:Consolas;color:black">->GetLength();<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA">Hope that helps.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="mso-fareast-language:FR-CA">Simon Laperle</span></b><span style="mso-fareast-language:FR-CA"><o:p></o:p></span></p>
</div>
</body>
</html>