Skip to main content

Create and evaluate boolean expressions against DICOM datasets

Project description

DICOM Criterion

CI PyPI PyPI - Python Version Code style: black Checked with mypy

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dicomcriterion-0.1.0.tar.gz (29.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dicomcriterion-0.1.0-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

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

Hashes for dicomcriterion-0.1.0.tar.gz
Algorithm Hash digest
SHA256 08fb45f4eec0e68f0f68cd35b04540d030ba7563038d8b31280583fe9fb98773
MD5 3dd8896142ee19c936c329498ac732b5
BLAKE2b-256 0a6a01efdf6d77f4a7bb683a2b60767b15c0cef3f7ee276f8bf0798332eb0a3a

See more details on using hashes here.

File details

Details for the file dicomcriterion-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dicomcriterion-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 685f3f480b423efaa2cd215930693b07fefc669dd767bf0c488015eb4d6b0273
MD5 aebf5202105294c670d5aaca32951056
BLAKE2b-256 191e7252e278be749392868b092ab3535ee84cc915d45f394026a740fcba021a

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