DICOM Agent
v0.1.0Search, retrieve, store, view, measure and de-identify DICOM images over DIMSE and DICOMweb.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_nodes
List the configured DICOM nodes (PACS, VNA, DICOMweb services) and their protocols.
echo
Check connectivity to a node (C-ECHO for DIMSE, a minimal QIDO-RS request for DICOMweb).
| Parameter | Type | Description |
|---|---|---|
node * | string | Name of a configured DICOM node (see list_nodes). |
search
Search for patients, studies, series or instances (C-FIND or QIDO-RS).
| Parameter | Type | Description |
|---|---|---|
node * | string | Name of a configured DICOM node (see list_nodes). |
filters | Matching keys, e.g. {"PatientID": "123", "Modality": "CT", "StudyDate": "20240101-20241231"}. | |
level | string | Query/retrieve level. |
limit | integer | Maximum results to return. |
offset | integer | Results to skip, for paging. |
return_fields | Extra attributes to return besides the level defaults. |
get_metadata
Read instance-level metadata without downloading pixel data (WADO-RS metadata or C-FIND).
| Parameter | Type | Description |
|---|---|---|
node * | string | Name of a configured DICOM node (see list_nodes). |
study_uid * | string | StudyInstanceUID. |
fields | Limit or extend the returned attributes. | |
limit | integer | Maximum instances to return. |
series_uid | SeriesInstanceUID to narrow the request. | |
sop_instance_uid | SOPInstanceUID to narrow the request (requires series_uid). |
retrieve
Download a study, series or instance into the local cache (C-GET or WADO-RS). Returns file paths.
| Parameter | Type | Description |
|---|---|---|
node * | string | Name of a configured DICOM node (see list_nodes). |
study_uid * | string | StudyInstanceUID. |
series_uid | SeriesInstanceUID to narrow the request. | |
sop_instance_uid | SOPInstanceUID to narrow the request (requires series_uid). |
move
Ask a DIMSE archive to send data to another DICOM node (C-MOVE).
| Parameter | Type | Description |
|---|---|---|
destination * | string | Destination node name or an AE title known to the source archive. |
node * | string | Name of a configured DICOM node (see list_nodes). |
study_uid * | string | StudyInstanceUID. |
series_uid | SeriesInstanceUID to narrow the request. | |
sop_instance_uid | SOPInstanceUID to narrow the request (requires series_uid). |
store
Send local DICOM files to a node (C-STORE or STOW-RS).
| Parameter | Type | Description |
|---|---|---|
node * | string | Name of a configured DICOM node (see list_nodes). |
paths * | array | Local DICOM files or directories inside the allowed paths. |
transfer
Copy data between any two nodes, including DIMSE to DICOMweb, through the local cache.
| Parameter | Type | Description |
|---|---|---|
destination * | string | Node to write to. |
source * | string | Node to read from. |
study_uid * | string | StudyInstanceUID. |
series_uid | SeriesInstanceUID to narrow the request. | |
sop_instance_uid | SOPInstanceUID to narrow the request (requires series_uid). |
list_local_files
List DICOM files in the local cache.
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
study_uid | Only list files for this study. |
read_local_metadata
Read the full header of a local DICOM file. Pixel data is not loaded.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path to a local DICOM file inside the allowed paths. |
max_depth | integer | How deep to expand sequences. |
render_image
Render one frame of a local DICOM image as a PNG you can look at. Applies the modality rescale (e.g. HU) and a display window, corrects non-square pixels, and reports which patient direction each image edge faces. Also returns the input fingerprint.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path to a local DICOM file inside the allowed paths (e.g. from retrieve). |
frame | integer | 0-based frame index for multi-frame images. |
max_size | integer | Longest edge of the PNG in pixels. |
window | string | Display window: auto (file window or percentiles), minmax, or a CT preset: lung, mediastinum, soft_tissue, abdomen, liver, bone, brain, subdural, stroke. |
window_center | Explicit window center (overrides window). | |
window_width | Explicit window width (overrides window). |
pixel_statistics
Pixel value statistics in modality units (HU for CT): mean, std, min, max, percentiles and area in mm2.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path to a local DICOM file inside the allowed paths (e.g. from retrieve). |
frame | integer | 0-based frame index for multi-frame images. |
roi | Region of interest; omit for the whole frame. |
measure_distance
Measure a distance in mm between two pixel positions and give their patient coordinates.
| Parameter | Type | Description |
|---|---|---|
end * | array | [row, column] in pixels. |
path * | string | Path to a local DICOM file inside the allowed paths (e.g. from retrieve). |
start * | array | [row, column] in pixels. |
frame | integer | 0-based frame index for multi-frame images. |
check_geometry
Check series geometry before measuring or reconstructing. Reports orientation, spacing and extent per series, and flags missing or duplicate slices, mixed orientations, non-uniform spacing, gantry tilt and multiple frames of reference.
| Parameter | Type | Description |
|---|---|---|
paths * | array | Local DICOM files or directories inside the allowed paths. |
render_mpr
Reconstruct an axial, coronal or sagittal view from a stack of slices and render it as a PNG. Refuses series that fail check_geometry (missing slices, mixed orientations, and so on).
| Parameter | Type | Description |
|---|---|---|
paths * | array | Local DICOM files or directories inside the allowed paths. |
index | Slice index in the reconstructed plane; default is the middle. | |
max_size | integer | Longest edge of the PNG in pixels. |
plane | string | Plane to reconstruct. |
series_uid | Series to use when the paths contain several. | |
window | string | Display window: auto (file window or percentiles), minmax, or a CT preset: lung, mediastinum, soft_tissue, abdomen, liver, bone, brain, subdural, stroke. |
window_center | Explicit window center. | |
window_width | Explicit window width. |
deidentify
Write de-identified copies of local DICOM files (basic confidentiality profile subset) to the cache. UIDs are remapped consistently, names and IDs are pseudonymised, and pixel data is not changed.
| Parameter | Type | Description |
|---|---|---|
paths * | array | Local DICOM files or directories inside the allowed paths. |
date_mode | string | Shift dates by a per-patient offset, or keep them. |
keep_descriptions | boolean | Keep study/series descriptions and protocol names. |
keep_private | boolean | Keep private tags. |