<!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.2900.3059" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial>Hello everyone,<BR><BR>does anyone know a possibility to 
generate a vtkImageData-Object containing graphical data and text in a dynamic 
way?<BR><BR>It is possible to solve this problem by adding the graphical data 
and the text to an actor and using the<BR>vtkWindowToImageFilter to generate a 
vtkImageData-object from the vtkRenderWindow-object.<BR><BR><BR>// 
**********************************************************************<BR>Example:<BR><BR>vtkRenderWindow 
*renderWindow = vtkRenderWindow::New();<BR>vtkRenderer *renderer = 
vtkRenderer::New();<BR>...<BR><BR>vtkTextActor *text = 
vtkTextActor::New();<BR>text-&gt;SetPosition(10,10); 
<BR>text-&gt;SetInput("Hello World!");<BR><BR>vtkTextProperty *textProp = 
text-&gt;GetTextProperty();<BR>textProp-&gt;SetFontSize(12);<BR>textProp-&gt;SetJustificationToLeft();<BR>textProp-&gt;BoldOn();<BR>textProp-&gt;SetColor(0,0,0);<BR><BR>renderer-&gt;AddActor2D(text);<BR><BR>...<BR><BR>renderWindow-&gt;AddRenderer(renderer);<BR>renderWindow-&gt;Render();<BR><BR>vtkWindowToImageFilter 
*windowToImage = 
vtkWindowToImageFilter::New();<BR><BR>windowToImage-&gt;SetInput(renderWindow);<BR>windowToImage-&gt;Update();<BR><BR>vtkImageData 
*resultImage = windowToImage-&gt;GetOutput();<BR><BR>// 
**********************************************************************<BR><BR><BR> 
<BR>But I guess there must be a better way to generate the vtkImageData-object 
without using any kind of rendering.<BR><BR><BR>Thank you in 
advance,<BR>Andreas<BR></FONT></DIV></BODY></HTML>