[Insight-developers] Two sets of changes to the ConditionalIterators

Miller, James V (Research) millerjv@crd.ge.com
Wed, 18 Sep 2002 09:41:48 -0400


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C25F19.2333238E
Content-Type: text/plain;
	charset="iso-8859-1"

Damion,
 
I was tracking down a series of bugs last night and noticed two things in the conditional iterators:

1.	The motivation for your restructuring the conditional iterators was that a user had sent in a
bug fix last week (?) that was already in one of the condition iterators but not the other.  With
your reshuffling of the code the code is now only in one spot but I am not sure the bug fix got into
the new version.  Can you check this?
2.	On May 25th, you (?) added an ability to set the "inclusion" strategy for the spatial
function iterators. The default behavior changed from "origin" to "center".  In "origin" mode, an
index is considered part of the function if the "lower bound" or "lower left corner" of the pixel is
in the function.  In "center" mode, an index is considered part of the function if the "center" of
the pixel is in the function. The BinaryBallStructuringElement uses the
InteriorExteriorEllipsoidSpatialFunction and a conditional iterator to convert a spatial function
into a Neighborhood. For my test case, the ellipsoid had radii (1, 4).  When the inclusion strategy
is set to "origin", I get a nice ellipsoid whose major axes are of length 3 and 9.  This is what I
expected. When the inclusion strategy is set to "center", I get an ellipsoid (actually a block) whose
width and length are 2 and 8.  What is particularly curious is that the "left" and "top" portions of
the ellipsoid are missing.  The origin in my example is in the upper left corner.  I would have
expected (at worst) the "center" strategy, would have picked up additional points on the left and top
of the ellipsoid and dropped points on the right and bottom.  However, the opposite occurred. 

 
Ellipsoid converted using "origin" inclusion strategy
 
  0  0  1  0  0  
  0  1  1  1  0  
  0  1  1  1  0   
  0  1  1  1  0    
  0  1  1  1  0    
  0  1  1  1  0    
  0  1  1  1  0    
  0  1  1  1  0    
  0  0  1  0  0 
 
 
Ellipsoid converted using "center" inclusion strategy
 
  0  0  0  0  0  
  0  0  1  1  0    
  0  0  1  1  0    
  0  0  1  1  0    
  0  0  1  1  0    
  0  0  1  1  0    
  0  0  1  1  0    
  0  0  1  1  0   
  0  0  1  1  0    
   
  


 <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Jim Miller 
_____________________________________
Visualization & Computer Vision
GE Research
Bldg. KW, Room C218B
P.O. Box 8, Schenectady NY 12301

millerjv@research.ge.com <mailto:millerjv@research.ge.com> 

james.miller@research.ge.com
(518) 387-4005, Dial Comm: 8*833-4005, 
Cell: (518) 505-7065, Fax: (518) 387-6981 

 

 

------_=_NextPart_001_01C25F19.2333238E
Content-Type: text/html;
	charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 6.00.2715.400" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=271550313-18092002><FONT size=2>Damion,</FONT></SPAN></DIV>
<DIV><SPAN class=271550313-18092002><FONT size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=271550313-18092002><FONT size=2>I was tracking down a series of 
bugs last night and noticed two things in the conditional 
iterators:</FONT></SPAN></DIV>
<OL>
  <LI><SPAN class=271550313-18092002><FONT size=2>The motivation for your 
  restructuring the conditional iterators was that a user had sent in a bug fix 
  last week (?) that was already in one of the condition iterators but not the 
  other.&nbsp; With your reshuffling of the code the code is now only in one 
  spot but I am not sure the bug fix got into the new version.&nbsp; Can you 
  check this?</FONT></SPAN></LI>
  <LI><SPAN class=271550313-18092002><FONT size=2>On May 25th, you (?) added an 
  ability to set the "inclusion" strategy for the spatial function iterators. 
  The default behavior changed from "origin" to "center".&nbsp; In "origin" 
  mode, an index is considered part of the function if the "lower bound" or 
  "lower left corner" of the pixel is in the function.&nbsp; In "center" mode, 
  an index is considered part of the function if the "center" of the pixel is in 
  the function. The BinaryBallStructuringElement uses the 
  InteriorExteriorEllipsoidSpatialFunction and a conditional iterator to convert 
  a spatial function into a Neighborhood. For my test case, the ellipsoid had 
  radii (1, 4).&nbsp; When the inclusion strategy is set to "origin", I get a 
  nice ellipsoid whose major axes are of length 3 and 9.&nbsp; This is what I 
  expected. When the inclusion strategy is set to "center", I get an ellipsoid 
  (actually a block) whose width and length are 2 and 8.&nbsp; What is 
  particularly curious is that the "left" and "top" portions of the ellipsoid 
  are missing.&nbsp; The origin in my example is in the upper left corner.&nbsp; 
  I would have expected (at worst) the "center" strategy, would have picked up 
  additional points on the left and top of the ellipsoid and dropped points on 
  the right and bottom.&nbsp; However, the opposite occurred. 
