CLI Applications Overview
This section documents the sample command-line interface (CLI) applications provided by dcmspec.
These sample CLI applications enable extraction, parsing, and processing of specification tables and related data from the DICOM standard and IHE documents. Each CLI script is located in the src/dcmspec/cli/
folder and can be run as a standalone application.
- modattributes (Module Attributes tables from Part 3)
- iodattributes (Complete set of attributes for a given IOD from Part 3)
- iodmodules (IOD Module tables from Part 3)
- dataelements (Data Elements from Part 6)
- uidvalues (Unique Identifiers (UIDs) from Part 6)
- upsdimseattributes (UPS DIMSE Service Attribute tables from Part 4)
- upsioddimseattributes (UPS IOD attributes from Part 3 and Part 4)
- tdwiimoddefinition (TDW-II UPS Scheduled Info Base table from the IHE-RO Supplement)
How to Run
CLI scripts can be executed using one of the following methods:
- With Poetry:
poetry run python -m src.dcmspec.cli.<script_name> --help
- Directly (if installed as a script):
poetry run <script_name> --help
- With Python (after setting PYTHONPATH):
export PYTHONPATH=$(pwd)/src python -m dcmspec.cli.<script_name> --help
Example
To parse the Patient Module Attributes Table:
poetry run python -m src.dcmspec.cli.modattributes table_C.7-1