Skip to main content

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.dcm import Context, read_until_pixels

# Create a configured context using the builder pattern
ctx = (Context()
    .parse_include([
        "InstitutionAddress",
        "InstitutionName",
    ])
    .group_by(["StudyInstanceUID", "SeriesInstanceUID"])
    .split_localizer(True)
    .deid_profile("""
        version: 1
        name: profile
        dicom:
          fields:
            - name: PatientName
              replace-with: REDACTED
    """))
# Read DICOM header bytes from file
header_bytes = ctx.read_until_pixels("/path/to/dicom/file.dcm")
# Extract metadata using the configured context
meta = ctx.parse_header(header_bytes)
# Get Flywheel-specific metadata
fw_meta = ctx.get_fw_meta(meta)
# Group DICOM files by configured tags with localizer splitting
path_meta_pairs = [("1.dcm", meta)]
groups = ctx.group_series(path_meta_pairs)
# De-identify the DICOM header using the configured profile
deid_header = ctx.deid_header(header_bytes)

Project details


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.7.0.tar.gz (186.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

fw_file_rs-0.7.0-cp311-abi3-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.11+Windows x86-64

fw_file_rs-0.7.0-cp311-abi3-musllinux_1_2_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ x86-64

fw_file_rs-0.7.0-cp311-abi3-musllinux_1_2_aarch64.whl (2.5 MB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ ARM64

fw_file_rs-0.7.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ x86-64

fw_file_rs-0.7.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.4 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

fw_file_rs-0.7.0-cp311-abi3-macosx_11_0_arm64.whl (2.2 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

fw_file_rs-0.7.0-cp311-abi3-macosx_10_12_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

Details for the file fw_file_rs-0.7.0.tar.gz.

File metadata

  • Download URL: fw_file_rs-0.7.0.tar.gz
  • Upload date:
  • Size: 186.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for fw_file_rs-0.7.0.tar.gz
Algorithm Hash digest
SHA256 95b38c34b53d4f28fbdbe1fe1ce063a18c82c7ad783864d455c0d5911df8aea8
MD5 2f18033f37a9be1e8e5059e484e31f13
BLAKE2b-256 9068221e2b2c836ef8b58d6cffaa48172ac723a1de994e2e18836ec275572735

See more details on using hashes here.

File details

Details for the file fw_file_rs-0.7.0-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: fw_file_rs-0.7.0-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for fw_file_rs-0.7.0-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 512bfd3d9e7cc393e14eca27d13f580cbe0be993e72df225595aa95bac7c017e
MD5 e5173afeb00c8bb1c24bf5f592c6de7d
BLAKE2b-256 99863fddec0895d9ee527f5a2d6db3ba56622edbe87bb7b26595751b39eb39aa

See more details on using hashes here.

File details

Details for the file fw_file_rs-0.7.0-cp311-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for fw_file_rs-0.7.0-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 410887a30b3350e6fc6ece18791c618b18191cdb2eed53dc9aaf124f613bd67b
MD5 8ee8c4b0a5a9cef573ba1601ce66bf22
BLAKE2b-256 e2e72e54926b6ab7549c22423c0b41135bfac9b1fb8b29ad40d6f11592397368

See more details on using hashes here.

File details

Details for the file fw_file_rs-0.7.0-cp311-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for fw_file_rs-0.7.0-cp311-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 722b14e7c7331c878f7084a1b1be8431f06fd565199f894506cb8ca13d979bef
MD5 d9c19e5c59491ff967bdeee878bf54e0
BLAKE2b-256 f02a9cfd17896105a903850cc446458f48b59ddd7a309d63a54562492f5facce

See more details on using hashes here.

File details

Details for the file fw_file_rs-0.7.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fw_file_rs-0.7.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 07e5a2b9ea9331f2b77028c509cc6f00be9ab033ca0b55fc23db06dbd8842c00
MD5 5391f6e385eed06ef3d48ace22fd5fea
BLAKE2b-256 d39e4cef074a2dd963134364b7e7634f5808c60d5aef3947d2e2f193843e5180

See more details on using hashes here.

File details

Details for the file fw_file_rs-0.7.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fw_file_rs-0.7.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2079c5285c34d709c2f25ea859c5c51487ac4658b67b4f87cc7c0825c42d46c4
MD5 35dc672baccaf9ed19b645f01801cc5b
BLAKE2b-256 dfcaebacb70b644a3dbaf66a018c1471ead01ef779b84cbda128b1e5e970e1c8

See more details on using hashes here.

File details

Details for the file fw_file_rs-0.7.0-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fw_file_rs-0.7.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 478c65b78029591ec59d8cf05c6093ecf86b15c698a02127caac495463a93aac
MD5 90d0d66e6d80971da4b6f12fcad7f6b0
BLAKE2b-256 cf862e77bfcbb1fb8e6e5b456983c490cdee1c1966ebec7ea6d9c97296697bcc

See more details on using hashes here.

File details

Details for the file fw_file_rs-0.7.0-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for fw_file_rs-0.7.0-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d96c32f7d94805a95baa3e445022713a0873801537ae71c3b76bd3ba9910710a
MD5 d4ef03594df3084adb20a16ca267ad75
BLAKE2b-256 f77a145ef17f2333c00728572d3726f9927c6fa930432e1fa313812a66f70792

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page