</FONT></SPAN></LI></OL>
<DIV><SPAN class=271550313-18092002></SPAN>&nbsp;</DIV>
<DIV><SPAN class=271550313-18092002></SPAN><SPAN class=271550313-18092002><FONT 
size=2>Ellipsoid converted using "origin" inclusion strategy</FONT></SPAN></DIV>
<DIV><SPAN class=271550313-18092002><FONT size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=271550313-18092002>&nbsp; 0&nbsp; 0&nbsp; 1&nbsp; 0&nbsp; 
0&nbsp;&nbsp;<BR>&nbsp; 0&nbsp; 1&nbsp; 1&nbsp; 1&nbsp; 
0&nbsp;&nbsp;</SPAN></DIV>
<DIV><SPAN class=271550313-18092002>&nbsp; 0&nbsp; 1&nbsp; 1&nbsp; 1&nbsp; 
0&nbsp;&nbsp;&nbsp;<BR>&nbsp; 0&nbsp; 1&nbsp; 1&nbsp; 1&nbsp; 
0&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp; 0&nbsp; 1&nbsp; 1&nbsp; 1&nbsp; 
0&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp; 0&nbsp; 1&nbsp; 1&nbsp; 1&nbsp; 
0&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp; 0&nbsp; 1&nbsp; 1&nbsp; 1&nbsp; 
0&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp; 0&nbsp; 1&nbsp; 1&nbsp; 1&nbsp; 
0&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp; 0&nbsp; 0&nbsp; 1&nbsp; 0&nbsp; 
0&nbsp;</SPAN></DIV>
<DIV><SPAN class=271550313-18092002><FONT size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=271550313-18092002><FONT size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=271550313-18092002><FONT size=2>Ellipsoid converted using 
"center" inclusion strategy</FONT></SPAN></DIV>
<DIV><SPAN class=271550313-18092002><FONT size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=271550313-18092002>&nbsp; 0&nbsp; 0&nbsp; 0&nbsp; 0&nbsp; 
0&nbsp;&nbsp;</SPAN></DIV>
<DIV><SPAN class=271550313-18092002>&nbsp; 0&nbsp; 0&nbsp; 1&nbsp; 1&nbsp; 
0&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp; 0&nbsp; 0&nbsp; 1&nbsp; 1&nbsp; 
0&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp; 0&nbsp; 0&nbsp; 1&nbsp; 1&nbsp; 
0&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp; 0&nbsp; 0&nbsp; 1&nbsp; 1&nbsp; 
0&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp; 0&nbsp; 0&nbsp; 1&nbsp; 1&nbsp; 
0&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp; 0&nbsp; 0&nbsp; 1&nbsp; 1&nbsp; 
0&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp; 0&nbsp; 0&nbsp; 1&nbsp; 1&nbsp; 
0&nbsp;&nbsp;&nbsp;<BR>&nbsp; 0&nbsp; 0&nbsp; 1&nbsp; 1&nbsp; 
0&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp; <BR></DIV></SPAN>
<P class=MsoNormal>&nbsp;<?xml:namespace prefix = o ns = 
"urn:schemas-microsoft-com:office:office" /><o:p></o:p></P>
<P class=Section1 style="MARGIN: 0in 0in 0pt"><B><SPAN 
style="COLOR: navy; FONT-FAMILY: 'Comic Sans MS'">Jim Miller</SPAN></B> 
<BR><B><I><SPAN 
style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: Arial">_____________________________________</SPAN></I></B><BR><EM><SPAN 
style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Arial">Visualization &amp; 
Computer Vision</SPAN></EM><I><SPAN 
style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Arial"><BR><EM>GE 
Research</EM><BR><EM>Bldg. KW, Room C218B</EM><BR><EM>P.O. Box 8, Schenectady NY 
12301</EM><BR><BR></SPAN></I><EM><U><SPAN 
style="FONT-SIZE: 7.5pt; COLOR: blue"><A 
href="mailto:millerjv@research.ge.com">millerjv@research.ge.com</A></SPAN></U></EM></P>
<P class=Section1 style="MARGIN: 0in 0in 0pt"><EM><U><SPAN 
style="FONT-SIZE: 7.5pt; COLOR: blue">james.miller@research.ge.com</SPAN></U></EM><BR><I><SPAN 
style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Arial">(518) 387-4005, Dial 
Comm: 8*833-4005, </SPAN></I><BR><I><SPAN 
style="FONT-SIZE: 7.5pt; COLOR: black; FONT-FAMILY: Arial">Cell: (518) 505-7065, 
Fax: (518) 387-6981</SPAN></I> </P>
<P class=MsoNormal>&nbsp;<o:p></o:p></P>
<DIV>&nbsp;</DIV></BODY></HTML>

------_=_NextPart_001_01C25F19.2333238E--