Closed dzzhang96 closed 1 year ago
Hi,
Thank you for your interest in our work. You can write a simple script to get the median spacing of a new dataset. I use SimpleITK to get the spacing information of each image. Then put the spacing of all images into a list. You can get the median of the list with NumPy. I hope this helps.
@yhygao Thanks for the reply. Would you please elaborate on the following lines in the function preprocess in dataset_bcv.py and dataset_lits.py? Thanks again!
img = np.clip(img, -17, 201)
img -= 99.40
img /= 39.39
This is to normalize the image as a preprocessing step. I followed nnUNet to normalize the image with the mean and std of the foreground. The value I chose were referred to the nnUNet paper (https://arxiv.org/pdf/1904.08128.pdf). I didn't compute the value by myself.
Hi yhygao,
Thank you for the codes! Can I ask how you calculate the median spacing when preprocessing the dataset? I found that all the three datasets have different median spacing.