rsummers11 / CADLab

Imaging Biomarkers and Computer-Aided Diagnosis Laboratory
https://www.cc.nih.gov/meet-our-doctors/rsummers.html
432 stars 186 forks source link

Regarding the code for processing the images. I am stuck here in processing stage, If anyone has the code pls send the link, that would be helpful. #59

Closed Vijay1667 closed 1 year ago

Vijay1667 commented 1 year ago

Write a script to process the images: 1) Convert the image to int32 format, then subtract 32768 from the pixel intensities to obtain the original Hounsfield unit (HU) values (generally about -1000 ~ 1000, https://en.wikipedia.org/wiki/Hounsfield_scale); 2) Do intensity windowing (https://radiopaedia.org/articles/windowing-ct) on the HU values, i.e., convert the intensities in a certain range (“window”) to 0-255 for viewing. To view different structures (lung, soft tissue, bone etc.), we need different windows. The column “DICOM_windows” in DL_info.csv provides the default window for each image. For example, if the min and max values of a window is A and B, then the windowed intensity I should be I = min(255, max(0, (HU-A)/(B-A)*255); 3) Save the windowed image to 8-bit image files. This is how the files in Key_slices.zip were generated.

viggin commented 1 year ago

Please refer to https://github.com/rsummers11/CADLab/blob/master/MULAN_universal_lesion_analysis/maskrcnn/data/datasets/load_ct_img.py