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

Uploaded CPython 3.11+Windows x86-64

fw_file_rs-0.6.2-cp311-abi3-musllinux_1_2_x86_64.whl (2.5 MB view details)

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

fw_file_rs-0.6.2-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.6.2-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.6.2-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.6.2-cp311-abi3-macosx_11_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

fw_file_rs-0.6.2-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.6.2.tar.gz.

File metadata

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

File hashes

Hashes for fw_file_rs-0.6.2.tar.gz
Algorithm Hash digest
SHA256 539db13d4685da213401ea377628989cef40d0ff14de2e7fcbc8d9a30a773709
MD5 ac3107598d7c17786e1ac19cbd5125e8
BLAKE2b-256 1b0e986faa184599beeab8b9dc3fe7e140ddb490cd06cf35ca61d444ed74a6a3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fw_file_rs-0.6.2-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.12

File hashes

Hashes for fw_file_rs-0.6.2-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 fc6f713d07a89a75f6440a8a2b3a394c21a07be79ffcf6f4f9a9a24b8b4b40de
MD5 f3c7c6957752ace24c9f71282e857fb0
BLAKE2b-256 72d4eea923415a59d905034c2bc2fd70e2da695871e4684b8554e53a5738cebe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.6.2-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a6ce6aabdede8ebe2d2c3ca23d9a5b2e7569794b12034d0a74d61e732d717c3f
MD5 f904c12607b3cd0712f7b3540c353f71
BLAKE2b-256 16eb3e6de0c84f82c7d331d881927638f721440edee1c0012aa7a721afd30177

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.6.2-cp311-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 6109f9f01bf81db72396b2344a23d7a0692973bb111efee841e3ca5eabadbef7
MD5 b4bb55179a48d7d53cb78ced58893023
BLAKE2b-256 81e8e4da30d39e019fb55cea10b0c530113e3846c910cea4adb325c65db25081

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.6.2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 82ee01f93808adb59fb3cb376da1223a0d00c504d689486509d7c9737e6cd8c7
MD5 fb802f7f26b69cdd9f95bf3e5cfbd9fd
BLAKE2b-256 e3d160073210f77b7baa6132d136c153872fb722cd01c089cefe1ad3f1c0ac25

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.6.2-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 89779fe63ccc39cb1c53f1fb01d204606620b7aef53d0d16430c47e68c4ee0d8
MD5 9846156f3d6a1535cedb4ccec8addb6c
BLAKE2b-256 bdc60bd92f9064428f1361040f60f65460181a71f7807fe4b9fe34da749fd033

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.6.2-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9c87191a56fb1e3f21ab9241efe001a115b9fdc00a5bbe1e0ab69db5f7578b96
MD5 81fe65d911b1f3bc846adcaf04d69775
BLAKE2b-256 350450d17f77ca3d3cb548699e7797c3f7e57f94029f3403dc768d39592521cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.6.2-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 797e4231fa5c98b17faa93c9fac00957be79f027399dfcbd6482e56a3a56a16b
MD5 544893815ab6ad66cea82cfb6c56eb43
BLAKE2b-256 ac245442fc2ab4b331fadc2182f0addbd035fb3a2df80364c7ffea28a7b9d67b

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