Volume rendering, VTK 9 and Qt5 - Crop doesn't work correctly in master

MacOS 10.12.6, AMD Radeon R9 M370X - crop doesn’t work properly - it appears to clip the view rather than cropping the volume. This is master, updated through @jcfr’s DriverScript pull of a couple hours ago.

I think that @Sankhesh_Jhaveri is working on fixes related to cropping and volume rendering that should land in VTK master anytime. We will then update the version used in Slicer.

That said, we would need more details to know for sure. Could you give more details about the data, the volume rendering setting and may be include a screenshot ?

Yeah, sorry about that - I’ve been trying to get some representative images. It’s a lot easier to see in motion…

These are from CTACardio using the chest vessels preset. First is 4.8.1:

You can see at the edges of the ROI, it crops the volume and you see internals.

This is master, built March 13:

If you look carefully, you can see the top of the crop volume at the top of the chest volume. The crop ROI doesn’t crop any volume data - it just seems to clip the view.

I put a quick video in: Slicer - Google Drive

Hopefully that will give you an idea.

Thanks!

-Hollister

I also get these on the console:

Switch to module:  "VolumeRendering"
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setPen: Painter not active
QPainter::setBrush: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setPen: Painter not active
QPainter::setBrush: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setPen: Painter not active
QPainter::setBrush: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints

Hi Hollister! I tried it with the latest version and it seems to be working OK on Windows. I started 4.8.1 to see if there is any difference, and they look the same. Maybe this is an issue only on Mac?

That said the volume rendering cropping is not supposed to crop the actial volume data, only restrict the region volume rendering considers.

And I don’t get any errors either. I’m building a Slicer on Mac now.

@hherhold You seem to have the same issue as everybody else (https://issues.slicer.org/view.php?id=4510). A fix was promised to be integrated into VTK by tomorrow. From there Slicer should be able to get it quickly.

@cpinter The error only occurs if you enable depth peeling and use GPU volume rendering.

@lassoan Hey Andras - ! I should have checked Mantis before posting - sorry about that!

Thanks!!!

-Hollister

It just occurred to me that depth peeling makes rendering slower. As you had issues with performance, and it now turns out that you use depth peeling, maybe you can further improve performance by disabling that feature. Of course if you want to render surfaces inside the rendered volume, then you’ll need it, but otherwise it’s not essential.