<!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> </DIV>
<DIV><FONT face=Arial size=2>What do I do wrong ?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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> </DIV>
<DIV><FONT face=Arial size=2> vtkImageData *fond =
vtkImageData::New();<BR> fond->SetDimensions(2048,2048,1);</FONT></DIV>
<DIV><FONT face=Arial
size=2> fond->SetImageData(jpgReader->GetOutput());<BR> fond->SetScalarTypeToUnsignedChar();<BR> fond->SetNumberOfScalarComponents(3);<BR> fond->SetExtent(jpgReader->GetOutput()->GetExtent());</FONT></DIV><FONT
face=Arial size=2>
<DIV><BR> vtkImageCanvasSource2D *vicsSIG =
vtkImageCanvasSource2D::New();<BR> vicsSIG->SetScalarTypeToUnsignedChar();<BR> vicsSIG->SetNumberOfScalarComponents(3);<BR> vicsSIG->SetExtent(fond->GetExtent());<BR> vicsSIG->SetDrawColor(0.0,0.0,0.0);<BR> vicsSIG->FillBox(0,texSize[0],0,texSize[1]);<BR> vicsSIG->SetDrawColor(255.0,0.0,0.0);<BR> vicsSIG->FillBox(100,500,100,500);<BR> <BR> vicsSIG->SetDrawColor(255.0,255.0,0,0);<BR> vicsSIG->DrawSegment(0,0,1024,1024);</DIV>
<DIV> vicsSIG->Update();<BR></DIV>
<DIV> vtkJPEGWriter
*jpgWriter2=vtkJPEGWriter::New();<BR> jpgWriter2->SetInput(vicsSIG->GetOutput());<BR> jpgWriter2->SetFileName("sortie2048.jpg");<BR> jpgWriter2->SetQuality(95);<BR> jpgWriter2->ProgressiveOn();<BR> tPrint("\toutputing
texture : sorti2048.jpg\n");</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>/*==============================================*/</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Sebastien MARAUX</FONT></DIV></BODY></HTML>