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

python--Research on DICOM images

巴扎黑
Release: 2017-07-18 13:37:49
Original
2060 people have browsed it

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
Copy after login
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的安装方法,亲测可用
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template