You are right. Writing a rendering process for annotating an image makes no sense. The vtkTextActor is not the solution. However, the vtkTextSource produces a vtkPolyData. I think that you can use this polydata through a vtkPolyDataToImageStencil in order to mask the image according to the text.<br>
<br>HTH<br><br>Jerome<br><br><div class="gmail_quote">2009/12/9 David Doria <span dir="ltr">&lt;<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Wed, Dec 9, 2009 at 2:29 PM, Jérôme &lt;<a href="mailto:jerome.velut@gmail.com">jerome.velut@gmail.com</a>&gt; wrote:<br>
&gt; You can use SetPosition in vtkTextActor to place a string everywhere in the<br>
&gt; image. For file writing, why not using vtkWindowToImageFilter?<br>
&gt;<br>
&gt; BTW, I sent a mail mentioning a segfault caused by vtkTextActor<br>
&gt; (&quot;vtkTextActor segfaults my render window&quot;). Did you try to use it? Am I the<br>
&gt; only one?<br>
&gt;<br>
&gt; Jerome<br>
<br>
</div>Jerome,<br>
<br>
If there is not already a window then it is quite a process to add<br>
renders, etc, etc. It seems like there should just be a way to insert<br>
a string directly into image pixels as vtkImageCanvasSource2D does for<br>
geometric objects.<br>
<br>
To answer your question - this works fine for me:<br>
<a href="http://www.cmake.org/Wiki/Display_text" target="_blank">http://www.cmake.org/Wiki/Display_text</a><br>
<div><div></div><div class="h5"><br>
Thanks,<br>
<br>
David<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br>