[vtkusers] Help Using vtkPolygonalHandleRepresentation3D for Transform application

Karthik Krishnan karthik.krishnan at kitware.com
Thu Mar 11 23:55:04 EST 2010


This is an issue that remains to be dealt with. Although the
widget-representations derive from vtkProp and hence support the use
of UserTransform's, the interactors that drive the these
transformations into account. This leads to a mismatch between the
positions that the interactor believes the widget is placed at and the
actual position/orientation of is geometry.

This is not an easy issue. Most widgets can get transformed into an
invalid state by giving users the flexbility of transforming them with
UserTransform's. This includes image plane widgets, contour widgets
etc.. It also does not play very nicely with the point placer
framework that is designed to restrict the widget placement to certain
locations / regions etc.

What I would recommend is that you create a customized
widget-representation pair for your needs. The handle widget as
designed now is not meant to handle UserTransforms.

Thanks
--
karthik

On Thu, Mar 11, 2010 at 11:17 PM, Anant Vemuri <ajar108 at gmail.com> wrote:
> Hi,
> I am using vtkPolygonalHandleRepresentation3D to control position of a model
> I created. I am trying to apply a transformation matrix to it to make it
> move in a predefined way. For doing this I have a bunch of vtkTransforms.
> At first, (before using vtkPolygonalHandleRepresentation3D) I applied the
> transform through the Actor using myActor->SetUserTransform( myvtkTransform
> )
> But since I also wanted to create an interaction with the object, I put it
> inside a vtkPolygonalHandleRepresentation3D by deriving a class called
> myObjectRepresentation from vtkPolygonalHandleRepresentation3D. But now I am
> no longer able to apply the transform to the object properly.
> Since vtkPolygonalHandleRepresentation3D has a member variable called Actor,
> I created a function
> void myObjectRepresentation::SetTransform( vtkTransform *_trf )
> {
> this->Actor->SetUserTransform( _trf );
> }
> This does the trick, but after I apply the trasnform I am not able to
> interact with the object properly. It moves in some random direction when I
> try to move it.
> Can someone help me out. I can provide more details on request.
> Thank you.
>
> _______________________________________________
> 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
>
>



More information about the vtkusers mailing list