Read, parse and de-identify DICOM files
Project description
fw-file-rs
Python bindings for the fw-file-rs Rust library.
Usage
from fw_file_rs import PyDeidProfile, get_dcm_meta
dcm_bytes = read_until_pixel_data("/path/to/dicom/file.dcm")
# extract metadata from a DICOM file
tags = [
"StudyInstanceUID",
"SeriesInstanceUID",
# tags below are needed for splitting localizer
"InstanceNumber",
"ImagePositionPatient",
"ImageOrientationPatient",
"Rows",
"Columns",
]
meta = get_dcm_meta(dcm_bytes, tags)
# group DICOM files by StudyInstanceUID and SeriesInstanceUID and split localizer
metas = [meta] # multiple meta
groups = group_dcm_meta(metas, ["StudyInstanceUID", "SeriesInstanceUID"], True)
# de-identify a DICOM file using a YAML profile
yaml = """
version: 1
name: profile
dicom:
fields:
- name: PatientName
replace-with: REDACTED
"""
profile = PyDeidProfile.from_yaml(dcm_bytes)
result = profile.deid_dcm(dcm)
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
fw_file_rs-0.1.4.tar.gz
(21.2 kB
view details)
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fw_file_rs-0.1.4.tar.gz.
File metadata
- Download URL: fw_file_rs-0.1.4.tar.gz
- Upload date:
- Size: 21.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3f0837cd25f1aed022c83786f99d62a9e034343b78afa2b7ef0ad24e3c8b31d
|
|
| MD5 |
776aa614fdb5210a967c41e735ca4ae5
|
|
| BLAKE2b-256 |
fdd557e2577fc19b249358507e0bee0e950c94aced67aec04977e13becfdf35d
|
File details
Details for the file fw_file_rs-0.1.4-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: fw_file_rs-0.1.4-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 973.6 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6477cfa294d0d0d5abb3332b8bb859d61cb6b7a4e1a7e6b60ba75fa15fea72c4
|
|
| MD5 |
d57fddbbf09699e5943c4425a8cd468c
|
|
| BLAKE2b-256 |
ec49cc3a83ca0d487ddd419f381a5d0bb944ce465c6c67eb4b0549ce74d9d7e9
|
File details
Details for the file fw_file_rs-0.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: fw_file_rs-0.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ed837215be08981b536d3ba8d5535578f230d5c75fb85e4294e79f1782cdffe
|
|
| MD5 |
38f7c66b9718b8eb241c239b88134ad3
|
|
| BLAKE2b-256 |
ca82a772aa69ee906fc2751c88ef8790d4bcf6b3424773278c6b4771181cde8e
|