Validate dicom archive on a set of hardcoded and user-specified rules
Project description
DICOM QC gear
This gear evaluates basic QC rules against a dicom archive.
Currently implemented rules are as follows:
- jsonschema_validation
- check_0_byte
- check_series_consistency
- check_instance_number_uniqueness
- check_embedded_localizer
- check_bed_moving
- check_slice_consistency
Inputs
dicom
(required): Dicom archive.validation-schema
(requried): jsonschema template for validating header.
Configuration
debug
: Log debug statements (defaultFalse
).check_0_byte
: Run check_0_byte rule (defaultTrue
).check_series_consistency
: Run check_series_consistency rule (defaultTrue
).check_instance_number_uniqueness
: Run check_instance_number_uniqueness rule (defaultTrue
).check_embedded_localizer
: Run check_embedded_localizer rule (defaultTrue
).check_bed_moving
: Run check_bed_moving rule (defaultTrue
).check_slice_consistency
: Run check_slice_consistency rule (defaultTrue
).check_dciodvfy
: Run thedciodvfy
(DICOM IOD Verify) binary (defualtTrue
).tag
: The tag to be added on input file upon run completion (defaultdicom-qc
).
Outputs
No outputs, but populates the file.info.qc.dicom-qc
namespace with the following
format:
file.info.qc:
dicom-qc:
bed_moving:
description: <explanation>
state: pass | fail
check_0_byte:
description: <explanation>
state: pass | fail
embedded_localizer:
description: <explanation>
state: pass | fail
filename: <dicom>
gear_info: # See qc namespace standards
instance_number_uniqueness:
description: <explanation>
state: pass | fail
jsonschema_validation:
- error_context: <context>
error_message: <message>
error_type: <type>
error_value:
- <val1>
- <val2>
item: file.info.header.dicom
series_consistency:
description: <explanation>
state: pass | fail
slice_consistency:
description: <explanation>
state: pass | fail
Rules
jsonschema_validation
This rule runs custom provided jsonschema validation against file.info.header.
See examples/README.md for examples.
check_0_byte
This rule checks each file in the archive to make sure it is not 0-bytes.
check_series_consistency
This rule checks to make sure there is only one series in the archive
(determined by SeriesInstanceUID
)
check_instance_number_uniqueness
This rule checks to make sure there aren't any duplicate InstanceNumber
values.
check_embedded_localizer
This rule checks the archive for an embedded localizer frame using the algorithm in splitter.
check_bed_moving
This rule evaluates whether the bed was moving during the entirety of a scan
(determined by ImagePositionPatient
).
check_slice_consistency
This rules checks whether the intervals between slice positions are consistent.
If the SliceLocation
tag is present on all files in the archive, this will be used.
If not, the slice location will be calculated from ImagePositionPatient
and
ImageOrientationPatient
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for fw_gear_dicom_qc-0.4.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 224335c990106b1167018abf8dcd7c13fff3d5a8169b55bc299af86e66cc5a93 |
|
MD5 | 42880954946b9bf99c4ad2caa597373f |
|
BLAKE2b-256 | 1506e6d809fa8d2b529b147d200ab05a09b4028808ad4dd1671b31feaeed4a54 |