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

Uploaded CPython 3.11+Windows x86-64

fw_file_rs-0.3.17-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.17-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.17-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.17-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.17-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.17-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.17.tar.gz.

File metadata

  • Download URL: fw_file_rs-0.3.17.tar.gz
  • Upload date:
  • Size: 151.1 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.17.tar.gz
Algorithm Hash digest
SHA256 0fe90f1b07b15a4da2014cb1fdee56bbddd72651bcf1bce711f3d04194020171
MD5 4e35a498aa116a28e7d12c15bc52fd4c
BLAKE2b-256 7e83295c3b2ebff11335a792441b84e3b9943b4d74ca2517e2dcf3278e33efb6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fw_file_rs-0.3.17-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.17-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 edf028b21aacbcda994a6e255439af8759a5c20d244794d2e2eaab4d43609783
MD5 dbcf9375e30dddb094de1c60e188a23e
BLAKE2b-256 e06dd4a8dfda3d41b0e0e14f8539700cb7e09b57493af80ef65ba074eda009b1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.3.17-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b7b726351a288b46a59df580be7065afcf09e543c9c16bbbbdc045f5d8fb9c82
MD5 54bbc8613e80a1ad68e997fed191b538
BLAKE2b-256 4653dc561b9b8819596ee8f37fa6f0b5c7ab8c28373a6f008aa80d09370b9366

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.3.17-cp311-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 e5f25fdf5bb3831c986234cfda0858e28012aa9ca41c5a24cb104813910c6a59
MD5 3ca9648d84252e63ea6235923d15a2da
BLAKE2b-256 da912ef5b901f66fec231184fae11c4a5015a7a13e2eee2338d6611704114786

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.3.17-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3975f20a82ca1a903d6818eaf8df6d26e0022a07ab19ae2d7fb5345bf1c764bc
MD5 a4a9ba535834aba2cd8b884d89b4aa7f
BLAKE2b-256 e238173e986a8b497a99076ac59bce4697628aaf982bad190695619c4574de93

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.3.17-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 bc1cf1c69a56a9ac6864156f2a498123b7b8c07b62aa7f506006fec45c40d678
MD5 c774ed4f0c56b666d34f6635b4186a65
BLAKE2b-256 02bf0a495eba10e6c3e0a237ee93674226e258b9de8d49dbb752a6c1f62c1db9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.3.17-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 497896c2fcf58ff78a250b48c7f2cd48fa21298003950a7193df386ba93eb149
MD5 f18e710c2231dfd1d6a3f208bf392679
BLAKE2b-256 09b748e5463f4e44f00f9b4e9824976a677aec9ccf8ed6121aca19bd318e711a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.3.17-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 fd9e6b87c055beccdfeb8a0e27d5d9442eac6a624327f91aa5f4b879a66ec430
MD5 5df257aacfe840cc15b409ae77e12611
BLAKE2b-256 aa53375dd163aa9aa0ad5c7c1aac0d9653f0f00213e122bb0d870e8826a43037

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