The simplest is probably to create a labelmap volume node, set its voxels from a numpy array using slicer.util.updateVolumeFromArray, and convert into a segmentation node using ImportLabelmapToSegmentationNode.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Add segmentation mask to volume | 1 | 270 | January 31, 2023 | |
| Segment / BinaryLabelMap to numpy array | 9 | 3917 | August 9, 2017 | |
| How to get the segmentation data? | 1 | 251 | January 30, 2024 | |
| Create labelmap nrrd file from numpy array | 1 | 353 | February 13, 2024 | |
| How to access and manipulate segmentation node as a numpy array? | 3 | 478 | February 5, 2024 |