Add segmentation mask to volume

Hi,

I have created a segmentation as a numpy array. What is the procedure to add the segmentation to the original volume and then display it in Slicer. I’ve seen someone else use the function “slicer.util.arrayFromSegmentBinaryLabelmap”, but I am unsure on how to use it.

Thank you

You can find an example using the function here:
https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#read-and-write-a-segment-as-a-numpy-array