# Change interpolation method

**URL:** <https://discourse.slicer.org/t/change-interpolation-method/19318>\
**Category:** Development\
**Created:** [August 23, 2021, 2:53pm UTC](https://discourse.slicer.org/t/change-interpolation-method/19318 "2021-08-23T14:53:38Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 23, 2021, 4:02pm UTC](https://discourse.slicer.org/t/change-interpolation-method/19318/5 "2021-08-23T16:02:52Z")

</div>

Volume interpolation in slice views is controlled by the [Interpolate](https://apidocs.slicer.org/master/classvtkMRMLScalarVolumeDisplayNode.html#ac524f069eead3bf4414eadfc3e563483) flag. However, the flag is already enabled by default, so I would not recommend touching it. If you disable it then you introduce artifacts in the image reconstruction. See more details [here](https://discourse.slicer.org/t/volume-display-interpolate-turned-off-by-default-in-newest-stable/13918/17).

If you just want to show boundaries of voxels then don’t use nearest neighbor interpolation, because it would ruin the image by aliasing artifacts and by the increased image contrast that is needed to make the random noise between neighbor voxels large enough so that your eye can make out individual voxels. Instead you can use [this small Python code snippet](https://discourse.slicer.org/t/volume-display-interpolate-turned-off-by-default-in-newest-stable/13918/10) to show the voxel grid in slice views.

If you want to have higher-order interpolation then you can enable it like this for a specific view (it is not exposed on the GUI, as the feature remained in an experimental stage; see some more information [here](https://discourse.vtk.org/t/vtkimageactor-interpolation-limited-to-linear/4858/4?u=lassoan)):

```python
sliceNode = slicer.mrmlScene.GetNodeByID('vtkMRMLSliceNodeRed')
slicer.app.applicationLogic().GetSliceLogic(sliceNode).GetBackgroundLayer().SetInterpolationMode(vtk.VTK_RESLICE_CUBIC)
slicer.util.forceRenderAllViews()

```

---

_[View the full topic](https://discourse.slicer.org/t/change-interpolation-method/19318)._
