# Volume rendering without interpolation

**URL:** https://discourse.paraview.org/t/volume-rendering-without-interpolation/14486
**Category:** ParaView Support
**Created:** [April 25, 2024, 8:57am UTC](https://discourse.paraview.org/t/volume-rendering-without-interpolation/14486 "2024-04-25T08:57:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Sandra](https://discourse.paraview.org/user_avatar/discourse.paraview.org/sandra/32/14247_2.png) [@Sandra](https://discourse.paraview.org/u/Sandra)
#### Post date: [April 25, 2024, 8:57am UTC](https://discourse.paraview.org/t/volume-rendering-without-interpolation/14486/1 "2024-04-25T08:57:17Z")

</div>

Hi.

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](https://discourse.vtk.org/t/how-to-turn-off-interpolation-for-discrete-label-segmentation-image/10706/3)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 25, 2024, 12:14pm UTC](https://discourse.paraview.org/t/volume-rendering-without-interpolation/14486/2 "2024-04-25T12:14:06Z")

</div>

> [@Sandra](#):
>
> setInterpolationTypeToNearest

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

```auto
repr = GetDisplayProperties()
repr.InterpolationType = "Nearest"
Render()

```

 ![image](https://discourse.paraview.org/uploads/default/original/2X/0/07777577d6c02d112e0570ad1f6152a8902e9324.jpeg)

---

<div class="post-metadata">

### Author: ![Sandra](https://discourse.paraview.org/user_avatar/discourse.paraview.org/sandra/32/14247_2.png) [@Sandra](https://discourse.paraview.org/u/Sandra)
#### Post date: [April 26, 2024, 7:14am UTC](https://discourse.paraview.org/t/volume-rendering-without-interpolation/14486/3 "2024-04-26T07:14:37Z")

</div>

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

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

Thank you!
