Can You Open Medical Data (MR, CT, X-Ray) in Python and Find Tumors With AI?! Maybe

  • 📰 hackernoon
  • ⏱ Reading Time:
  • 26 sec. here
  • 2 min. at publisher
  • 📊 Quality Score:
  • News: 14%
  • Publisher: 51%

Technology Technology Headlines News

Technology Technology Latest News,Technology Technology Headlines

How to access medical data in DICOM format (MR, CT, X-Ray) from Python

A few days ago, I underwent an MRI scan. They slid me into a large tube, and for 15 minutes, the machine around me buzzed, hummed, and clicked. At the end of the examination, I received a CD containing the data. What does a good developer do in such a situation? Of course, as soon as they get home, they start examining the data and thinking about how they might extract it using .

The allows you to easily export the files in PNG format: following code import os import pydicom from PIL import Image import sys def save_image: if pixel_array.dtype !='uint8': pixel_array=) / - pixel_array.min) * 255).astype img=Image.fromarray img.save print def process_dicom_directory: if not os.path.exists: os.makedirs dicomdir=pydicom.dcmread for patient_record in dicomdir.patient_records: if 'PatientName' in patient_record: print for study_record in patient_record.

 

Thank you for your comment. Your comment will be published after being reviewed.
Please try again later.
We have summarized this news so that you can read it quickly. If you are interested in the news, you can read the full text here. Read more:

 /  🏆 532. in TECHNOLOGY

Technology Technology Latest News, Technology Technology Headlines