I am working on making the volume data of the segmentation nrrd extension an Array List.
I have solved the method of creating an Array, but there is one question.
The size of the image I use is 501x501x500 and the total number of voxels is 125,500,500.
However, the total number of voxels produced by Array is about twice the output.
I wonder why.
I attached the code I used.
import numpy as np volumeNode = getNode('Segmentation-label_1') volumeArray = slicer.util.arrayFromVolume(volumeNode) a = volumeArray np.savetxt('C:\\Users\\admin\\Documents\\label8.txt',a,fmt='%5s')