Add 3D render viewport to MPR view

Hello everyone,
I’m trying to add a fourth viewport in the MPR view in which I want to show the 3D render of the CT volume. Before starting to populate the new viewport and setting it to 3D render, I want to place it (as empty) in the view, but i’m encountering several errors by doing this. In fact, if the number of viewports (calculated by multiplying numRows x numCols in SetMPRLayout) is anything different than 3, the crosshairs on the axial, sagittal and coronal projections disappear. I’m trying to understand which is the most correct part in the code where i should add the definition of this new viewport but i couldn’t find anything working until now.
What I actually want is an ITK-Snap like interface, with the three projections and the 3D render of the volume (or the segmentation), all in a 2x2 layout.
Did someone already implement this?
Thanks in advice

1 Like

Hello @Cristianzaza and welcome to the OHIF community forum!

I think perhaps your best bet is to create a new hanging protocol - similar to the mprAnd3DVolumeViewport hanging protocol that ships with OHIF.

https://viewer.ohif.org/viewer?StudyInstanceUIDs=1.3.6.1.4.1.25403.345050719074.3824.20170125095258.1&hangingprotocolid=mprAnd3DVolumeViewport

I hope this helps.

Thank you @jbocce !
I took a look at the example and it seems to be exactly what I need, my goal is to show the 3D render of the segmentation instead of the whole volume but I guess I will just have to change the input displaySet.
By the way I noticed that in the mprAnd3DVolumeViewport view there is no reference about the crosshairs in the 3D window, do you think it is possible to add it combining the 3 points in the other views or maybe there is some already existing components as the ResliceCursorWidget that I could use for this ?
thank you again, have a great day!

We do not have a ResliceCursorWidget and furthermore the crosshairs tool is planar-based.