[vtkusers] How to place an image in given position and orientation?

David.Pont at ensisjv.com David.Pont at ensisjv.com
Sun Jul 23 16:59:20 EDT 2006


"abhishek gattani" <abhishekg4u at gmail.com> wrote on 21/07/2006 17:45:16:

> Hi All,
>
> I am trying to place a 2D color image at a given position and
> orientation in 3D space. Can vtk be used for doing that? I have looked
> in vtkImagePlaneWidget which only allows the orientation to be any of
> the x,y,z axis. I also looking into vtkImageActor which also does not
> provide the ability to place an image at a desired position and
> orientation. I cant use Image reslice because my 2D Images are not
> extracted from a volume but got from a camera. But a strong feeling
> tells me that vtk should be able to do so. Please guide me. Thanks,
>
> Best, Abhishek
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.
> org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers


You can load the image into a vtkTexture, create a vtkPlaneSource with
height and width sized according to image dimensions, pass the plane
through vtkTransformPolyDataFilter then a mapper and actor. Apply the
texture to the plane with actor->SetTexture. Use the transform to position
and orient the plane as desired in 3D.

There should be an example or 2 in vtk, try the examples related to
vtkPlaneSource perhaps?

  regards
     Dave P
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060724/1852b74b/attachment.htm>


More information about the vtkusers mailing list