COVID-CTset icon indicating copy to clipboard operation
COVID-CTset copied to clipboard

Can you post your code to read a DICOM file and save into a 16-bit TIF file?

Open wjtan99 opened this issue 3 years ago • 4 comments

I just want to make sure I get all the details of your approach.
Thanks a lot.

wjtan99 avatar Jan 30 '21 06:01 wjtan99

Hello

For Writing: import pydicom as dicom import PIL.Image as pil_image ds = dicom.dcmread("DICOM Address") pixels = ds.pixel_array im = pil_image.fromarray( pixels) im.save('TIFF address')

For Reading: img = cv2.imread('TIFF Address',cv2.IMREAD_UNCHANGED )

mr7495 avatar Jan 30 '21 06:01 mr7495

Thanks a lot for your fast response.

wjtan99 avatar Jan 30 '21 06:01 wjtan99

Hi, do you do any other preprocessing before you save it into tif image? I use a different DICOM dataset and train with your code. The validation accuracy cannot exceed 0.6.
Thanks.

wjtan99 avatar Feb 02 '21 16:02 wjtan99

Hello; no the original images just were converted to TIFF for easy usage and then would have been used for training the models. Did you use ResNet50V2+FPN model?

mr7495 avatar Feb 03 '21 14:02 mr7495