[vtkusers] 'Cloning' the content of a QVTKWidget
Clinton Stimpson
clinton at elemtech.com
Fri Jun 26 11:02:02 EDT 2009
A couple ideas:
- vtkWindowToImageFilter -> vtkTexturedActor2D to draw the contents of
one window into another.
- go ahead and add all your vtkDataSet's and vtkActors to the bigger
window, but set the camera parameters to be the same as the other. This
will prevent a loss of quality when showing the same view in a bigger
window.
Clint
lars-friedrich wrote:
> Hello,
>
> some days ago, I posted a question regarding 'cloning of QVTKWidget
> contents'. No reply, unfortunately. Is my way of thinking wrong? Do I really
> need two renderers, and compute the same scene two times when I simply would
> like to show the same object from the same point of view in two separate
> Qt-widgets?
> Thanks.
>
> lars
>
>
>
> lars-friedrich wrote:
>
>> Hello VTKUsers,
>>
>> does someone know what the most efficient way of 'cloning' a scene
>> displayed in one QVTKWidget within another QVTKWidget is?
>> I have a (small) QVTKWidget integrating a vtkImagePlaneWidget showing a
>> slice of a specified volume image. However, on demand, I would like to
>> display the same scene in another (bigger) QVTKWidget simultaneously.
>> Simply 'connecting' the pointer of the renderer did not do the trick:
>> oneWidget->GetRenderWindow()->GetRenderers()->InitTraversal();
>> anotherWidget->GetRenderWindow()->AddRenderer(oneWidget->GetRenderWindow()->GetRenderers()->GetNextItem());
>> ... the scene was then visible just in anotherWidget.
>>
>> Could you help me, please?
>>
>> lars
>>
>>
>
>
More information about the vtkusers
mailing list