[vtkusers] Superimpose images

Henrik Westerberg henrik.westerberg at crg.es
Wed Nov 3 07:32:19 EDT 2010


Hi Erik, vtkusers,

I found that you can't transform ImageActors in actor mode even though it inherits from Prop3D.

To get round this I use the following pipeline (use whatever image reader you like):

vtkJPEGReader ->vtkDataSetMapper -> vtkActor

If you are using the default InteractorStyle/RenderWindowInteractor, then press "a" and you can
translate/rotate/scale images on top of each other. You can also make images transparent with
youractor.getProperty().SetOpactity(0.5).

regards,
Henrik
________________________________________
From: vtkusers-bounces at vtk.org [vtkusers-bounces at vtk.org] On Behalf Of Erik Tuerke [tuerke at cbs.mpg.de]
Sent: 02 November 2010 18:55
To: vtkusers at vtk.org
Subject: [vtkusers] Superimpose images

Hi!

I have a problem when visualizing two images. VTK visualizes the images
side by side in my window.

The code is the following:

This is done for both images:

...
m_ExtractSagittal->SetInput( m_ImageVector[m_currentTimestep] );
m_MapperSagittal->SetInput( m_ExtractSagittal->GetOutput() );
m_ActorSagittal->SetMapper( m_MapperSagittal );
m_ActorSagittal->GetProperty()->SetInterpolationToFlat();
m_ActorSagittal->SetPosition(0,0,0);
m_RendererSagittal->AddActor( m_ActorSagittal );
...

And this once:
m_InteractorSagittal->SetInteractorStyle( m_InteractionStyleSagittal );
m_WindowSagittal->SetInteractor( m_InteractorSagittal );
m_WindowSagittal->AddRenderer( m_RendererSagittal );

m_InteractorSagittal->Initialize();
ui.qvtkWidgetSagittal->SetRenderWindow( m_WindowSagittal );

And then render.

Is there any possibility to superimpose the images??

Thanks for your help!

--
Erik Tuerke
Department of Neurophysics
Max-Planck-Institute for Human Cognitive and Brain Sciences
Stephanstrasse 1A
04103 Leipzig
Germany
Tel: +49 341 99 40-2440
Email: tuerke at cbs.mpg.de
www.cbs.mpg.de


_______________________________________________
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