Dicom Metadata structures
Project description
DicomMeta
dicommeta is a Python library for efficiently storing large amounts of Dicom Metadata
Installation
Use the package manager pip to install dicommeta.
pip install dicommeta
Usage
from pprint import pprint
from src.dicommeta import (Series, Study)
from dicommeta import Instance
from dicommeta.Utils import Mode
new_dicom_study = Study(
StudyInstanceUID='1.3.6.1.4.1.14519.5.2.1.4334.1501.757929841898426427124434115918',
SpecificCharacterSet='ISO_IR 100',
StudyDate="20190701",
StudyTime='023750',
AccessionNumber='sdfk324234',
ReferringPhysicianName='Dr Strange',
PatientName='John Doe',
PatientID='A123',
StudyUID='study001',
PatientBirthDate='2000-01-01',
mode=Mode.CT)
new_series01 = Series(seriesUID='series001')
new_series01.add_instance(Instance(SOPinstanceUID='Instance001'))
new_series01.add_instance(Instance(SOPinstanceUID='Instance002'))
new_series01.add_instance(Instance(SOPinstanceUID='Instance002'))
new_dicom_study.add_series(new_series01)
new_series11 = Series(seriesUID='series001')
new_series11.add_instance(Instance(SOPinstanceUID='Instance002'))
new_dicom_study.add_series(new_series11)
new_series11.add_instance(Instance(SOPinstanceUID='Instance003'))
new_dicom_study.add_series(new_series11)
new_series02 = Series(seriesUID='series002')
new_series02.add_instance(Instance(SOPinstanceUID='Instance002'))
new_series02.add_instance(Instance(SOPinstanceUID='Instance003'))
new_dicom_study.add_series(new_series02)
pprint(new_dicom_study.get_dict())
pprint(new_dicom_study.get_series(seriesUID='series002'))
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dicommeta-0.5.6.tar.gz
(7.2 kB
view hashes)
Built Distribution
Close
Hashes for dicommeta-0.5.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 730b1ea9e6e6ae6cd1f62cf70f0b077418fb254d08128ae1f7449a603c280b47 |
|
MD5 | 2c96f3f8c87fbaea207a33500aad1fb2 |
|
BLAKE2b-256 | 8c34334122ab9bc78cf9069ad8b3e6bf052309c7e19bfd98b267b3336e85de81 |