From c0ecde29d8451511d88d368a4278d01ab9a1d77f Mon Sep 17 00:00:00 2001 From: Sumantra Sharma Date: Wed, 9 Jul 2025 11:56:41 +0000 Subject: [PATCH 1/4] adding dcmtk debug readme --- docs/Debug.md | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 docs/Debug.md diff --git a/docs/Debug.md b/docs/Debug.md new file mode 100644 index 000000000..476089d3e --- /dev/null +++ b/docs/Debug.md @@ -0,0 +1,75 @@ +# DCMTK Debugging Guide + +This document provides a generic guide for debugging DICOM operations using DCMTK tools. Currently, it includes instructions for performing C-GET operations. + +--- + +## Debugging DICOM Operations with DCMTK + +### C-GET Operations + +The C-GET operation allows you to retrieve DICOM studies or images from a PACS server. Follow the steps below to perform and debug C-GET operations: + +### Steps + +1. **SSH into the Server Running ADIT**: + + - Connect to the server running ADIT, which is linked to the PACS server, using the following command: + + ```bash + ssh @ + ``` + + - Ensure you have access to the PACS server and know its IP address, port, and AE title. + +2. **Retrieve a Study Using C-GET**: + + - Use the following command to retrieve a study: + + ```bash + getscu -v -aet -aec \ + -k 0008,0052=STUDY \ + -k 0020,000D= \ + -od ./received_files + ``` + +3. **Retrieve a Specific Image**: + + - Use this command to retrieve a specific image: + + ```bash + getscu -v -aet -aec \ + -k 0008,0052=IMAGE \ + -k 0008,0018= \ + -od ./received_files + ``` + +--- + +### Notes + +- Replace ``, ``, ``, ``, ``, and `` with the appropriate values for your setup. +- Ensure the `getscu` tool from DCMTK is installed and properly configured on your system. +- Use the `-v` flag for verbose output to help debug issues during the operation. +- The `-od` option specifies the output directory where the retrieved files will be saved. + +--- + +### Troubleshooting + +- **Connection Issues**: + + - Verify the PACS server's IP address and port are correct. + - Ensure the AE titles match the configuration on the PACS server. + +- **Failed Sub-operations**: + + - Check the verbose output for details about failed sub-operations. + - Inspect the PACS server logs for additional information. + +- **Invalid Query Parameters**: + - Ensure the DICOM tags used in the query (`0008,0052`, `0020,000D`, `0008,0018`) are correct and match the PACS server's expectations. + +--- + +This guide will be expanded to include other DCMTK tools and operations in the future. From 323ff9d8ff17100f919e2a947cbfadde60c3982e Mon Sep 17 00:00:00 2001 From: Sumantra Sharma Date: Wed, 9 Jul 2025 14:47:14 +0000 Subject: [PATCH 2/4] docker, readme update --- Dockerfile | 1 + docs/Debug.md | 24 +++++++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1b33ff5b1..68df70ce9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,6 +21,7 @@ RUN apt-get update \ && apt-get install --no-install-recommends -y \ postgresql-client-17 \ p7zip-full \ + dcmtk \ && rm -rf /var/lib/apt/lists/* COPY --from=ghcr.io/astral-sh/uv:0.7.8 /uv /uvx /bin/ diff --git a/docs/Debug.md b/docs/Debug.md index 476089d3e..bfdc2bfb2 100644 --- a/docs/Debug.md +++ b/docs/Debug.md @@ -6,6 +6,10 @@ This document provides a generic guide for debugging DICOM operations using DCMT ## Debugging DICOM Operations with DCMTK +### Prerequisites + +DCMTK is pre-installed in the `adit_prod_web` container and available on the command line. You can use DCMTK tools like `getscu` directly from the terminal after logging into the terminal + ### C-GET Operations The C-GET operation allows you to retrieve DICOM studies or images from a PACS server. Follow the steps below to perform and debug C-GET operations: @@ -33,14 +37,28 @@ The C-GET operation allows you to retrieve DICOM studies or images from a PACS s -od ./received_files ``` -3. **Retrieve a Specific Image**: +3. **Retrieve a specfic Series Using C-GET**: + + - Use the following command to retrieve a study: + + ```bash + getscu -v -aet -aec \ + -k 0008,0052=SERIES \ + -k 0020,000D= \ + -k 0020,000E= \ + -od ./received_files + ``` + +4. **Retrieve a Specific Image**: - Use this command to retrieve a specific image: ```bash getscu -v -aet -aec \ -k 0008,0052=IMAGE \ - -k 0008,0018= \ + -k 0020,000D= \ + -k 0020,000E= \ + -k 0008,0018= -od ./received_files ``` @@ -49,7 +67,7 @@ The C-GET operation allows you to retrieve DICOM studies or images from a PACS s ### Notes - Replace ``, ``, ``, ``, ``, and `` with the appropriate values for your setup. -- Ensure the `getscu` tool from DCMTK is installed and properly configured on your system. +- DCMTK tools like `getscu` are pre-installed and ready to use in the container. - Use the `-v` flag for verbose output to help debug issues during the operation. - The `-od` option specifies the output directory where the retrieved files will be saved. From d30e0c3a525de18ef6f6e867554a1df3867129f7 Mon Sep 17 00:00:00 2001 From: Sumantra Sharma Date: Wed, 9 Jul 2025 20:22:24 +0000 Subject: [PATCH 3/4] typo fix --- docs/Debug.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Debug.md b/docs/Debug.md index bfdc2bfb2..accba5c95 100644 --- a/docs/Debug.md +++ b/docs/Debug.md @@ -58,7 +58,7 @@ The C-GET operation allows you to retrieve DICOM studies or images from a PACS s -k 0008,0052=IMAGE \ -k 0020,000D= \ -k 0020,000E= \ - -k 0008,0018= + -k 0008,0018= -od ./received_files ``` From 209f61ca22e435f904058546708dc7371ebbbcd7 Mon Sep 17 00:00:00 2001 From: Sumantra Sharma Date: Wed, 16 Jul 2025 13:48:58 +0000 Subject: [PATCH 4/4] readme update --- docs/Debug.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Debug.md b/docs/Debug.md index accba5c95..790f30638 100644 --- a/docs/Debug.md +++ b/docs/Debug.md @@ -8,7 +8,7 @@ This document provides a generic guide for debugging DICOM operations using DCMT ### Prerequisites -DCMTK is pre-installed in the `adit_prod_web` container and available on the command line. You can use DCMTK tools like `getscu` directly from the terminal after logging into the terminal +DCMTK is pre-installed in the web service container and available on the command line. You can use DCMTK tools like `getscu` directly from the terminal after accessing the container. ### C-GET Operations