<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:st1="urn:schemas-microsoft-com:office:smarttags" 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 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PlaceType"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PlaceName"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";
        color:black;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 @list l0
        {mso-list-id:1405375105;
        mso-list-template-ids:67698725;
        mso-list-style-name:"1 \/ 1\.1 \/ 1\.1\.1";}
@list l0:level1
        {mso-level-text:%1;
        mso-level-tab-stop:.3in;
        mso-level-number-position:left;
        margin-left:.3in;
        text-indent:-.3in;
        mso-ansi-font-weight:bold;}
@list l0:level2
        {mso-level-text:"%1\.%2";
        mso-level-tab-stop:.4in;
        mso-level-number-position:left;
        margin-left:.4in;
        text-indent:-.4in;
        mso-ansi-font-weight:bold;}
@list l0:level3
        {mso-level-text:"%1\.%2\.%3";
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        margin-left:.5in;
        text-indent:-.5in;}
@list l0:level4
        {mso-level-text:"%1\.%2\.%3\.%4";
        mso-level-tab-stop:.6in;
        mso-level-number-position:left;
        margin-left:.6in;
        text-indent:-.6in;}
@list l0:level5
        {mso-level-text:"%1\.%2\.%3\.%4\.%5";
        mso-level-tab-stop:.7in;
        mso-level-number-position:left;
        margin-left:.7in;
        text-indent:-.7in;}
@list l0:level6
        {mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6";
        mso-level-tab-stop:.8in;
        mso-level-number-position:left;
        margin-left:.8in;
        text-indent:-.8in;}
@list l0:level7
        {mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7";
        mso-level-tab-stop:.9in;
        mso-level-number-position:left;
        margin-left:.9in;
        text-indent:-.9in;}
@list l0:level8
        {mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8";
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        margin-left:1.0in;
        text-indent:-1.0in;}
@list l0:level9
        {mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.%9";
        mso-level-tab-stop:1.1in;
        mso-level-number-position:left;
        margin-left:1.1in;
        text-indent:-1.1in;}
@list l1
        {mso-list-id:1890266351;
        mso-list-template-ids:67698719;
        mso-list-style-name:"1 \/ 1\.1 \/ 1\.1\.1";}
@list l1:level1
        {mso-level-tab-stop:.25in;
        mso-level-number-position:left;
        margin-left:.25in;
        text-indent:-.25in;}
@list l1:level2
        {mso-level-text:"%1\.%2\.";
        mso-level-tab-stop:.55in;
        mso-level-number-position:left;
        margin-left:.55in;
        text-indent:-.3in;}
@list l1:level3
        {mso-level-text:"%1\.%2\.%3\.";
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        margin-left:.85in;
        text-indent:-.35in;}
@list l1:level4
        {mso-level-text:"%1\.%2\.%3\.%4\.";
        mso-level-tab-stop:1.25in;
        mso-level-number-position:left;
        margin-left:1.2in;
        text-indent:-.45in;}
@list l1:level5
        {mso-level-text:"%1\.%2\.%3\.%4\.%5\.";
        mso-level-tab-stop:1.75in;
        mso-level-number-position:left;
        margin-left:1.55in;
        text-indent:-.55in;}
@list l1:level6
        {mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.";
        mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        margin-left:1.9in;
        text-indent:-.65in;}
@list l1:level7
        {mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.";
        mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        margin-left:2.25in;
        text-indent:-.75in;}
@list l1:level8
        {mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.";
        mso-level-tab-stop:2.75in;
        mso-level-number-position:left;
        margin-left:2.6in;
        text-indent:-.85in;}
@list l1:level9
        {mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.%9\.";
        mso-level-tab-stop:3.25in;
        mso-level-number-position:left;
        margin-left:3.0in;
        text-indent:-1.0in;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</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 bgcolor=white lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Hi Dan,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I&#8217;ve already seen your submitted spatial
object, the only pb that is that you didn&#8217;t give the point that must be test
for such a negative lambda. Well yes every point on the left of a &#8220;sub tube&#8221; (tube
composed by two current points in the loop of the test) will have such a
negative lambda. The pb is that such point should not be tested in case because
by definition is out of the sub tube so we should skip the current sub tube and
take another 2 points.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>As I pointed it to Julien, there is
however another pb with the fact that the current test is not accurate as it
consider our sub tube as right truncated cone whereas the are general oblique
truncated cones&#8230;but this is another story.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Anyway I am really interested in seeing
your approach in the insight journal. Thanks for your remarks.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=MsoAutoSig><i><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy;font-style:italic'>Best Regards,<o:p></o:p></span></font></i></p>

