# Converting SegmentationNode to Labelmap takes a long time through Python

**URL:** <https://discourse.slicer.org/t/converting-segmentationnode-to-labelmap-takes-a-long-time-through-python/23696>\
**Category:** Development\
**Created:** [June 3, 2022, 9:03pm UTC](https://discourse.slicer.org/t/converting-segmentationnode-to-labelmap-takes-a-long-time-through-python/23696 "2022-06-03T21:03:15Z")\
**Posts on this page:** 1\
**Showing post:** 8

<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:** [June 13, 2022, 7:50pm UTC](https://discourse.slicer.org/t/converting-segmentationnode-to-labelmap-takes-a-long-time-through-python/23696/8 "2022-06-13T19:50:43Z")

</div>

All features are available via the Python interface, so you don’t need to switch to C++ if you don’t want to. It is possible that in some cases we missed wrapping some structures into Python-compatible types - if you find one then let us know and we’ll fix it.

You can see how conversion is done with custom conversion path in the icdr GUI: [Slicer/qMRMLSegmentationConversionParametersWidget.cxx at master · Slicer/Slicer · GitHub](https://github.com/Slicer/Slicer/blob/master/Modules/Loadable/Segmentations/Widgets/qMRMLSegmentationConversionParametersWidget.cxx)

There are some [related Python code snippets](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#convert-all-segments-using-default-path-and-conversion-parameters) that you may find useful.

---

_[View the full topic](https://discourse.slicer.org/t/converting-segmentationnode-to-labelmap-takes-a-long-time-through-python/23696)._
