2021.01.05 Hangout

That’s great! Let me give a bit of background in case anyone wants to look in advance. The basic idea is to render segmentations using a technique like the one described here but with the reference volume as the alpha channel.

It works pretty well, and the SlicerMorph team really wants this mode, so one thing I want to do is speed up calculation of these. I’m sure it can be made to work in real time for feedback while segmenting, with per-segment visibility controls, etc.

The problem I’m hitting is that the ray caster seems to use the alpha channel for opacity integration, but for some reason uses the red channel to calculate the gradient for lighting, leading to pixelation artifacts and incorrect normals (e.g. no normals in blue areas).

I’ve started working on a pure vtk script to reproduce the issue but wanted to discuss with this group before filing a bug report. Maybe I’m using it wrong or it’s already fixed in VTK master or someone’s branch.

The bottom ellipsoid is a single component volume and the top is rgba with the same alpha as the single component and red, green, blue slabs

image

I suspect this issue is on this line but changing the 0 to a 3 does not work as I expected (color becomes black everywhere).