|
int(plain_transforms({"image": os.path.join(args.data_base_dir, filepath)})["image"].meta["dim"][_i]) |
In the data preparation, the plain_transforms uses monai.transforms.Orientationd(keys="image", axcodes="RAS"), to reorient the image, but the new dimension is set using plain_transforms({"image": os.path.join(args.data_base_dir, filepath)})["image"].meta["dim"][_i] which has the original dimension, not the new dimension.