Interpolation of gradient opacity function

Hello,

I have a couple of questions regarding the gradient opacity function available in the volume rendering section.

  1. In “Advanced” there is an interpolation setting with two options (linear and nearest neighbor). Does this setting affect the way that the gradient is interpolated for samples taken along each ray? I know that this interpolation setting is used for interpolating densities/scalars along the rays. However, I don’t know how the gradient is interpolated.

  2. Based on the other questions, Slicer uses vtkImageGradient for gradient opacity. Apparently, VTK uses central differencing for 3D volumes. Is it correct?

Thanks

3 Likes

It may affect how the gradient is computed, but this is such a low-level detail that you need to check in the VTK source code (see how vtkVolumeProperty::InterpolationType is used). Anyway, you do not have the freedom of choosing this value. You must use nearest neighbor for label volumes and linear for grayscale volumes.

vtkImageGradient is a filter running on CPU. GPU volume raycast mappers don’t use this but instead they compute the image gradient in the GPU, on-the-fly, during raycasting. This is again such a low-level detail that generally should not matter, but if you want to confirm how things work exactly then you need to have a look at the VTK source code.

1 Like