<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 9">
<meta name=Originator content="Microsoft Word 9">
<link rel=File-List href="cid:filelist.xml@01C07FA3.40445230">
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:Zoom>0</w:Zoom>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
 </w:WordDocument>
</xml><![endif]-->
<style>
<!--
 /* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;
        mso-font-charset:0;
        mso-generic-font-family:swiss;
        mso-font-pitch:variable;
        mso-font-signature:553679495 -2147483648 8 0 66047 0;}
 /* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
        {margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
span.EmailStyle15
        {mso-style-type:personal-reply;
        mso-ansi-font-size:10.0pt;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:navy;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;
        mso-header-margin:35.4pt;
        mso-footer-margin:35.4pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style>
</head>

<body lang=EN-AU style='tab-interval:36.0pt'>

<div class=Section1>

<p class=MsoNormal><span class=EmailStyle15><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'>If you
have the time, please </span></font></span><font color=navy><span
style='color:navy'>post your vtksbHausdorffDistanceToTarget class. I think that
that is the type of class that I am looking for!</span></font><font color=navy><span
style='color:navy;mso-color-alt:windowtext'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>Thankyou for the comments, they are very
useful and I will look at the vtksbIterativeClosestPointTransform because that is
the other aspect of this problem that is worrying me in this project. </span></font><font
color=navy><span style='color:navy;mso-color-alt:windowtext'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'><![if !supportEmptyParas]>&nbsp;<![endif]></span></font><font
color=navy><span style='color:navy;mso-color-alt:windowtext'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>You have been most helpful.</span></font><font
color=navy><span style='color:navy;mso-color-alt:windowtext'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'><![if !supportEmptyParas]>&nbsp;<![endif]></span></font><font
color=navy><span style='color:navy;mso-color-alt:windowtext'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>Thanks again </span></font><font
color=navy><span style='color:navy;mso-color-alt:windowtext'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'><![if !supportEmptyParas]>&nbsp;<![endif]></span></font><font
color=navy><span style='color:navy;mso-color-alt:windowtext'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>Andrew</span></font><span
class=EmailStyle15><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'><o:p></o:p></span></font></span></p>

<p class=MsoNormal><span class=EmailStyle15><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></font></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=black
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:black'>-----Original
Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> Sebastien BARRE
[mailto:seb-ml-vtk@barre.nom.fr]<br>
<b><span style='font-weight:bold'>Sent:</span></b> Tuesday, 16 January 2001
06:21<br>
<b><span style='font-weight:bold'>To:</span></b> a.maclean@acfr.usyd.edu.au<br>
<b><span style='font-weight:bold'>Cc:</span></b> vtkusers@public.kitware.com<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [vtkusers] Difference
between two surfaces.</span></font></p>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'>At 15/01/2001
15:57, Andrew Maclean wrote:<br>
<br style='mso-special-character:line-break'>
<![if !supportLineBreakNewLine]><br style='mso-special-character:line-break'>
<![endif]></span></font><font color=black><span style='color:black;mso-color-alt:
windowtext'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-right:36.0pt;mso-margin-top-alt:auto;
mso-margin-bottom-alt:auto;margin-left:72.0pt'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:black'>If I
have a surface A, and a surface B, is it possible to generate a difference map
showing how much surface B differs from A.<br>
</span></font><font color=black><span style='color:black'><br>
</span></font><font size=2 color=black face=Arial><span style='font-size:10.0pt;
font-family:Arial;color:black'>I envisage A to be a reference map of some terrain
and B to the actual map of the terrain (say scanned by radar or laser). So I
want to calculate a height map showing the difference of B from A. I cannot
just subtract the height in A from B because it is unlikely that the
coordinates in A will match those sampled in B. </span></font><font
color=black><span style='color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'><br>
Well, provided that both surfaces do not have the same topology, a naive
approach would be :<br>
<br>
a) Use some algorithm to first match both surfaces position and orientation (if
needed)<br>
b) then compute the Hausdorff distance between both.<br>
<br>
With VTK :<br>
<br>
a) I've posted a vtksbIterativeClosestPointTransform some weeks ago, check the
archive :) Use it to register/match both surfaces.<br>
<br>
b) If I find some time, I'll post my vtksbHausdorffDistanceToTarget class, but
it's actually very easy to implement (do not forget to use a vtkPointLocator
otherwise it takes forever).<br>
<br>
Hum, actually It might not be very satisfying because it computes distance
between points. So I guess you might also browse each point P of the surface A,
then find the intersection between the line L starting from that point P toward
the height direction, and the surface B. Do it also in the reverse direction.
It (vtkCellLocator) will return a coordinate on B that does not have to be a
point. Use that coordinate to compute the difference as a measure of the
distance between A and B.<br>
<br>
Good luck :)</span></font><font color=black><span style='color:black;
mso-color-alt:windowtext'><o:p></o:p></span></font></p>

</div>

</body>

</html>