Closed Zeay-ZZY closed 3 months ago
Hi, my preprocessing script works on 3D data. To apply on 2D, the best way is to concatenate 2D slices to reconstruct the original 3D scans.
A sub-optimal way is to duplicate the 2D slices N times, let's say 30 times, save as NIFTI, and run the script.
Finally, the alternative solution is to modify the script for processing 2D data: https://github.com/HieuPhan33/MaskGAN/blob/55b2cd3b31f3e0dd3e4c4cfcc5ae90a9faefcef6/preprocess/main.py#L87
thank you
My data structure is the same as you described. The data under /root/CT and /root/MRI are 2D .nii.gz files with dimensions of 256x256, obtained by decompressing .nii data using gzip.GzipFile. After obtaining the dataobj with nibabel, it is an array of shape [1, 1, 256, 256]. However, when I run the main.py for preprocessing, I encounter the following error:
I don't know how to resolve this issue