# add border class between close gloms and arteries
preprocessingGT(lbl)
logger.info("Load data with index "+str(k)+" : "+fname+", ImgShape: "+str(img.shape)+""+str(img.dtype)+", LabelShape: "+str(lbl.shape)+""+str(lbl.dtype)+" (max: "+str(lbl.max())+", min: "+str(lbl.min())+")")
# pad label image so that the augmentation method performs the same transformation on both
seq_lbl_d=seq_lbl_d.copy_random_state(seq_img_d,matching="name")# match according to name to provide equal transformation parameters for augmentation for image and mask
# after augmentation, crop image mask back to its prior size