# Save Segmentation Node as VTK file using the Python Console

**URL:** <https://discourse.slicer.org/t/save-segmentation-node-as-vtk-file-using-the-python-console/32755>\
**Category:** Development\
**Created:** [November 12, 2023, 12:21pm UTC](https://discourse.slicer.org/t/save-segmentation-node-as-vtk-file-using-the-python-console/32755 "2023-11-12T12:21:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhernandezr](https://avatars.discourse-cdn.com/v4/letter/j/6f9a4e/32.png) [@jhernandezr](https://discourse.slicer.org/u/jhernandezr)\
**Post date:** [November 12, 2023, 12:21pm UTC](https://discourse.slicer.org/t/save-segmentation-node-as-vtk-file-using-the-python-console/32755/1 "2023-11-12T12:21:31Z")

</div>

Hi there!  
Me and my team are trying to develop a code where we export automatically as vtk segmentatino nodes, however we are not able to do so.  
To be specific, we have a label node with the same structure as the segmentation node, in case it is easier to export as vtk the label node instead of the segmentation node.  
Inside the Segmentation node, we have a hierarchy called ‘jake’ corresponding to the only segmentation that is in blue.  
We would highly appreciate your help if you were able to save the segmentation as vtk. Thank you all in advance!

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 13, 2023, 2:36am UTC](https://discourse.slicer.org/t/save-segmentation-node-as-vtk-file-using-the-python-console/32755/2 "2023-11-13T02:36:09Z")

</div>

Last time we checked .vtk file format could not store image orientation, which prevented it to be used for the medical image computing. Therefore, I don’t think anyone plans to enable saving or exporting of segmentations into .vtk file format.

If you have absolutely no other choice than to use .vtk format then you can export the segmentation to a labelmap volume and save that as .vtk.
