# Is there any plan to implement LINEAR and CUBIC interpolation in imageReslice

**URL:** https://discourse.vtk.org/t/is-there-any-plan-to-implement-linear-and-cubic-interpolation-in-imagereslice/4150
**Category:** Web
**Tags:** proposal
**Created:** [September 4, 2020, 8:12am UTC](https://discourse.vtk.org/t/is-there-any-plan-to-implement-linear-and-cubic-interpolation-in-imagereslice/4150 "2020-09-04T08:12:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![kevin1](https://discourse.vtk.org/user_avatar/discourse.vtk.org/kevin1/32/2289_2.png) [@kevin1](https://discourse.vtk.org/u/kevin1)
#### Post date: [September 4, 2020, 8:12am UTC](https://discourse.vtk.org/t/is-there-any-plan-to-implement-linear-and-cubic-interpolation-in-imagereslice/4150/1 "2020-09-04T08:12:13Z")

</div>

VTK.JS not implement LINEAR and CUBIC in ImageReslice.

The image generated by NEAREST will have obvious jaggedness and the effect is not good.

---

<div class="post-metadata">

### Author: ![Forrest](https://discourse.vtk.org/user_avatar/discourse.vtk.org/forrest/32/300_2.png) [@Forrest](https://discourse.vtk.org/u/Forrest)
#### Post date: [September 10, 2020, 1:45pm UTC](https://discourse.vtk.org/t/is-there-any-plan-to-implement-linear-and-cubic-interpolation-in-imagereslice/4150/2 "2020-09-10T13:45:32Z")

</div>

This would be a good feature to add. Pinging @finetjul, since he worked on ImageReslice.

---

<div class="post-metadata">

### Author: ![finetjul](https://discourse.vtk.org/user_avatar/discourse.vtk.org/finetjul/32/154_2.png) [@finetjul](https://discourse.vtk.org/u/finetjul)
#### Post date: [September 11, 2020, 7:28am UTC](https://discourse.vtk.org/t/is-there-any-plan-to-implement-linear-and-cubic-interpolation-in-imagereslice/4150/3 "2020-09-11T07:28:55Z")

</div>

Yes, the LINEAR and CUBIC can be implemented similarly to the NEAREST.

I looked at how it is done in [VTK (C++)](https://github.com/Kitware/VTK/blob/master/Imaging/Core/vtkImageReslice.cxx) and wrote it in JavaScript for VTK.JS

Feel free to do the same for the other interpolation.
