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.3.18.tar.gz (151.0 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.3.18-cp311-abi3-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.11+Windows x86-64

fw_file_rs-0.3.18-cp311-abi3-musllinux_1_2_x86_64.whl (2.2 MB view details)

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

fw_file_rs-0.3.18-cp311-abi3-musllinux_1_2_aarch64.whl (2.1 MB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ ARM64

fw_file_rs-0.3.18-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.3.18-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.1 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

fw_file_rs-0.3.18-cp311-abi3-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

fw_file_rs-0.3.18-cp311-abi3-macosx_10_12_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for fw_file_rs-0.3.18.tar.gz
Algorithm Hash digest
SHA256 dca4db75c9073499e95ed120bba2af8c5e1064e527eaac09220a7a6d10ba324f
MD5 9fad57a6df630be7912a869c17c5dff9
BLAKE2b-256 a8c64d0cd91e0e8546541f59dc0994e1fa26d0d8b0a39b51db31a101549c64b8

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fw_file_rs-0.3.18-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 10e031a64c7aa93cd6b04f9feace38954481114de535bf3c9ae33edaa614f259
MD5 b1b08a0d3fd276f375f3705906441c12
BLAKE2b-256 3ad6ea700f9abf5c65d4d140771565de883d922ca3e2a4d3b32f5273e60c1501

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.3.18-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0e148a0ddf82496249a836bfc7bc2b9694d64adb1de7e6844225fd7d811de47f
MD5 8fc343c14adbf8f5d492ced500e70fb3
BLAKE2b-256 d0cb7f4717b0f2913a79de8b24d3d9ac2af59eb8a9b99a0fe4ebd50d7cbf2ad4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.3.18-cp311-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 855f5aee16024d3953d74aadd383d5e12901659bf315d18ae3d25e212ae4664c
MD5 b2f666f018af754ba3e4ec34c06fa967
BLAKE2b-256 c3e9195459e9ebe9df93d520f47ed008df6890777f9d4ddb2fa4eadc28ef8ced

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.3.18-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0cf2ca8cbb907539c8888ba76981d572e0ee22a62157a7867abaf1841a3f2733
MD5 9710c1a3cae67b1b921e60a81a1ed6e8
BLAKE2b-256 c0489684774caffcec63d0c72e811d3f96fa062dc9ac82ba9fdd458693b94d5a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.3.18-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 903d07b187062d4dd431da87d24332c171d7cb6593cc0b416361ebac88d9a4dd
MD5 8df553077f41a72f0ff52b09afeaf2e4
BLAKE2b-256 98cb7115a735cfb04b9c764989fc67974b574949e16537ef0c2ca6c5f78836ca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.3.18-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b024763040e23d510fdf1c20eb9de4eafb8e50e72ccf097331212c7664417707
MD5 537ee78a0840ff8415bedab8ed05a820
BLAKE2b-256 98995939cb25080660f6d26a9856c4cc137bf2fd15c1af955f9b44bf416e8e69

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.3.18-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ee310a5a44b1cd192edd28cf3b98d37bfc07955cbcae7d8eeb20070da8bbb947
MD5 f26f9946e5d07e65d14a6a05fa2d6765
BLAKE2b-256 716123b714df7fd4ccdea9b5a81e0a10503821982336973085b86893ec7080ab

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