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

Uploaded CPython 3.11+Windows x86-64

fw_file_rs-0.5.0-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.0-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.0-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.0-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.0-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.0-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.0.tar.gz.

File metadata

  • Download URL: fw_file_rs-0.5.0.tar.gz
  • Upload date:
  • Size: 161.1 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.0.tar.gz
Algorithm Hash digest
SHA256 a567e0a92eb1fd579e20148b13c11877f3fc43082875f50fbb011b60becce367
MD5 2452814f9eff324180e5dde757366b51
BLAKE2b-256 086df40d92652acc9ec07f8fd0ec2129019f1aaba9dc1f9703ca7e2964e41af5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fw_file_rs-0.5.0-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.0-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d9340af17b792f5470f562194407267da2aca4e6400ff3e41bb1c6da0befe248
MD5 ba5a51b882747309078dc116a328c8e8
BLAKE2b-256 edce19009474756237c03e7b78acac1110e16057206046f2eb90a0c8981ce1e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.5.0-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 adef3ba2d313e264ea03d21e93339fc2eec225784ad11707665fff2da5d41802
MD5 879bd14ba8a2eda9973f60591eb755a5
BLAKE2b-256 1e4ce8895d37886fdc0bbcb5e82926a286c452360a3dc8b1fa08e60640fce1b7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.5.0-cp311-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 0ac972f866d4b3254725039fc5c54cbf3e9f61b5ef749369fbfa3a902beab4df
MD5 112ac83c42fe351954f3548f496ca9e1
BLAKE2b-256 d757fb846f66f42b383ec33bf6028e89a78f4a26c78579430544095fc7ccd14d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.5.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 357c341c527143150c48e2acc2deaccc401654e1db220eddd1891567f020b063
MD5 55a1f31df6a85909c57b370f5c7b8e26
BLAKE2b-256 6c8e8575a4e34c61dc1f36e1351272f3178ff2a4cf50e16c321aec41fb26316e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.5.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f2d23fffda960248df2e2ca6b4a926f4cfef9b7439afd11693882106dd47856f
MD5 36432c71ea7ec60af4e9c65d134b8d4e
BLAKE2b-256 7387c1374a0c3377237110a88503555015299b7f1f8f38531394bed0c42996a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.5.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 61fa2c67dcf37fad89a6459503066c851abe6431091b648849b382f522d27030
MD5 d626741f23198d88f4f3e1dcd6089c53
BLAKE2b-256 0b9fead2a49b90f1c796d1e6c7658dcc20a18a209eb8db99b14017bac0592c65

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fw_file_rs-0.5.0-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 54cf757836cfcf79e49774e23baa299aeb7a5cdb800bae80fa698c499f081a24
MD5 25871756ce77ac9e9e97dcb818e45dd8
BLAKE2b-256 98f3805ed35e38354915af2c1c991110c623d657e4dfef3ac26bcbc069308c16

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