[vtkusers] Re : Displaying points on a 2D image
Malsoaz James
jmalsoaz at yahoo.fr
Fri Jul 23 07:31:17 EDT 2010
Hi,
I have been facing similar problems few weeks ago.
A solution has been to create a vtkImageData for each set of points I had (in my case, it was contours). Then, I have used a vtkTexture to paste the vtkImageData on the image (which was also a texture).
To my mind, this isn't ideal at all, but I didn't find any other solutions and I'm still looking for something else.
I hope someone could help us with this issue.
Best
James
--- En date de : Mer 21.7.10, Trystan Louboutin <tanstry at gmail.com> a écrit :
De: Trystan Louboutin <tanstry at gmail.com>
Objet: [vtkusers] Displaying points on a 2D image
À: vtkusers at vtk.org
Date: Mercredi 21 juillet 2010, 17h13
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 :
vtkPoints : defines the points
vtkCellArray : to link points
vtkPolyData : setPoints( theVtkPoints ) - setVerts( theCellArray )
vtkActor2D
vtkPolyData2DMapperAdd 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
-----La pièce jointe associée suit-----
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100723/8d9a724c/attachment.htm>
More information about the vtkusers
mailing list