Volume rendering without interpolation


I am looking for a way to turn off interpolation in 3D rendering, like with setInterpolationTypeToNearest. Is there any way I can do that in Paraview?

I have been using Paraview a lot, but it can be difficult to visualize 3D volumes where the type of (linear?) interpolation that is done automatically is not reasonable.

I can find code that does this for vtk, but I don’t know how I would use it in Paraview. If there isn’t any options I can use to set interpolation to nearest, can I use a script with the Python script editor somehow? Like with the type of function found here How to turn off interpolation for discrete label segmentation image? - #3 by jilei-hao - Web - VTK

This property is actually available in ParaView but hidden. You can control it from the python shell though:

repr = GetDisplayProperties()
repr.InterpolationType = "Nearest"

Alright, yes, I can simply run this script then and get interpolation to nearest

from paraview.simple import *
repr = GetDisplayProperties()
repr.InterpolationType = “Nearest”

Thank you!

1 Like