# Change resolution of a 3D VTK dataset

**URL:** https://discourse.vtk.org/t/change-resolution-of-a-3d-vtk-dataset/10322
**Category:** Support
**Created:** [December 28, 2022, 12:27am UTC](https://discourse.vtk.org/t/change-resolution-of-a-3d-vtk-dataset/10322 "2022-12-28T00:27:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![pasvalietis](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/p/439d5e/32.png) [@pasvalietis](https://discourse.vtk.org/u/pasvalietis)
#### Post date: [December 28, 2022, 12:27am UTC](https://discourse.vtk.org/t/change-resolution-of-a-3d-vtk-dataset/10322/1 "2022-12-28T00:27:01Z")

</div>

Hello,

I am working with a vtk dataset that has both scalar and vector field data, and the vtk type is `vtkStructuredPoints`. I want to decrease the grid resolution for each field to reduce file size and write the new dataset into a new vtk file using `vtkImageResize` and `SetResizeMethodToOutputSpacing` methods from python vtk library:

```auto
resize = vtkImageResize()
resize.SetInputData(data) # data is original StructuredPoints dataset
resize.SetResizeMethodToOutputSpacing()
nfactor = 4 # downscaling factor
resize.SetOutputSpacing(dx*nfactor, dy*nfactor, dz*nfactor)
resize.Update()

```

However, it returns me an error ‘vtkImageResize (0x556db860fb30): ThreadedRequestData: output scalar type does not match input scalar type’, and the dataset resolution does not change.  
What is the right way to downsample the dataset?  
I would appreciate any help!
