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 new file mode 100644 index 000000000..790f30638 --- /dev/null +++ b/docs/Debug.md @@ -0,0 +1,93 @@ +# 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 + +### Prerequisites + +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 + +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 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 0020,000D= \ + -k 0020,000E= \ + -k 0008,0018= + -od ./received_files + ``` + +--- + +### Notes + +- Replace ``, ``, ``, ``, ``, and `` with the appropriate values for your setup. +- 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. + +--- + +### 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.