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

Uploaded CPython 3.11+Windows x86-64

fw_file_rs-0.6.1-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.1-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.1-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.1-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.1-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.1-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.1.tar.gz.

File metadata

  • Download URL: fw_file_rs-0.6.1.tar.gz
  • Upload date:
  • Size: 164.4 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.1.tar.gz
Algorithm Hash digest
SHA256 055b155ffde4938902361f271d4f339ef10a20155e34670e901fdcf6f134f388
MD5 0645a0868ddfdd8fe7c90f7b4e51643d
BLAKE2b-256 edae18f188f7e26e62787bff203be54240a56273b521d9b3c9e5785ef0c70c71

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fw_file_rs-0.6.1-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.1-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 553164f11b27a0fc5766623574e0fb1ed99324351ceade491891b5cf08180c00
MD5 ae84b7b88ec371ef42dcac5c51810c84
BLAKE2b-256 f5e02a0f09701a390ff440a29e7a393a5054cd3203c8bf4735188eef830af7e5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.6.1-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5cf89c8a4777c7018073c1af5fe004a1c6a2d096996a930c985f073b63c30486
MD5 d74ccdb32c243927f30d24ca5d7f30d1
BLAKE2b-256 5eb36c20fee157679349d0e3887e7c97f6b1a019f06156c810f51ad61e5dd2e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.6.1-cp311-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 1546276eea467b586e19228dd611ac0c8fec018eb8b3e0067ed80b09b136c263
MD5 ebd7b60e2fea65078c4093c471ed4d0b
BLAKE2b-256 40b0bbbadaeafda867246702645e4e9624d6b922deff1b25d47f1ce69f6c79f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.6.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2e00639a5b8f6fc48b5df1d0312881a992e33125ed52ae546e976e9e1a62f696
MD5 cf5201854083fb226b8cec5b02a625da
BLAKE2b-256 c73f12f07502b7ca22a2391f1e7c6ebbac62f5cf6ebeffa01eec896002f0ace7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.6.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 233f9a5d0d2368e526a1dba8caff33b38b7df926bdadd7e59ef1ece48a48df3f
MD5 58de7f51652fc339cd2fd45135ab9540
BLAKE2b-256 9578ee85e2ab5a67f0684c631be3a0e33503207fb3efacb155452babfed7225a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.6.1-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6c52b4be9726a52c21ece217ac78d86bcdf623919c2ccfdaf8fa91176b8ad878
MD5 c991573ff509d01527edb548db571cd2
BLAKE2b-256 9a0c7bff0794c0fe5c5249d9610e88373a82b37ec85d4208f570f6f11b86e19b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.6.1-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1c5de804df9532ebb7ae619c60878aec6516c2823558c6e3c644970beb989bea
MD5 8747da0263b97b2c398d9589799d8b1e
BLAKE2b-256 06b3c7c5a74c862343d8dcb990310ab3825c8c00aec5c250d97473a03d0cec5e

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