[vtkusers] Annotating an image with text

David Doria daviddoria+vtk at gmail.com
Wed Dec 9 14:33:12 EST 2009


On Wed, Dec 9, 2009 at 2:29 PM, Jérôme <jerome.velut at gmail.com> wrote:
> You can use SetPosition in vtkTextActor to place a string everywhere in the
> image. For file writing, why not using vtkWindowToImageFilter?
>
> BTW, I sent a mail mentioning a segfault caused by vtkTextActor
> ("vtkTextActor segfaults my render window"). Did you try to use it? Am I the
> only one?
>
> Jerome

Jerome,

If there is not already a window then it is quite a process to add
renders, etc, etc. It seems like there should just be a way to insert
a string directly into image pixels as vtkImageCanvasSource2D does for
geometric objects.

To answer your question - this works fine for me:
http://www.cmake.org/Wiki/Display_text

Thanks,

David



More information about the vtkusers mailing list