frankkramer-lab / covid19.MIScnn

Robust Chest CT Image Segmentation of COVID-19 Lung Infection based on limited data
GNU General Public License v3.0
88 stars 31 forks source link

patch shape #22

Closed LHJ97 closed 3 years ago

LHJ97 commented 3 years ago

Hi,

I have a question regarding the patch shape in the script run_miscnn.py. It is set as (160, 160, 80). Is the z-axis, 80 represents the number of slices in the patch? However, in your source code of Miscnn, you wrote: patch_shape (integer tuple): Size and shape of a patch. The variable has to be defined as a tuple. For Example: (64,128,128) for 64x128x128 patch cubes. Be aware that the x-axis represents the number of slices in 3D volumes.

Can you clarify this for me?

Best wishes, LHJ

muellerdo commented 3 years ago

Hello @LHJ97,

oh, sure.

This depends on the dataset you are using. Depending on the dataset creation or parsing from DICOM to NIfTI, the "slice-axis" is either the first (z, x, y) or the third (x, y, z). But this is not fixed or standardized in the community, which means that you have to check it manually.

In our COVID-19 case, the slice-axis was the third axis so (160=x, 160=y, 80=z). But e.g. in the Kidney Tumor Segmentation Challenge 19 (KITS19) dataset, the z-axis was the first axis, so our patch shape looked like this (80, 160, 160).

This issue is also important in the resampling (if you don't resample to isotropic voxel spacing).

Cheers, Dominik

LHJ97 commented 3 years ago

Thanks a lot!