Home >Backend Development >Python Tutorial >python--Research on DICOM images

python--Research on DICOM images

巴扎黑
巴扎黑Original
2017-07-18 13:37:492073browse

DICOM3.0 images are standard medical imaging images produced by medical imaging equipment. DICOM is widely used in radiological medicine, cardiovascular imaging and radiological diagnosis and treatment diagnostic equipment (X-ray, CT, MRI, ultrasound, etc.), and is used in ophthalmology It is increasingly used in other medical fields such as dentistry and dentistry. With tens of thousands of medical imaging devices in use, DICOM is one of the most widely deployed medical information standards. Currently, there are approximately tens of billions of medical images that comply with DICOM standards for clinical use.

How to read the seemingly mysterious image file? A casual search on the Internet will reveal many methods, but there is a lack of a more systematic method of use. The following article will combine Baidu information and python2.7 to explain how to read and use DICOM images.

Reading DICOM images requires the following libraries: pydicom, CV2, numpy, matplotlib. pydicom is a Python-specific package that specializes in processing dicom images, numpy is a package that efficiently handles scientific calculations, and it is a library for drawing based on data.

Installation:

If not I remember wrongly, when installing pydicom, numpy will also be automatically installed.

After installing these libraries, you can operate dicom files. Specifically, look at the following code:
1 pip install matplotlib
In the DICOM image, there is a dictionary containing patient-related information. We can use dir to see what information the DICOM file has, and we can return relevant values ​​through the dictionary. .
 pip install opencv-python  #opencv的安装,小度上基本都是要下载包,安装包后把包复制到某个文件夹下,
#后来我在找到这种pip的安装方法,亲测可用

The above is the detailed content of python--Research on DICOM images. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn