Create and evaluate boolean expressions against DICOM datasets
Project description
DICOM Criterion
A Python library for creating and evaluating boolean expressions against DICOM datasets. Build flexible validation rules using intuitive syntax to filter, validate, and process medical imaging data.
Quick Start
from pydicom import Dataset
from dicomcriterion import Criterion
# Create a sample DICOM dataset
dataset = Dataset()
dataset.PatientName = "John Doe"
dataset.StudyDescription = "Brain MRI with contrast"
dataset.Modality = "MR"
# Create validation criteria
criterion = Criterion("PatientName.equals('John Doe') and StudyDescription.contains('MRI')")
# Evaluate against dataset
result = criterion.evaluate(dataset) # Returns True
Key Features
- Simple syntax: Write validation rules using natural boolean expressions
- Built-in functions:
equals(),contains(),exists()for common validations - Boolean operators: Combine rules with
and,or,not, and parentheses - Extensible: Add custom validation functions for specialized requirements
Installation
pip install dicom-criterion
Credits
This package was created with the kiro editor.
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dicomcriterion-0.1.0.tar.gz.
File metadata
- Download URL: dicomcriterion-0.1.0.tar.gz
- Upload date:
- Size: 29.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08fb45f4eec0e68f0f68cd35b04540d030ba7563038d8b31280583fe9fb98773
|
|
| MD5 |
3dd8896142ee19c936c329498ac732b5
|
|
| BLAKE2b-256 |
0a6a01efdf6d77f4a7bb683a2b60767b15c0cef3f7ee276f8bf0798332eb0a3a
|
File details
Details for the file dicomcriterion-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dicomcriterion-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
685f3f480b423efaa2cd215930693b07fefc669dd767bf0c488015eb4d6b0273
|
|
| MD5 |
aebf5202105294c670d5aaca32951056
|
|
| BLAKE2b-256 |
191e7252e278be749392868b092ab3535ee84cc915d45f394026a740fcba021a
|