How to convert png to nrrd? I need help, thank you! I use the following code:
img = cv2.imread(imgPath)
imgT = img.transpose(1,0,2)
img3d = imgT[..., np.newaxis]
nrrd.write(imgPath.split(".png")[0] + ".nrrd", img3d)
But the conversion speed is very slow. It takes me almost 8 seconds to convert 1 picture.