# Field interpolation from set of 2D slices (3D volume)

**URL:** https://discourse.slicer.org/t/field-interpolation-from-set-of-2d-slices-3d-volume/13494
**Category:** Support
**Created:** [September 15, 2020, 7:06pm UTC](https://discourse.slicer.org/t/field-interpolation-from-set-of-2d-slices-3d-volume/13494 "2020-09-15T19:06:18Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![loubna](https://avatars.discourse-cdn.com/v4/letter/l/cab0a1/32.png) [@loubna](https://discourse.slicer.org/u/loubna)
#### Post date: [September 15, 2020, 7:06pm UTC](https://discourse.slicer.org/t/field-interpolation-from-set-of-2d-slices-3d-volume/13494/1 "2020-09-15T19:06:18Z")

</div>

Hi;

I have a stack of 2D images (3d image Data). each 2d image represent a distance field computed from contour (contour of slicerRT) , I want to interpolate pixel by pixel the 2D images using a cubic spline interpolation? but I have no idea how can I do that?

any suggestion will be appreaciated

Thank’s in advance

---

<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: [September 15, 2020, 7:10pm UTC](https://discourse.slicer.org/t/field-interpolation-from-set-of-2d-slices-3d-volume/13494/2 "2020-09-15T19:10:19Z")

</div>

You can use “Resample Scalar/Vector/DWI Volume” module for this. Set interpolation type to `bs`.

---

<div class="post-metadata">

### Author: ![loubna](https://avatars.discourse-cdn.com/v4/letter/l/cab0a1/32.png) [@loubna](https://discourse.slicer.org/u/loubna)
#### Post date: [September 15, 2020, 7:41pm UTC](https://discourse.slicer.org/t/field-interpolation-from-set-of-2d-slices-3d-volume/13494/3 "2020-09-15T19:41:19Z")

</div>

thank you very much for answer. ResampleScalarVolume.cxx uses ITK filters, is it possible to use vtkImageBSplineInterpolator instead?

---

<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: [September 15, 2020, 8:58pm UTC](https://discourse.slicer.org/t/field-interpolation-from-set-of-2d-slices-3d-volume/13494/4 "2020-09-15T20:58:33Z")

</div>

You need to take care of image axis directions in some way (VTK8 only supports non-rotated axes) and proper prefiltering but it should be usable, too.

---

<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: [January 30, 2021, 12:34pm UTC](https://discourse.slicer.org/t/field-interpolation-from-set-of-2d-slices-3d-volume/13494/5 "2021-01-30T12:34:01Z")

</div>

A post was split to a new topic: [Computer slows down after volume is oversampled](https://discourse.slicer.org/t/computer-slows-down-after-volume-is-oversampled/15743)
