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.5.3.tar.gz (163.5 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.5.3-cp311-abi3-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.11+Windows x86-64

fw_file_rs-0.5.3-cp311-abi3-musllinux_1_2_x86_64.whl (2.4 MB view details)

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

fw_file_rs-0.5.3-cp311-abi3-musllinux_1_2_aarch64.whl (2.4 MB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ ARM64

fw_file_rs-0.5.3-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view details)

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

fw_file_rs-0.5.3-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.3 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

fw_file_rs-0.5.3-cp311-abi3-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

fw_file_rs-0.5.3-cp311-abi3-macosx_10_12_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for fw_file_rs-0.5.3.tar.gz
Algorithm Hash digest
SHA256 563ad41143051c84c3eaf9da68f314994b7806e8a42b1caba63bac3f350231be
MD5 1f2947a22d3e1a973171759d7e8ea76e
BLAKE2b-256 36d717710f12a89974539382ed2709a932a3af13dec7f153f6a12bdae3cef714

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fw_file_rs-0.5.3-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 e7a498fc8a29149c8f0df290649db2d43919fdf398f8c433dbe9bf921894aa03
MD5 1a1ae126f594b581d0437a7cded0d947
BLAKE2b-256 386e431aeccc6802f20658f5cb5cc1b0a4ef6892eb0c800d9dad96d98e569786

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.5.3-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 1899366de31b6c1690d28ea300a9d9aae9ae4783422f3be8c25d2367521bb344
MD5 6a429c7a21fa1e47e57015afff89f0df
BLAKE2b-256 fad4f1d11152ac98b01710a017dfc436dda4a0698a4e69c83e57eeb0701fcc33

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.5.3-cp311-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 4d5e16dfb7e88414f47a2a6859181fd0ea50094fbcbae21ce2fff114cd4b771c
MD5 8ab03cbaf94b5a1ac94c65cbf8b58a41
BLAKE2b-256 db06908a4fb317c342bb35db5ccf196dba10c5bcb313834a9fa97aa90c3d9abd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.5.3-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f90c75fdc55572366baf9ec9a6913043681a858685ece1014c7c67e7fbbec247
MD5 58006ff8e066805d76d275d38cac3383
BLAKE2b-256 78ec22d04ec1869dfa1d208cf6b7da2fe0057e9e6f58629a80f9434fa5549d9f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.5.3-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5f5c58949fdf1cebe81930d19d57de37e630f2a2a6fd7f74d3e9ebd3ff48f174
MD5 2cfd793db5a1b76e21bae2f8985640b4
BLAKE2b-256 dd1168d0713fc9c8329eef52fb1497f037cb05450845c26f4ded5426fba4109c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.5.3-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 74369d7d8a181d68f3315f28c946a6f9e735cac0276b8f751466fcf4918427fd
MD5 37d491edbf37ddb8a7aad07b9fce06d5
BLAKE2b-256 80c0f95f34f6f4cbbcc22c39043c781568a97f067ff4fd72841ef8216b6f186c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.5.3-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e6196e84a5dd8494d3dc837d9458172b336b9d317197413bcf3f67e8c478fd70
MD5 824768a61da9b4f2763673e9df2dc76e
BLAKE2b-256 053ee82ac13c54398b25e9ea949efcfae5312addf026f0486f47b8e01d7cd8d2

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