MungoMeng / Survival-XSurv

[MICCAI2023] XSurv: Merging-Diverging Hybrid Transformer Networks for Survival Prediction
GNU General Public License v3.0
6 stars 2 forks source link

Where is the pre-processing code? #2

Closed zhou07 closed 9 months ago

zhou07 commented 10 months ago

Hi, I am very interested in your work. But there are some problems when I run your project. The shape of PET or CT images could be ((144, 144, 87) or (512, 512, 239). Your paper mentioned that you crop the images to 160 × 160 × 160 voxels with the tumor located in the center, but I cannot find the pre-processing module in your code. Could you provide the pre-processing code including cropping, saving into npz, etc?

MungoMeng commented 10 months ago

Hi, I think you should resample the original images into isotropic voxels where 1 voxel corresponds to1mm3. Please refer to the official code provided by Hecktor challenge: https://github.com/voreille/hecktor/tree/master

zhou07 commented 10 months ago

Hi, The resample.py in the official code just resamples the original images into isotropic voxels, but I still do not know how to crop the images to 160 × 160 × 160 voxels with the tumor located in the center from your code. I'm not sure about your specific implementation. Is it to form a minimum bounding box including the PT and MLN areas, fill the bounding box into a square, and then resize it to 160160160? Or other implementation methods. Could you please provide your preprocessing code, including cropping, normalization, and saving into npz (there are a lot of npz-based operations in the datagenerator.py)? Thank you!

MungoMeng commented 10 months ago

Hi, I have provided all the details about processing in the paper. Please strictly follow it sentence by sentence. After resampling, I said "Each image was cropped to 160 × 160 × 160 voxels with the tumor located in the center" without mentioning there is another resampling. Therefore, you should simply find the center of the tumor region (both PT and MLM) based on the provided segmentation labels, e.g., (x, y, x), and then crop the image around this center (x-80:x+80, y-80:y+80, z-80:z+80).