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

Uploaded CPython 3.11+Windows x86-64

fw_file_rs-0.5.2-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.2-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.2-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.2-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.2-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.2-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.2.tar.gz.

File metadata

  • Download URL: fw_file_rs-0.5.2.tar.gz
  • Upload date:
  • Size: 162.8 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.2.tar.gz
Algorithm Hash digest
SHA256 41101b24cc8ff2813f83d55ff61d319583411d50c919a1ba6eb4d53aaa41681e
MD5 469801d05264e4d3bf70d6cfaa96fcd5
BLAKE2b-256 4f6ec3747515b349fb9a597378009d76db87a49e61003699d4e21a882d7966d6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fw_file_rs-0.5.2-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.2-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a462446bdc3e1ec99ede1b3f721d5ea5256ddeff587696bbd7f29c99545f06c7
MD5 7c496a2d5c7f1df8d9a24de3f83267d8
BLAKE2b-256 fef969389152184517f6cedc4a45debeccb5b4d8578b0adedda0cda8e961d878

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.5.2-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 09988b46e3cb5d303180bd4f13c5decaa9f5c1c7d5bbfa03b79532a4f929c343
MD5 abbb72d217614dc495581436911e1df3
BLAKE2b-256 6d70231bea277e2e99d90a8444fcb3127b91f309647977a68d83ef4478d94f25

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.5.2-cp311-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 b9314bb2d9c4e5540177d4d5d24b3e55f569171895a05e62f74a3238dee86866
MD5 975c3e585bfe9a55fb40c65fc77fca47
BLAKE2b-256 21ba2bfb88d9a5fda89db1c38816b455fc4a49beb8a795f78ace3d74afc1e2a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.5.2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a281daea487a5ae52b72b92733bbbb226578cae04aff42366554f870b81dee8e
MD5 0065dc8c5b12efd5a7044076bcfd60c2
BLAKE2b-256 2ceb8ee550a3adbc817e9bc6d6cc2442f1d2b0dd2e0f0ada91596ac2b67429d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.5.2-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9c628ae1ce4a5dfe05f8c905eb3d532a2468dbcf7e9b47a74c496b78ae492588
MD5 9f9c14ef76e74be557bae56511b96564
BLAKE2b-256 5b6d5c42ab40c5435fc404feb6d53a41b947d61a802f8e69617ea42b418dd7c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.5.2-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4561f149672f501258fab78850d1a8b3ac4757726bc027f1defe278f366b7212
MD5 a7fdc5a87ef2f0ade10a6ddbf12e1a54
BLAKE2b-256 bd4da7b03d4a9dfb0ba3c1786a9b3f2b4ac7d1307a3a0b2e8f1a97df1feed784

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.5.2-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 55e3fbb4fec701be4e9eb4428bfa1058f833999c46bccef0639c4c2d5c69ca07
MD5 9ac17348bc4042609164da2a67c3b6c4
BLAKE2b-256 e3e06763d43c05fb6446271804fe5347ad008e8767ed91e364eee710b773eab8

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