# Error in using filter

**URL:** <https://discourse.itk.org/t/error-in-using-filter/1048>\
**Category:** Algorithms\
**Tags:** simpleitk\
**Created:** [June 29, 2018, 6:15pm UTC](https://discourse.itk.org/t/error-in-using-filter/1048 "2018-06-29T18:15:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lee](https://discourse.itk.org/letter_avatar_proxy/v4/letter/l/bc8723/32.png) [@lee](https://discourse.itk.org/u/lee)\
**Post date:** [June 29, 2018, 6:15pm UTC](https://discourse.itk.org/t/error-in-using-filter/1048/1 "2018-06-29T18:15:46Z")

</div>

> import SimpleITK as sitk  
> image = sitk.ReadImage(“f.png”)  
> from skimage import filters  
> edges = filters.scharr(image)

UserWarning: Possible precision loss when converting from int64 to float64  
.format(dtypeobj\_in, dtypeobj\_out))

> ```
> plt.imshow(edges) returns nothing
> 
> ```

---

<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:** [July 2, 2018, 10:53pm UTC](https://discourse.itk.org/t/error-in-using-filter/1048/2 "2018-07-02T22:53:47Z")

</div>

This is surprising that you only ended with a UserWarning and not an exception. SimpleITK images are not compatible with [skimage’s expectation of numpy arrays](http://scikit-image.org/docs/dev/user_guide/data_types.html). You can get a numpy array from a SimpleITK image using the GetArrayFromImage method. I would suggest that you familiarize yourself with SimpleITK by going over the SimpleITK Jupyter notebooks. You can either clone the [comprehensive repository](https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks) or a shorter [tutorial given at ISBI’18](https://github.com/SimpleITK/ISBI2018_TUTORIAL).
