Four dipsplay Window

Hi
i need to display my image into 4 window
1 axial 2- sagittal 3- coronal 4- 3D view
like 3dslicer default
how to do it ??

This is a big question, but in general my strategy is to create a vtkImageActor from my vtkImageData, and then for each plane use SetDisplayExtent() to display the appropriate portion of the image actor.

There may be examples in the VTK Examples that you can look at. A quick look shows that this may be useful: https://lorensen.github.io/VTKExamples/site/Cxx/Meshes/Decimation/ Here the same source uses different actors in different windows. Additionally, the actors can be oriented differently in each window.

thanks, i solved it…

Just an FYI: I’ve been working on something lately to do exactly this in Python: https://github.com/vtkiorg/vtki/issues/111

Hi davood :slight_smile: i have to do the same thing…i have a volume that i have to display in a window: 1/4 for the 3D volume, 1/4 for the axial plane, 1/4 for the sagittal plane and 1/4 for the coronal plane. Could u explain me how u manage to do it? I also have to ‘scroll’ up/down mi planes through the volume…
Thanks in advance,
Marco

1 Like

@dp1991 could u help me? i have your same problem…

These examples may help:
https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/SideBySideViewports/
Or a more complex example using vectors (C++) or lists (Python) using multiple windows:
https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/ParametricObjectsDemo/

Hi @amaclean and thank u for your quick answer! I know how to ‘split’ a render window, but how can i do MPR? I think i should use vtkResliceImageViewer but how?

Thanks in advance for any help!

There are tests and examples for every VTK class that demonstrate how to use them.

thank u @lassoan for your answer. Unfortunately, the only example I found here doesn’t help me :frowning:

Maybe others will have more patience to lead you through all the steps of building an image viewer application from scratch. I would just suggest you to study open-source VTK-based applications that already do everything that you need - MPR, 4-up views, image reslicing, volume rendering, etc. - there are many of those.