[vtkusers] changing the position of an actor

David Gobbi dgobbi at imaging.robarts.ca
Wed Oct 30 12:06:16 EST 2002


Hi Steffen,

If you want to draw actors in the same scene as an image, it
is crucial that you establish a coordinate system for the image.
The image coordinate system is defined by the Origin and Spacing
information that is attached to the image.

When you use vtkImageChangeInformation to center the volume, you
are modifying the 'Origin' of the image so that the origin of
the coordinate system is at the center of the volume.  If,
after centering the volume, you apply a transformation via
vtkImageReslice, just set the inverse of the ResliceTransform
as the UserTransform of the Actors.

 - David

-- 
  David Gobbi, MSc                dgobbi at imaging.robarts.ca
  Advanced Imaging Research Group
  Robarts Research Institute, University of Western Ontario

On Wed, 30 Oct 2002, Steffen Oeltze wrote:

> Dear VTK-users,
>
> I'm using the vtkImageReslice-class to apply rotation and reflection to a
> volume. Before it, I use vtkImageChangeInformation to center the volume.
> I would like to place additional actors in the scene, in particular at
> certain
> points within the volume. However, because of my transformations the
> actors do not appear where they are supposed to. How can let my actors
> know which transformations have been applied and change their position
> and other values according to that ?
>
> Steffen
>
> _______________________________________________
> 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