# Saving a RGB numpy array into \*.vtk for visualisation

**URL:** https://discourse.paraview.org/t/saving-a-rgb-numpy-array-into-vtk-for-visualisation/12425
**Category:** Web Support
**Created:** [July 1, 2023, 5:27am UTC](https://discourse.paraview.org/t/saving-a-rgb-numpy-array-into-vtk-for-visualisation/12425 "2023-07-01T05:27:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rkenko](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rkenko/32/11917_2.png) [@rkenko](https://discourse.paraview.org/u/rkenko)
#### Post date: [July 1, 2023, 5:27am UTC](https://discourse.paraview.org/t/saving-a-rgb-numpy-array-into-vtk-for-visualisation/12425/1 "2023-07-01T05:27:43Z")

</div>

Hi, i wonder if it is possible in a simple way, to save a 3D RGB (so 4D) numpy array into the \*.vtk format readable by paraview. I used to work on grayscale images and this small command did the trick:

```auto
arr = np.random.rand(64, 64, 64)
arr_vtk = pv.wrap(arr)
arr_vtk.save("arr.vtk")

```

but for now, if i want to save this array, how can i do ?

`arr = np.random.rand(64, 64, 64,3)`

the 3 channels stands for the RGB channels and i would like to visualise them (the final color) using paraview if possible …  
is it also possible to specify where to save the data ? (points / cells) ?

Thanks
