<!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 size=2>
<DIV>Hello everyone,</DIV>
<DIV>&nbsp;</DIV>
<DIV>does anyone know a possibility to generate a vtkImageData-Object containing 
graphical data and text in a dynamic way?</DIV>
<DIV>&nbsp;</DIV>
<DIV>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.</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>// 
**********************************************************************<BR>Example:</DIV>
<DIV>&nbsp;</DIV>
<DIV>vtkRenderWindow *renderWindow = vtkRenderWindow::New();<BR>vtkRenderer 
*renderer = vtkRenderer::New();<BR>...</DIV>
<DIV>&nbsp;</DIV>
<DIV>vtkTextActor *text = vtkTextActor::New();<BR>text-&gt;SetPosition(10,10); 
<BR>text-&gt;SetInput("Hello World!");</DIV>
<DIV>&nbsp;</DIV>
<DIV>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);</DIV>
<DIV>&nbsp;</DIV>
<DIV>renderer-&gt;AddActor2D(text);</DIV>
<DIV>&nbsp;</DIV>
<DIV>...</DIV>
<DIV>&nbsp;</DIV>
<DIV>renderWindow-&gt;AddRenderer(renderer);<BR>renderWindow-&gt;Render();</DIV>
<DIV><BR>vtkWindowToImageFilter *windowToImage = 
vtkWindowToImageFilter::New();</DIV>
<DIV>&nbsp;</DIV>
<DIV>windowToImage-&gt;SetInput(renderWindow);<BR>windowToImage-&gt;Update();</DIV>
<DIV>&nbsp;</DIV>
<DIV>vtkImageData *resultImage = windowToImage-&gt;GetOutput();</DIV>
<DIV>&nbsp;</DIV>
<DIV>// 
**********************************************************************</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>&nbsp;<BR>But I guess there must be a better way to generate the 
vtkImageData-object without using any kind of rendering.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thank you in advance,<BR>Andreas</DIV></FONT></DIV></BODY></HTML>