<!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.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I would like to draw lines, etc. on a (jpeg read) 
image data.</FONT></DIV>
<DIV><FONT face=Arial size=2>I use a vtkimageCanvasSource2D to gain access to 
the </FONT></DIV>
<DIV><FONT face=Arial size=2>image data , but when I read the re exported image 
as a </FONT></DIV>
<DIV><FONT face=Arial size=2>jpeg </FONT><FONT face=Arial size=2>file, I can 
only see white drawings.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>What do I do wrong ?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>snippet : </FONT></DIV>
<DIV><FONT face=Arial 
size=2>/*==============================================*/</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;vtkImageData *fond = 
vtkImageData::New();<BR>&nbsp;fond-&gt;SetDimensions(2048,2048,1);</FONT></DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;fond-&gt;SetImageData(jpgReader-&gt;GetOutput());<BR>&nbsp;fond-&gt;SetScalarTypeToUnsignedChar();<BR>&nbsp;fond-&gt;SetNumberOfScalarComponents(3);<BR>&nbsp;fond-&gt;SetExtent(jpgReader-&gt;GetOutput()-&gt;GetExtent());</FONT></DIV><FONT 
face=Arial size=2>
<DIV><BR>&nbsp;vtkImageCanvasSource2D *vicsSIG = 
vtkImageCanvasSource2D::New();<BR>&nbsp;vicsSIG-&gt;SetScalarTypeToUnsignedChar();<BR>&nbsp;vicsSIG-&gt;SetNumberOfScalarComponents(3);<BR>&nbsp;vicsSIG-&gt;SetExtent(fond-&gt;GetExtent());<BR>&nbsp;vicsSIG-&gt;SetDrawColor(0.0,0.0,0.0);<BR>&nbsp;vicsSIG-&gt;FillBox(0,texSize[0],0,texSize[1]);<BR>&nbsp;vicsSIG-&gt;SetDrawColor(255.0,0.0,0.0);<BR>&nbsp;vicsSIG-&gt;FillBox(100,500,100,500);<BR>&nbsp;<BR>&nbsp;vicsSIG-&gt;SetDrawColor(255.0,255.0,0,0);<BR>&nbsp;vicsSIG-&gt;DrawSegment(0,0,1024,1024);</DIV>
<DIV>&nbsp;vicsSIG-&gt;Update();<BR></DIV>
<DIV>&nbsp;vtkJPEGWriter 
*jpgWriter2=vtkJPEGWriter::New();<BR>&nbsp;jpgWriter2-&gt;SetInput(vicsSIG-&gt;GetOutput());<BR>&nbsp;jpgWriter2-&gt;SetFileName("sortie2048.jpg");<BR>&nbsp;jpgWriter2-&gt;SetQuality(95);<BR>&nbsp;jpgWriter2-&gt;ProgressiveOn();<BR>&nbsp;tPrint("\toutputing 
texture : sorti2048.jpg\n");</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>/*==============================================*/</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Sebastien MARAUX</FONT></DIV></BODY></HTML>