imaging_api.routers.imaging
Attributes
Functions
|
Pings the imaging provider (PACS) to check if it is reachable. |
Queries the imaging provider (PACS) to retrieve a list of studies associated with the provided accession number. |
|
Queues a job within the imaging provider (PACS) to import the images from the image store. |
Module Contents
- imaging_api.routers.imaging.router
- imaging_api.routers.imaging.XNATAuthHeaders
- imaging_api.routers.imaging.ping_pacs_endpoint(pacs_id: int, headers: XNATAuthHeaders) imaging_api.routers.schemas.PacsStatus
Pings the imaging provider (PACS) to check if it is reachable.
- Parameters:
pacs_id (int) – PACS ID to ping.
headers (XNATAuthHeaders) – XNAT authentication headers.
- Returns:
Status of the PACS system.
- Return type:
- Raises:
HTTPException – If PACS is not found or if there is an error during the ping operation.
- imaging_api.routers.imaging.query_by_accession_number_endpoint(accession_number: str, headers: XNATAuthHeaders) list[imaging_api.routers.schemas.Study]
Queries the imaging provider (PACS) to retrieve a list of studies associated with the provided accession number.
- Parameters:
accession_number (str) – Accession number for the study.
headers (XNATAuthHeaders) – XNAT authentication headers.
- Returns:
List of studies associated with the provided accession number.
- Return type:
list[Study]
- Raises:
HTTPException – If no studies are found for the given accession number or if there is an error during the query.
- imaging_api.routers.imaging.queue_image_import_request_endpoint(import_request: imaging_api.routers.schemas.ImportStudyRequest, headers: XNATAuthHeaders) list[imaging_api.routers.schemas.ImportStudyResponse]
Queues a job within the imaging provider (PACS) to import the images from the image store.
- Parameters:
import_request (ImportStudyRequest) – Import request containing the project ID and list of studies.
headers (XNATAuthHeaders) – XNAT authentication headers.
- Returns:
List of import responses for the queued studies.
- Return type:
list[ImportStudyResponse]
- Raises:
HTTPException – If there is an error during the queuing of the image import request or if the request cannot be
processed. –