# VTK 9.1 vtkResampleToImage() seg faults core dumps on CentOS 7

**URL:** https://discourse.vtk.org/t/vtk-9-1-vtkresampletoimage-seg-faults-core-dumps-on-centos-7/8931
**Category:** Support
**Tags:** python
**Created:** [July 11, 2022, 7:13pm UTC](https://discourse.vtk.org/t/vtk-9-1-vtkresampletoimage-seg-faults-core-dumps-on-centos-7/8931 "2022-07-11T19:13:44Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![synthetic\_person](https://discourse.vtk.org/user_avatar/discourse.vtk.org/synthetic_person/32/5493_2.png) [@synthetic\_person](https://discourse.vtk.org/u/synthetic_person)
#### Post date: [July 11, 2022, 7:13pm UTC](https://discourse.vtk.org/t/vtk-9-1-vtkresampletoimage-seg-faults-core-dumps-on-centos-7/8931/1 "2022-07-11T19:13:44Z")

</div>

Hello,  
my python script fails with Segmentation fault (core dumped) when I try to convert an unstructured grid into a 3D volume using vtkResampleToImage()

```auto
import vtkmodules.all as vtk
...
 resample = vtk.vtkResampleToImage()
  resample.SetSamplingDimensions(xRes,xRes,xRes)
  resample.AddInputDataObject(output)
  resample.Update() # <=== crashes here

```

I’m using VTK 9.1 on CentOS 7 and Python 3.7.11.  
The crashing happens when I increase the resolution of the 3D image towards the resolution of the source data. So it appears to be a memory-related issue.  
i.e. it works when I specify a lower resolution, but we want to match the source resolution.  
Although I have 256 Gigs of ram on the Linux workstation. It doesn’t appear to use up the memory when I watch in the Linux top command.  
Any workarounds?  
Thanks
