# Convert .vtp to 3d array or tensor

**URL:** https://discourse.vtk.org/t/convert-vtp-to-3d-array-or-tensor/10385
**Category:** Support
**Created:** [January 4, 2023, 5:14pm UTC](https://discourse.vtk.org/t/convert-vtp-to-3d-array-or-tensor/10385 "2023-01-04T17:14:32Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Nikita\_Litvinenko](https://discourse.vtk.org/user_avatar/discourse.vtk.org/nikita_litvinenko/32/6361_2.png) [@Nikita\_Litvinenko](https://discourse.vtk.org/u/Nikita_Litvinenko)
#### Post date: [January 4, 2023, 5:14pm UTC](https://discourse.vtk.org/t/convert-vtp-to-3d-array-or-tensor/10385/1 "2023-01-04T17:14:32Z")

</div>

Hi all! I use the dataset [Vascular Model Repository](https://www.vascularmodel.com/dataset.html) and in it the aorta models are stored in .vtp . I wanted to ask if someone knows if it is possible in any way (at least programmatically, in any programming language) to convert data from the .vtp format into a 3-dimensional (or 4-dimensional) array or tensor to use for deep learning? Thanks for the opportunity to ask a question!

---

<div class="post-metadata">

### Author: ![Nikita\_Litvinenko](https://discourse.vtk.org/user_avatar/discourse.vtk.org/nikita_litvinenko/32/6361_2.png) [@Nikita\_Litvinenko](https://discourse.vtk.org/u/Nikita_Litvinenko)
#### Post date: [January 7, 2023, 5:36pm UTC](https://discourse.vtk.org/t/convert-vtp-to-3d-array-or-tensor/10385/2 "2023-01-07T17:36:05Z")

</div>

So, here is the right answer: [python - How to convert vtk file to 3D data set? - Stack Overflow](https://stackoverflow.com/questions/66645932/how-to-convert-vtk-file-to-3d-data-set)
