<!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->SetPosition(10,10);
<BR>text->SetInput("Hello World!");<BR><BR>vtkTextProperty *textProp =
text->GetTextProperty();<BR>textProp->SetFontSize(12);<BR>textProp->SetJustificationToLeft();<BR>textProp->BoldOn();<BR>textProp->SetColor(0,0,0);<BR><BR>renderer->AddActor2D(text);<BR><BR>...<BR><BR>renderWindow->AddRenderer(renderer);<BR>renderWindow->Render();<BR><BR>vtkWindowToImageFilter
*windowToImage =
vtkWindowToImageFilter::New();<BR><BR>windowToImage->SetInput(renderWindow);<BR>windowToImage->Update();<BR><BR>vtkImageData
*resultImage = windowToImage->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>