0Posted Updated Pythona few seconds read (About 64 words)
Python: lsm image to tif image
import tifffile, cv2, os List_dir = "lsm/" out_dir = "out/" LSM_list = [i for i in os.listdir(List_dir) if".lsm"in i] LSM_list[0]
for i in LSM_list: A = tifffile.imread(List_dir + i) #fig, ax = plt.subplots(figsize=(10, 10)) for ch_id inrange(A.shape[1]): Pic = A[:,ch_id,:,:] tifffile.imsave(out_dir + i+str(ch_id)+".tif", Pic)