Hi ptrblck, yes I’m dealing with medical images, there is nibabel for the nifti image, I have sliced them to images and save them in the folder in my computer. Because I think if I could do the segmentation of the image slices seperately and then combine them together, it’s ok. Maybe in the last step, I will reestablish the nifti image again using the nibabel package, I’m not sure if it’s a good idea.