<p class=MsoAutoSig><i><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy;font-style:italic'><o:p>&nbsp;</o:p></span></font></i></p>

<p class=MsoAutoSig><i><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy;font-style:italic'>Jerome Schmid<o:p></o:p></span></font></i></p>

<p class=MsoAutoSig><i><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy;font-style:italic'><o:p>&nbsp;</o:p></span></font></i></p>

<p class=MsoAutoSig><i><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy;font-style:italic'>---------------------------------------------<o:p></o:p></span></font></i></p>

<p class=MsoAutoSig><i><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy;font-style:italic'>Jerome SCHMID<o:p></o:p></span></font></i></p>

<p class=MsoAutoSig><i><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy;font-style:italic'>Project Manager /
Engineer <o:p></o:p></span></font></i></p>

<p class=MsoAutoSig><i><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy;font-style:italic'>Augmented and Virtual
Reality<o:p></o:p></span></font></i></p>

<p class=MsoAutoSig><i><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy;font-style:italic'>Minimally Invasive
Surgical <st1:place w:st="on"><st1:PlaceName w:st="on">Skills</st1:PlaceName> <st1:PlaceType
 w:st="on">Center</st1:PlaceType></st1:place> (MISS)<o:p></o:p></span></font></i></p>

<p class=MsoAutoSig><i><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy;font-style:italic'>http://www.hkmisc.org.hk/<o:p></o:p></span></font></i></p>

<p class=MsoAutoSig><i><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy;font-style:italic'>Prince of <st1:place
w:st="on"><st1:PlaceName w:st="on">Wales</st1:PlaceName> <st1:PlaceType w:st="on">Hospital</st1:PlaceType></st1:place><o:p></o:p></span></font></i></p>

<p class=MsoAutoSig><st1:PlaceName w:st="on"><i><font size=3 color=navy
 face="Times New Roman"><span style='font-size:12.0pt;color:navy;font-style:
 italic'>Chinese</span></font></i></st1:PlaceName><i><font color=navy><span
style='color:navy;font-style:italic'> <st1:PlaceType w:st="on">University</st1:PlaceType>
Of <st1:place w:st="on">Hong Kong</st1:place><o:p></o:p></span></font></i></p>

<p class=MsoAutoSig><i><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy;font-style:italic'>----------------------------------------------<o:p></o:p></span></font></i></p>

