[Insight-developers] Regression tests crashing the IO factories

Miller, James V (Research) millerjv@crd.ge.com
Mon, 24 Mar 2003 11:45:30 -0500


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_01C2F224.C7C90660
Content-Type: text/plain;
	charset="iso-8859-1"

Here is an interesting bug.  I'll put in a fix after lunch.
 
The regression test framework will write out 3 images if a test failed: the
image generated by the test, the baseline image, and a difference image.
These images are always written out as PNG so that they show up on the web
page.
 
We construct these images by taking the baseline image name and adding
".diff.png", ".base.png", and ".test.png" to the baseline image name.  So if
the baseline image is 
 
foo.png
 
the baseline image is written out as
 
foo.png.base.png
 
No problems yet. Now suppose the baseline is
 
foo.mhd
 
the baseline image written out will be
 
foo.mhd.base.png
 
Now what IO object should say it can write the file?  As our current IO
objects are written, both the Meta and PNG writers say they can produce this
image because their particular "extensions" are in the filename.
 
I'll put in some code to make sure the extension is actually the "LAST"
extension in the filename.
 
 

 <?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_01C2F224.C7C90660
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=397093916-24032003><FONT size=2>Here is an interesting 
bug.&nbsp; I'll put in a fix after lunch.</FONT></SPAN></DIV>
<DIV><SPAN class=397093916-24032003><FONT size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=397093916-24032003><FONT size=2>The regression test framework 
will write out 3 images if a test failed: the image generated by the test, the 
baseline image, and a difference image.&nbsp; These images are always written 
out as PNG so that they show up on the web page.</FONT></SPAN></DIV>
<DIV><SPAN class=397093916-24032003><FONT size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=397093916-24032003><FONT size=2>We construct these images by 
taking the baseline image name and adding ".diff.png", ".base.png", and 
".test.png" to the baseline image name.&nbsp; So if the baseline image is 
</FONT></SPAN></DIV>
<DIV><SPAN class=397093916-24032003><FONT size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=397093916-24032003><FONT size=2>foo.png</FONT></SPAN></DIV>
<DIV><SPAN class=397093916-24032003><FONT size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=397093916-24032003><FONT size=2>the baseline image is written 
out as</FONT></SPAN></DIV>
<DIV><SPAN class=397093916-24032003><FONT size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=397093916-24032003><FONT 
size=2>foo.png.base.png</FONT></SPAN></DIV>
<DIV><SPAN class=397093916-24032003><FONT size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=397093916-24032003><FONT size=2>No problems yet. Now suppose 
the baseline is</FONT></SPAN></DIV>
<DIV><SPAN class=397093916-24032003><FONT size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=397093916-24032003><FONT size=2>foo.mhd</FONT></SPAN></DIV>
<DIV><SPAN class=397093916-24032003><FONT size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=397093916-24032003><FONT size=2>the baseline image written out 
will be</FONT></SPAN></DIV>
<DIV><SPAN class=397093916-24032003><FONT size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=397093916-24032003><FONT 
size=2>foo.mhd.base.png</FONT></SPAN></DIV>
<DIV><SPAN class=397093916-24032003><FONT size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=397093916-24032003><FONT size=2>Now what IO object should say 
it can write the file?&nbsp; As our current IO objects are written, both the 
Meta and PNG writers say they can produce this image because their particular 
"extensions" are in the filename.</FONT></SPAN></DIV>
<DIV><SPAN class=397093916-24032003><FONT size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=397093916-24032003><FONT size=2>I'll put in some code to make 
sure the extension is actually the "LAST" extension in the 
filename.</FONT></SPAN></DIV>
<DIV><SPAN class=397093916-24032003><FONT size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=397093916-24032003></SPAN>&nbsp;</DIV>
<DIV class=Section1>
<P class=MsoNormal>&nbsp;<?xml:namespace prefix = o ns = 
"urn:schemas-microsoft-com:office:office" /><o:p></o:p></P>
<P 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 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>
<DIV>&nbsp;</DIV></BODY></HTML>

------_=_NextPart_001_01C2F224.C7C90660--