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 | 248 | January 31, 2023 | |
Segment / BinaryLabelMap to numpy array | 9 | 3861 | August 9, 2017 | |
How to get the segmentation data? | 1 | 209 | January 30, 2024 | |
Create labelmap nrrd file from numpy array | 1 | 326 | February 13, 2024 | |
How to access and manipulate segmentation node as a numpy array? | 3 | 383 | February 5, 2024 |