[vtkusers] reset camera not working with QVTKWidget

Jothy jothybasu at gmail.com
Mon Jul 12 05:53:21 EDT 2010


First Render or MyQVTKWidget->Show() and then reset the camera.

Jothy

On Mon, Jul 12, 2010 at 1:42 AM, Prathamesh Kulkarni <
prathameshmkulkarni at gmail.com> wrote:

>
> Hello all,
>
>
> I am trying to use the QVTKWidget to display an image and reset its view at
> the click of a button. I tried many ways but it only resets the translation
> and does not affect rotation. Following is what I am using:
>
>
> MyQVTKWidget->GetRenderWindow()->GetRenderers()->GetFirstRenderer()->ResetCamera();
> MyQVTKWidget->repaint();
>
> OR
>
> MyRendererConnectedToMyQVTKWidget()->ResetCamera();
>
>
> Am I missing something here? Also, even when I  do
> MyvtkImageActorConnectedToMyRenderer()->setPickable(1);  I am still able to
> rotate the Image.
>
> I want to be able to turn off rotation of the vtkImageActor in some way and
> let it only scale and drag using the default mouse actions.
>
> Any help will be highly appreciated.
>
>
> Thanks,
> Prathamesh
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100712/b7830968/attachment.htm>


More information about the vtkusers mailing list