# Interpolation On Points

**URL:** https://discourse.vtk.org/t/interpolation-on-points/12102
**Category:** Development
**Tags:** jobs, python, code, proposal, file-formats
**Created:** [August 5, 2023, 2:22pm UTC](https://discourse.vtk.org/t/interpolation-on-points/12102 "2023-08-05T14:22:25Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![A.M\_Shahpouri](https://discourse.vtk.org/user_avatar/discourse.vtk.org/a.m_shahpouri/32/6549_2.png) [@A.M\_Shahpouri](https://discourse.vtk.org/u/A.M_Shahpouri)
#### Post date: [August 5, 2023, 2:22pm UTC](https://discourse.vtk.org/t/interpolation-on-points/12102/1 "2023-08-05T14:22:25Z")

</div>

Hello

I have a vtkImagedata (in this code : ContourData) which the value of inside points have 100 and on border 200 and outsides are 0.

```
vtkNew<vtkImageResliceMapper> ContoureResliceMappers;
ContoureResliceMappers->SetInputData(ContourData);
ContoureResliceMappers->SetSlicePlane(plane);
ContoureResliceMappers->Update();

vtkNew<vtkLookupTable> lookupTable;
lookupTable->SetNumberOfColors(3);
lookupTable->SetTableValue(0, 0, 0, 0, 0); //set 0 opacity for outside values
lookupTable->SetTableValue(1,1,0,0, 0.2); //set 0.2 opacity and red color for border values
lookupTable->SetTableValue(2,1,0,0, 1); //set 1 opacity and red color for border values

vtkNew<vtkImageActor> ContoureSlices;
ContoureSlices->SetMapper(ContoureResliceMappers);
ContoureSlices->GetProperty()->SetLookupTable(lookupTable);
ContoureSlices->.InterpolateOn();
     //ContoureSlices->GetProperty().SetInterpolationTypeToNearest(); (a)
     //ContoureSlices->GetProperty().SetInterpolationTypeToCubic(); (b)
     //ContoureSlices->GetProperty().SetInterpolationTypeToLinear(); (c)
ContoureSlices->Update();

```

and for (a) , (b) and( c) I have these output

 ![Untitled](https://discourse.vtk.org/uploads/default/original/2X/6/64040315981a07b08ee582c870f6b306add9cf68.png)

but I want a output like this

 ![Untitled1](https://discourse.vtk.org/uploads/default/original/2X/d/d71ab0aeedae5193010958545e82de045aa6844a.png)

how can I do that?
