Coder Social home page Coder Social logo

read-patient-from-dicom's Introduction

刚刚开始做medical image时写的脚本,留下作个纪念!

Read Patient from DICOM🎞

DICOM(Digital Imaging and Communications in Medicine)即医学数字成像和通信,是医学图像和相关信息的国际标准(ISO 12052)。DICOM被广泛应用于放射医疗,心血管成像以及放射诊疗诊断设备(X射线,CT,核磁共振,超声等)。所有患者的医学图像都以 DICOM 文件格式进行存储。这个格式包含关于患者的PHI(protected health information)信息,例如姓名,性别,年龄,以及其他图像相关信息比如捕获并生成图像的设备信息,医疗的一些上下文相关信息等。

在日常中我们获取了一批DICOM文件,并不知道它的影像信息,例如:不知道它的模态、序列、病人信息。我们就没法对这些数据进行分类或者做对应的图像处理。这个脚本可以帮你快速获取一个文件夹下的所有dicom文件的基本信息,并保存为一个excel表格。

Feature: 任何混乱文件夹,只要文件夹里面有Dicom就能被读出来😉

🕶依赖:

Python >=3.9

pandas

pydicom

安装:

需要先自行安装python!!!

clone 
cd Read_Patient_from_DICOM
pip install -r requirement -i https://pypi.tuna.tsinghua.edu.cn/simple #  使用清华源

使用:

在Run.py中修改:

    folder_path = "dicomfolder"  # 替换为你要提取DICOM信息的文件夹路径(相对路径,建议把该脚本放在与执行文件夹同级目录)

输出文件名可以修改,默认为"Patientinf.xlsx",输出位置:脚本所在文件夹下。
‼ 程序运行时的警告报错属于正常现象,不用管就行。

范例:

① 保存所有信息(这个保存在文件夹的temporfile.xlsx)

Demo

② 最终保存的文件,将多余的序列信息汇总到了一起

Demo2

License

This project is licensed under the MIT License

Refrence:

医学图像DICOME格式信息解析

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.