[vtkusers] Moving 2D image in 3D space
David.Pont at ForestResearch.co.nz
David.Pont at ForestResearch.co.nz
Sun Feb 16 16:29:51 EST 2003
Hi Raphael,
I have used the plane + texture technique successfully to allow images
to be placed and moved in 3D.
I had vtkTIFFReader and used GetDataExtent to get the image dimensions.
Input the image to a vtkTexture. Use vtkPlaneSource to create a plane and
SetPoint0, 1 and 2 to size the plane to the image dimensions.
vtkTransformPolyDataFilter and vtkTransform to apply scaling and
positioning to the plane, then to a mapper and actor. On the actor use
SetTexture to apply the image to the plane. By modifying (and updating)
vtkTransform I was able to allow the user to move the image with the mouse.
I did have some problems with the image (texture) not displayng (on Windows
2000) which required me to disable most hardware acceleration on the
graphics card :-( but otherwise it worked very well.
hope this helps,
Dave Pont
|--------+--------------------------------->
| | Raphael Sebbe |
| | <raphael.sebbe at tcts.fpm|
| | s.ac.be> |
| | Sent by: |
| | vtkusers-admin at public.k|
| | itware.com |
| | |
| | |
| | 14/02/2003 20:54 |
| | |
|--------+--------------------------------->
>------------------------------------------------------------------------------------------------------------|
| |
| To: vtkusers at public.kitware.com |
| cc: |
| Subject: [vtkusers] Moving 2D image in 3D space |
>------------------------------------------------------------------------------------------------------------|
Hi all,
I am currently using vtkImageActor to render images in 3D space. Now
I'd like to move and rotate that image around. As vtkImageActor does
not derive from vtkProp3D, it is not straightforward... What's the
easiest route from here ? Using plane source/texture ?
Thanks !
Raphael Sebbe
========================================
Raphael Sebbe, Ir
Research in Image Processing and Analysis
TCTS - Faculté Polytechnique de Mons
========================================
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: <
http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list