Kaiseem / DAR-UNet

[JBHI2022] A novel 3D unsupervised domain adaptation framework for cross-modality medical image segmentation
Apache License 2.0
40 stars 5 forks source link

Spacing Ratio #3

Closed rik030 closed 6 months ago

rik030 commented 2 years ago

Dear Sir, How to achieve the spacing ratio [1, 1, 4] in the semantic segmentation part?

Kaiseem commented 2 years ago

Hi,if your data is saved as the format of nii.gz, you can get the spacing by python library SimpleITK, function GetSpacing, like the following code:

obj=SimpleITK.ReadImage(path) print(obj.GetSpacing())

Then you can know the spacing of the data. In order to spacing normalize the data to the spacing ratio [1, 1, 4], I recommend finding some existing libraries, e.g., Monai.