How can I get an array from seg.nrrd file in Python?

I want to read the data from the seg.nrrd file using the nrrd.read() function and obtain it in array format as a 3D array. However, the data in the seg.nrrd file consists only of arrays filled with zeros.

What might I be missing?

You are probably not missing anything. Labelmap files containing segmentations are usually mostly zeros.

What do you get if you run this command?

print(np.count_nonzero(label_mask))