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.1.tar.gz (162.4 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.1-cp311-abi3-win_amd64.whl (1.8 MB view details)

Uploaded CPython 3.11+Windows x86-64

fw_file_rs-0.5.1-cp311-abi3-musllinux_1_2_x86_64.whl (2.3 MB view details)

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

fw_file_rs-0.5.1-cp311-abi3-musllinux_1_2_aarch64.whl (2.2 MB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ ARM64

fw_file_rs-0.5.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view details)

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

fw_file_rs-0.5.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.2 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

fw_file_rs-0.5.1-cp311-abi3-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

fw_file_rs-0.5.1-cp311-abi3-macosx_10_12_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: fw_file_rs-0.5.1.tar.gz
  • Upload date:
  • Size: 162.4 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.1.tar.gz
Algorithm Hash digest
SHA256 6af8dd93a02fc256cd0023ff7c5febd378143343fb0ca4dc42cff843e144d4e0
MD5 0c147142627501e8f7569852fb5b39c0
BLAKE2b-256 df709911de071d76a5b04de761a4c102f378d3f88d48619f8c55f201845ae938

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fw_file_rs-0.5.1-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.8 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.1-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 018ee6d6779638aeb34497992ddf91cca8c25d248fd36984b1185660931d260a
MD5 51e6875e266f6d5bc49f535da53e3401
BLAKE2b-256 8705661e79faaf26143fa9ca132bb2f0030ffa5c64a9e04ac6493641a53f0413

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.5.1-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f2c2bf4d3b6e9d5a93d32c1519146e3628d4515a75dbdde891a8e8c536c75e58
MD5 12ee6e75677630e9b65841361f36dc24
BLAKE2b-256 6d3ac3513569d85b69f32e4d40eaf7a1efda7a5fd88de09b1532edd7ec14a8da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.5.1-cp311-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 b11aa1c840b0b72c656316a87e16da677c46b77d15e6e6f9d1ba74ce3bb419a2
MD5 82de8568ef2eeab19653fe2e510f3a4a
BLAKE2b-256 7b4c9019818535ffd60743c3396cd0aa21a8e1de6cbcdb8d8cfda33b258a4ba6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.5.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 988da73e71f3d26519de7bd8401e43fe16ecbcf2373edc91de8e37b48cf842f7
MD5 1090dd0beb317e9162e6df6e89abfb8a
BLAKE2b-256 c4813668c845a145f03dc866d85a597b8de5ddddd16f03d7ccac75a4fcf06032

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.5.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 bd1ed9e476b25eeada3b6d11b763c6e82867d20830927be0eff5f665b6ed9602
MD5 4812fcb93e963b5b2464fcdb670d45ac
BLAKE2b-256 1dbe78bd606c118e98215ece801c2c2a6c74239e0e49372b85c3090f39c76dbb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.5.1-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4a71c85fed809ab4ffadc50c58c67486c4675b9fd97ace65bdc667ec2b6dc850
MD5 aa486f6dc56f9373b6dc158799d5e5fd
BLAKE2b-256 ee2fdcbd8da2cc41632ab90b5a4d05dc34fdf1ef0fe6abc9b2e4bd858b660761

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.5.1-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d907c6e3b37ba54f86efe22ad1c0cff2966d62c844620865f10fd7df9b600168
MD5 7cc77ace0500c50ecc03102c88b10248
BLAKE2b-256 4b1009ddfc460afcf2c809b891443e0d65766b2196c0fe5337857066eaed345c

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