# How to read a volumetric mesh in python?

**URL:** https://discourse.slicer.org/t/how-to-read-a-volumetric-mesh-in-python/18974
**Category:** Support
**Tags:** segmentation, python, segmentmesher, meshing
**Created:** [July 29, 2021, 4:54pm UTC](https://discourse.slicer.org/t/how-to-read-a-volumetric-mesh-in-python/18974 "2021-07-29T16:54:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Matheus](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@Matheus](https://discourse.slicer.org/u/Matheus)
#### Post date: [July 29, 2021, 4:54pm UTC](https://discourse.slicer.org/t/how-to-read-a-volumetric-mesh-in-python/18974/1 "2021-07-29T16:54:13Z")

</div>

Hello everyone!

I segmented some DICOM files and turned the segmentation into a volumetric mesh. I want to read and plot this file correctly in python. Can you tell me how to do this the best way without losing information?

Thanks

---

<div class="post-metadata">

### Author: ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)
#### Post date: [July 29, 2021, 10:10pm UTC](https://discourse.slicer.org/t/how-to-read-a-volumetric-mesh-in-python/18974/2 "2021-07-29T22:10:11Z")

</div>

You can use the VTK Python bindings to access the data in the mesh.

---

<div class="post-metadata">

### Author: ![Matheus](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@Matheus](https://discourse.slicer.org/u/Matheus)
#### Post date: [August 2, 2021, 6:17pm UTC](https://discourse.slicer.org/t/how-to-read-a-volumetric-mesh-in-python/18974/3 "2021-08-02T18:17:17Z")

</div>

Thank you Steve Piper!!

I’m having trouble to access the segment dimensions in the vtk file. Do you know how to do it?
