med-air / DLTTA

[IEEE TMI'22] DLTTA: Dynamic Learning Rate for Test-time Adaptation on Cross-domain Medical Images
16 stars 2 forks source link

Re-spacing of Prostate dataset to take 80x80x80 patches #4

Open Neo2854 opened 1 year ago

Neo2854 commented 1 year ago

I am trying to reproduce the results for prostate dataset. But i am unable to do it because of below issue.

In one of the issue you told that, after re-spacing, the shape of the MRI volumes is around [256, 256, 128]. I didn't get this. Can you just tell how the re-spacing is done exactly?

HongzhengYang commented 1 year ago

Hi, thanks for your question. Since the in/through plane resolution for each case is different, you need to assign different spacing size for each case to make the volume shape [256,256,128]. So you can define the volume shape first and calculate the spacing size for each case to make the spacing_size*volume_size constant after re-spacing.

indranarendra commented 1 year ago

I also have the same doubt. In the prostate dataset, each image volume is of a different shape.

For example, when I'm doing preprocessing using your code, one image volume of shape [40, 384, 384] is converted into [25, 384, 384, 3]. How can we convert this into [256, 256, 128]?

Neo2854 commented 1 year ago

I am also struggling with the same problem. The thing is i don't know much about medical images.

HongzhengYang commented 1 year ago

You can follow this (https://github.com/amanbasu/3d-prostate-segmentation/blob/master/resizing.py) to re-size the 3D volume.