[vtkusers] QVTKWidget and Layers

Anka Kochanowska anka at bic.mni.mcgill.ca
Thu Apr 26 08:13:39 EDT 2012


Could this  code be of some help:

 #include "QVTKWidget.h"
...
   QVTKWidget * imageWindow;
...
    imageWindow = new QVTKWidget( parentWidget );
    imageWindow->setObjectName( "ImageWindow" );
    imageWindow->setMinimumSize( QSize( DEFAULTWIN_X, DEFAULTWIN_Y ) );
    imageWindow->setMaximumSize( QSize( DEFAULTWIN_X, DEFAULTWIN_Y ) );
    imageWindow->setGeometry( QRect( 2, 2, DEFAULTWIN_X, DEFAULTWIN_Y ) );
    imageWindow->resize( DEFAULTWIN_X, DEFAULTWIN_Y );
    vtkRenderWindowInteractor *interactor = imageWindow->GetInteractor( );
    vtkInteractorStyleImage * style = vtkInteractorStyleImage::New( );
    interactor->SetInteractorStyle( style );
    vtkRenderer *renderer = vtkRenderer::New( );
    renderer->AddViewProp(actor);
    imageWindow->GetRenderWindow()->AddRenderer( renderer );

Anka


On Thu, Apr 26, 2012 at 7:54 AM, Ale <notinmyhead at gmail.com> wrote:

> But can I set actors from QT widgets? It sound a bit strange to me...
>
> Ale
>
> Il giorno 26/apr/2012, alle ore 13.08, Jothybasu Selvaraj ha scritto:
>
> > You could manipulate the Z positon of the actors yuo add to the
> vtkRenderer, so that they all stay above the image.
> >
> >
> > Jothy
> >
> > On Thu, Apr 26, 2012 at 12:01 PM, Ale <notinmyhead at gmail.com> wrote:
> > Hello,
> >
> > I'm going crazy trying to add extra "layers" to a qvtkwidget in order to
> have text labels, combo boxes and so on, among the qvtkwidget main view
> (such as a single slice of a 3dvolume). Is there a way to do it properly
> resorting to a mix of vtk and qt? Is there some "canonical" approach I'm
> missing?
> >
> > Thanks,
> > Ale
> > _______________________________________________
> > 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
> >
> >
> >
> > --
> > Jothy
> >
>
> _______________________________________________
> 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/20120426/421ad08c/attachment.htm>


More information about the vtkusers mailing list