</div>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
color=black face="Times New Roman"><span style='font-size:12.0pt;color:windowtext'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 color=black face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;color:windowtext;font-weight:bold'>From:</span></font></b><font
size=2 color=black face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;
color:windowtext'> Dan Mueller [mailto:d.mueller@qut.edu.au] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, July 19, 2006
9:57 AM<br>
<b><span style='font-weight:bold'>To:</span></b> Julien Jomier; SCHMID, Jerome<br>
<b><span style='font-weight:bold'>Cc:</span></b> insight-users@itk.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Insight-users]
IsInside test TubeSpatialObject</span></font><font color=black><span
style='color:windowtext'><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 color=black face=Helvetica><span
style='font-size:12.0pt;font-family:Helvetica'>Hi Julien and Jerome,<br>
<br>
The test file attached to bug-3418 (<a
href="http://www.itk.org/Bug/bug.php?op=show&amp;bugid=3418&amp;pos=0">http://www.itk.org/Bug/bug.php?op=show&amp;bugid=3418&amp;pos=0</a>)
is an example of when lambda is negative for flat end-types. I have verified
this by putting a conditional std::cout statement in </span></font><font
face="Courier New"><span style='font-family:"Courier New"'>itkTubeSpatialObject::IsInside(.)
</span></font><font face=Helvetica><span style='font-family:Helvetica'>and ran
the itk::</span></font><font face="Courier New"><span style='font-family:"Courier New"'>SpatialObjectToImageFilter
</span></font><font face=Helvetica><span style='font-family:Helvetica'>with the
attached file. FYI this </span></font><font face="Courier New"><span
style='font-family:"Courier New"'>SpatialObject </span></font><font
face=Helvetica><span style='font-family:Helvetica'>should have the following
specifcations: </span></font><font face="Courier New"><span style='font-family:
"Courier New"'>size=[64, 64, 64]</span></font><font face=Helvetica><span
style='font-family:Helvetica'>, </span></font><font face="Courier New"><span
style='font-family:"Courier New"'>spacing=[1, 1, 1]</span></font><font
face=Helvetica><span style='font-family:Helvetica'>, and </span></font><font
face="Courier New"><span style='font-family:"Courier New"'>offset = [0, 0, 0]</span></font><font
face=Helvetica><span style='font-family:Helvetica'>.<br>
<br>
Having a quick look at the code, if the point being tested (ie. </span></font><font
face="Courier New"><span style='font-family:"Courier New"'>transformedPoint</span></font><font
face=Helvetica><span style='font-family:Helvetica'>) is ever less than </span></font><font
face="Courier New"><span style='font-family:"Courier New"'>a</span></font><font
face=Helvetica><span style='font-family:Helvetica'> (the first iterator) then </span></font><font
face="Courier New"><span style='font-family:"Courier New"'>A</span></font><font
face=Helvetica><span style='font-family:Helvetica'> will be negative, which in
turn means </span></font><font face="Courier New"><span style='font-family:
"Courier New"'>lambda</span></font><font face=Helvetica><span style='font-family:
Helvetica'> would be negative. Doesn't this occur for all points on the
&quot;left&quot; of the tube?<br>
<br>
Honestly, I haven't looked too much into the guts of </span></font><font
face="Courier New"><span style='font-family:"Courier New"'>itkTubeSpatialObject::IsInside(.)
</span></font><font face=Helvetica><span style='font-family:Helvetica'>(except
to report the original bug) - but the code works fine for me now. Jerome: if
your interest is in speeding up </span></font><font face="Courier New"><span
style='font-family:"Courier New"'>SpatialObject </span></font><font
face=Helvetica><span style='font-family:Helvetica'>to </span></font><font
face="Courier New"><span style='font-family:"Courier New"'>Image </span></font><font
face=Helvetica><span style='font-family:Helvetica'>conversion, I hope to submit
an article to the InsightJournal within the next few weeks with one such
proposal (not requiring any changes to existing code)...<br>
<br>
Hope this helps.<br>
<br>
Cheers<br>
<br>
Dan<br>
<br>
</span></font><br>
Julien Jomier wrote: <o:p></o:p></p>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'>Hi Jerome, <br>
<br>
I think you are right. The test for negative Lambda is incorrect for a flat
end-type. <br>
I've CC Dan Mueller who reported the bug for negative lambda. He might have
some suggestions on this topic. Dan, if you agree that if lambda is negative we
should skip the pair of points, I will commit a fix. <br>
<br>
Thanks for looking into this, <br>
<br>
Julien <br>
<br>
SCHMID, Jerome wrote: <br>
<br>
<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'>Hi All, <br>
<br>
&nbsp; <br>
<br>
I have a pb to understand the lambda condition being negative in the IsInside(
point ) of TubeSpatialObject. <br>
<br>
&nbsp; <br>
<br>
To me if lambda is negative, the current 2 consecutive points used for the test
are not relevant, we should skip them and look for the next pair. Lambda
negative means that the point is not inside the space within the two &laquo; normal
disc &raquo; of the two points, so why do some test ? <br>
<br>
I really cannot understand the test done on negative lambda. A bug on the bug
tracker dealing with negative lambda was corrected suggesting that this lambda
&lt;0 test was genuine&#8230;. <br>
<br>
&nbsp; <br>
<br>
Can somebody provide me a very simple figure where this test is relevant? An
mhd file with a point to test would be okay. <br>
<br>
&nbsp; <br>
<br>
Thanks ! <br>
<br>
&nbsp; <br>
<br>
/Best Regards,/ <br>
<br>
/ / <br>
<br>
/Jerome Schmid/ <br>
<br>
<br>
------------------------------------------------------------------------ <br>
<br>
_______________________________________________ <br>
Insight-users mailing list <br>
<a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a> <br>
<a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a>
<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>