[vtkusers] Repositioning Image within Render Window

David Gobbi david.gobbi at gmail.com
Wed Oct 20 21:12:47 EDT 2010


On Wed, Oct 20, 2010 at 5:14 PM, Alexis Cheng <acheng_1221 at hotmail.com> wrote:
> Hi,
>
> Thanks for all the suggestions.
>
> I am using vtkActor because it allows me to map an image onto a polygon of a
> specified shape. Is there a similar functionality available to
> vtkImageActor?

I forgot to answer this one.  It isn't possible to set your own
polygon for ImageActor.  So your best bet is to use the
vtkTextureMapToPlane filter to add the correct texture coords to your
polygons.  With vtkTextureMapToPlane, you set its Origin, Point1, and
Point2 to define the "quad" that corresponds to the entire image, i.e.
it will be a rectangle that is larger than your polydata.  Because of
the way that texture coords are defined, the "quad" that you define
for vtkTextureMapToPlane must be exactly one half-pixel larger on
every side than the bounds of the image.

  David



More information about the vtkusers mailing list