# Updating segmentationNode with oversampled labelmap

**URL:** <https://discourse.slicer.org/t/updating-segmentationnode-with-oversampled-labelmap/29733>\
**Category:** Development\
**Created:** [May 30, 2023, 6:18pm UTC](https://discourse.slicer.org/t/updating-segmentationnode-with-oversampled-labelmap/29733 "2023-05-30T18:18:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [May 30, 2023, 7:36pm UTC](https://discourse.slicer.org/t/updating-segmentationnode-with-oversampled-labelmap/29733/2 "2023-05-30T19:36:15Z")

</div>

See a complete solution in this topic (using vtkSlicerSegmentationGeometryLogic):

> [@Resample segments in segmentation using Python scripting](https://discourse.slicer.org/t/resample-segments-in-segmentation-using-python-scripting/26411/4):
>
> This should resample all the segments in the segmentation using the current geometry: segmentationNode = getNode('Segmentation') segGeomLogic = slicer.vtkSlicerSegmentationGeometryLogic() segGeomLogic.SetInputSegmentationNode(segmentationNode) segGeomLogic.SetSourceGeometryNode(segmentationNode) segGeomLogic.CalculateOutputGeometry() segGeomLogic.ResampleLabelmapsInSegmentationNode()

---

_[View the full topic](https://discourse.slicer.org/t/updating-segmentationnode-with-oversampled-labelmap/29733)._
