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

Uploaded CPython 3.11+Windows x86-64

fw_file_rs-0.6.0-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.0-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.0-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.0-cp311-abi3-macosx_10_12_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

fw_file_rs-0.6.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

fw_file_rs-0.6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

File details

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

File metadata

  • Download URL: fw_file_rs-0.6.0.tar.gz
  • Upload date:
  • Size: 164.5 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.0.tar.gz
Algorithm Hash digest
SHA256 deb20e2607f145f7c53b7ff4b2d6ef9704d2864085199bf0407fea7af583f607
MD5 f649bc7e53a047a4030ec9ebe0745d11
BLAKE2b-256 9723b278591da0dc08b0fa2ac10616922f45fdb319fd37e3395086a95b889e73

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fw_file_rs-0.6.0-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.0-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a090065e366af847c81484c06757ebd193ac892313169c653e8e8d6ba9d9bd47
MD5 8bf787312589a21c7c9d2cbfa306be9c
BLAKE2b-256 0409a1d12091a5881e07ca9a85fdbe5482c4add27b3dd6b2512f35d5fe83ccca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.6.0-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 15e7a4f81fa68a54e1bf7260db5b7d6beafc54df67a952afa7629fc35049da34
MD5 6c2b145691cbf6c41d57918d6cbd5513
BLAKE2b-256 fd9e6a6b177263b5739084450e18cda3c30ba19f64aba395cd243de8b01af5ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.6.0-cp311-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 270a4ee661b5bd2ddada6bd4f22cf3232ce5a2e25fbf425cf45f3600e3a315f4
MD5 8b0c5cb7106b206b1de42df06ed7ab36
BLAKE2b-256 930c79be03de7f86f401674ead6e4b5d603a09184042c481d484ad36aa3e4718

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.6.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a0ef249e01508796cadbd7584f8f27337046a91b08e20848ba3b0371eca946d5
MD5 0e0b47ccf2556885440c45c7ea612390
BLAKE2b-256 b0b2b4517b18d9e209b040165c1ccc6b9d6b923332a0bcf7bc1e2aa89da82033

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.6.0-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 944315f49592baae537db85ebf2e04856172d69c9c2f9130e32b187addbcf58e
MD5 02dcf183956e473ca1356d8b11e69aea
BLAKE2b-256 2b7b8a96195c7ce265fb9d1a4b09ae523c8a7c87cedbc667236dbae711308ea7

See more details on using hashes here.

File details

Details for the file fw_file_rs-0.6.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fw_file_rs-0.6.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a8cdc6918399d6fdc72083fb27312a4e67b45c614876b018e6be5b173517813c
MD5 ae714f2a9d7011700665bbdb42e53657
BLAKE2b-256 2eead2456a19ff820812bb4f2b392ca9bf2f70fe9470cbbc1817274a95ca5d92

See more details on using hashes here.

File details

Details for the file fw_file_rs-0.6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fw_file_rs-0.6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 cb0296506048a77eed6177c5e2b68e5ad17c829d2db73ee130623ff1149974ae
MD5 f2d1215ffc1f26496aa299bc04d58b2a
BLAKE2b-256 0e3726c8ed52da0e35280b07bb9d9b3e67b4d7bfacee293c7659cf8a67c9d73d

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