[vtkusers] Displaying points on a 2D image

Trystan Louboutin tanstry at gmail.com
Wed Jul 21 13:13:12 EDT 2010


Hi vtk users,

I want to display some points over a 2D-image, it displays fine but the
problem is that the points and image are not linked together.
In fact, I want the points to be associated with the image so that zoom
in/out will affect the image either the points, which is not the case
actually.

The image is obtained by re-slicing a vtkData volume as vtkImageData and
displayed in a QVTKWidget.

For displaying the points, I use :

   1. vtkPoints : defines the points
   2. vtkCellArray : to link points
   3. vtkPolyData : setPoints( theVtkPoints ) - setVerts( theCellArray )
   4. vtkActor2D
   5. vtkPolyData2DMapper
   6. Add the actor to the renderer (same as image)

The points (ie, representing a contour) are visible over the image but not
superposing it correctly (coordinates are mismatching).

I would like to know how to display some points (displayed in different
colors) on a vtkImageActor ?
Is the vtkImageActorPointPlacer suitable for this kind of thing ? I can't
find any satisfactory example on how using it in such a case...

Thanks in advance for any help,

Regards,
Trystan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100721/8ac6acc0/attachment.htm>


More information about the vtkusers mailing list