[vtkusers] Annotating an image with text

David Doria daviddoria+vtk at gmail.com
Wed Dec 9 15:15:29 EST 2009


On Wed, Dec 9, 2009 at 2:56 PM, Jérôme <jerome.velut at gmail.com> wrote:
> 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.
>
> HTH
>
> Jerome

Hmm this seems to get stuck in a loop somewhere? Can you see anything wrong?
http://www.cmake.org/Wiki/VTK_Examples_Image_Text

Also, how would you set the position (say, of the bottom left corner)
of the text in image coordinates? It doesn't look like vtkTextSource
provides a positioning function - would you have to manually setup a
vtkTransform?

Thanks,

David



More information about the vtkusers mailing list