# SimpleITK image interpolation, PhysicalPointSource example

**URL:** https://discourse.itk.org/t/simpleitk-image-interpolation-physicalpointsource-example/3158
**Category:** Beginner Questions
**Created:** [June 9, 2020, 6:46pm UTC](https://discourse.itk.org/t/simpleitk-image-interpolation-physicalpointsource-example/3158 "2020-06-09T18:46:34Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![sag](https://discourse.itk.org/user_avatar/discourse.itk.org/sag/32/2041_2.png) [@sag](https://discourse.itk.org/u/sag)
#### Post date: [June 9, 2020, 6:46pm UTC](https://discourse.itk.org/t/simpleitk-image-interpolation-physicalpointsource-example/3158/1 "2020-06-09T18:46:34Z")

</div>

Hi all,  
sorry for a such a primitive question! and I hope I am in the right forum!  
I am trying to follow the python program for image interpolation, I have created PhysicalPointSource pattern and could show the image using my show python script! yet I could not Use site.Expand to rescale the by factor of 5 for all dimensions!? I am not sure why? but at this line of code:

ml = marschner\_lobb(40)  
ml = ml[:,:, ml.GetSize()[-1] // 2]  
something may be wrong next line:  
my show(site.Expand(ml, [5] \* 3, sick.sitkLinear), title=‘Linear’)  
[http://insightsoftwareconsortium.github.io/SimpleITK-](http://insightsoftwareconsortium.github.io/SimpleITK-)  
this is the link:  
[https://simpleitk-prototype.readthedocs.io/en/latest/user\_guide/transforms/plot\_interpolation.html](https://simpleitk-prototype.readthedocs.io/en/latest/user_guide/transforms/plot_interpolation.html)

thanks in advance  
sag

---

<div class="post-metadata">

### Author: ![zivy](https://discourse.itk.org/user_avatar/discourse.itk.org/zivy/32/1726_2.png) [@zivy](https://discourse.itk.org/u/zivy)
#### Post date: [June 9, 2020, 7:36pm UTC](https://discourse.itk.org/t/simpleitk-image-interpolation-physicalpointsource-example/3158/2 "2020-06-09T19:36:35Z")

</div>

Hello @sag,

1. You are in the right discourse (ITK/SimpleITK).
2. You seem to have stumbled on an old user initiative to create a read-the-docs site for SimpleITK, this is not part of our official eco-system. We recommend to always go to [simpleitk.org](http://simpleitk.org) and follow the links from there (most of the time search engines will point you in the right direction, but sometimes not).
3. The problem you have is not related to SimpleITK but to standard Python and usage of correct package names (you imported `sitk` but you try to refer to it as `site` and `sick`). The following works:

```auto
ml = marschner_lobb(40)
ml = ml[:,:, ml.GetSize()[-1] // 2]
my_show(sitk.Expand(ml, [5] * 3, sitk.sitkLinear), title='Linear')

```

```auto

```
