<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=windows-1252"
 http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Helvetica, Arial, sans-serif">Hi Julien and Jerome,<br>
<br>
The test file attached to bug-3418
(<a class="moz-txt-link-freetext" href="http://www.itk.org/Bug/bug.php?op=show&bugid=3418&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 <font
 face="Courier New, Courier, monospace">itkTubeSpatialObject::IsInside(.)
</font>and ran the itk::<font face="Courier New, Courier, monospace">SpatialObjectToImageFilter
</font>with the attached file. FYI this <font
 face="Courier New, Courier, monospace">SpatialObject </font>should
have the following specifcations: <font
 face="Courier New, Courier, monospace">size=[64, 64, 64]</font>, <font
 face="Courier New, Courier, monospace">spacing=[1, 1, 1]</font>, and <font
 face="Courier New, Courier, monospace">offset = [0, 0, 0]</font>.<br>
<br>
Having a quick look at the code, if the point being tested (ie. <font
 face="Courier New, Courier, monospace">transformedPoint</font>) is
ever less than <font face="Courier New, Courier, monospace">a</font>
(the first iterator) then <font face="Courier New, Courier, monospace">A</font>
will be negative, which in turn means <font
 face="Courier New, Courier, monospace">lambda</font> would be
negative. Doesn't this occur for all points on the "left" of the tube?<br>
<br>
Honestly, I haven't looked too much into the guts of </font><font
 face="Helvetica, Arial, sans-serif"><font
 face="Courier New, Courier, monospace">itkTubeSpatialObject::IsInside(.)
</font></font><font face="Helvetica, Arial, sans-serif">(except to
report the original bug) - but the code works fine for me now. Jerome:
if your interest is in speeding up <font
 face="Courier New, Courier, monospace">SpatialObject </font>to <font
 face="Courier New, Courier, monospace">Image </font>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>
</font><br>
Julien Jomier wrote:
<blockquote cite="mid44BCA57B.1060905@kitware.com" type="cite">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>
  <blockquote type="cite">Hi All,
    <br>
    <br>
 
    <br>
    <br>
I have a pb to understand the lambda condition being negative in the
IsInside( point ) of TubeSpatialObject.
    <br>
    <br>
 
    <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 « normal disc » 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….
    <br>
    <br>
 
    <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>
 
    <br>
    <br>
Thanks !
    <br>
    <br>
 
    <br>
    <br>
/Best Regards,/
    <br>
    <br>
/ /
    <br>
    <br>
/Jerome Schmid/
    <br>
    <br>
    <br>
------------------------------------------------------------------------
    <br>
    <br>
_______________________________________________
    <br>
Insight-users mailing list
    <br>
<a class="moz-txt-link-abbreviated" href="mailto:Insight-users@itk.org">Insight-users@itk.org</a>
    <br>
<a class="moz-txt-link-freetext" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a>
    <br>
  </blockquote>
  <br>
</blockquote>
</body>
</html>