imaging_api.routers.imaging =========================== .. py:module:: imaging_api.routers.imaging Attributes ---------- .. autoapisummary:: imaging_api.routers.imaging.router imaging_api.routers.imaging.XNATAuthHeaders Functions --------- .. autoapisummary:: imaging_api.routers.imaging.ping_pacs_endpoint imaging_api.routers.imaging.query_by_accession_number_endpoint imaging_api.routers.imaging.queue_image_import_request_endpoint Module Contents --------------- .. py:data:: router .. py:data:: XNATAuthHeaders .. py:function:: ping_pacs_endpoint(pacs_id: int, headers: XNATAuthHeaders) -> imaging_api.routers.schemas.PacsStatus Pings the imaging provider (PACS) to check if it is reachable. :param pacs_id: PACS ID to ping. :type pacs_id: int :param headers: XNAT authentication headers. :type headers: XNATAuthHeaders :returns: Status of the PACS system. :rtype: PacsStatus :raises HTTPException: If PACS is not found or if there is an error during the ping operation. .. py:function:: 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. :param accession_number: Accession number for the study. :type accession_number: str :param headers: XNAT authentication headers. :type headers: XNATAuthHeaders :returns: List of studies associated with the provided accession number. :rtype: list[Study] :raises HTTPException: If no studies are found for the given accession number or if there is an error during the query. .. py:function:: 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. :param import_request: Import request containing the project ID and list of studies. :type import_request: ImportStudyRequest :param headers: XNAT authentication headers. :type headers: XNATAuthHeaders :returns: List of import responses for the queued studies. :rtype: list[ImportStudyResponse] :raises HTTPException: If there is an error during the queuing of the image import request or if the request cannot be :raises processed.: