Search
⌃K
Links

Algorithm integration with CARPL

Algorithm integration with CARPL

Method of integration:

Docker – You provide us docker of algorithm which we will host alongside with CARPL and integrate it for you.
APIs – Provide API endpoints to algorithm to upload data and fetch results.
Follow the steps to integrate any algorithm with CARPL using APIs
  1. 1.
    Log in to CARPL with your registered email id and go to Algorithms section present on the left panel of the window
  2. 2.
    Click on ADD ALGORITHM on the right top corner of the window
  3. 3.
    Fill the details
    3.1. Name: Name of the algorithm
    3.2. Description: Description of the algorithm
    3.3. Choose Modality: Modality of input data to the algorithm
    3.4. Choose Body Part: Body part for which the algorithm is designed
    3.5. Findings: Findings on the abnormalities/ AI output given by the algorithm
    3.6: Description Image: Image of the AI output for reference
  4. 4.
    API Details: A dictionary with API details to upload dataset and receive results. Refer to API Details section
  5. 5.
    Algorithm Configuration: A dictionary with algorithm’s inferencing details. Refer to Algorithm Configuration section
  6. 6.
    Sample file: Input a sample file for algorithm which carpl will check for compatibility between CARPL and algorithm.
  7. 7.
    Click on submit

API Details (Upload API):

API details is a dictionary with the following keys:
  1. 1.
    endpoint: API endpoint URL
  2. 2.
    type: Type of Request- POST
  3. 3.
    Headers: Additional information to connect client and server. For eg- Bearer token for authorization
FetchAPI:
  1. 1.
    endpoint: API URL to retrieve results with studyIUID
  2. 2.
    type: type of request- GET
  3. 3.
    Headers: Additional information to connect client and server. For eg- Bearer token for authorization
FetchAPIRoi:
  1. 1.
    endpoint: API URL to fetch ROI json
  2. 2.
    type: type of request- GET
  3. 3.
    Headers: Additional information to connect client and server. For eg- Bearer token for authorization
An example API Details dictionary is shown below

Algorithm Configuration

Algorithm Configuration is a dictionary with the following keys
UploadType: format of the files to be uploaded (DICOM/TAR.GZ)
EnforceSeriesDescription: dictionary to enforce Series description condition on the uploaded file. Only when the keywords are matched with uploaded files’ Series Description, the file will be processed through the algorithm. Following keys are used:
  • Status: true/false. If true, series description condition will be enforced
  • Keywords: list of keywords of series description to enforce. For eg- T1,T2(for MRI)
PostProcessing: true/false. If the algorithm is not manually integrated, put this value to falseAlgorithmOutputs: Dictionary containing output type(s)
  • rois: true/false
ProcessingTime: Time (in seconds) after which the next processing request should be sentMaxRetries: Max number of times a case should be rerun on the algorithm before giving it a FAIL status.An example is shown below

Output of the Algorithm

Outputs can be of three types:

1. Findings:

Probability associated with the finding in JSON format. The output of the algorithm is expected to be in json format with list of dictionaries. Below is a sample of standard output.Below is a sample of standard output.
Output: Findings

2. ROI:

region of interest in the DICOM files in JSON format.
  1. 1.
    Type: (string) “rectangle” or “freehand”. Whether the ROI points in the “points” key are for rectangle or freehand.
  2. 2.
    Points: (list of list). If “type” is rectangle, then it should be a list of [x,y] points representing left top point and right bottom points. If “type” is freehand, then it should be a list of all [x,y] points.
  3. 3.
    StudyInstanceUID: (string) StudyInstanceUID of the case
  4. 4.
    SeriesInstanceUID: (string) SeriesInstanceUID of the case
  5. 5.
    SOPInstanceUID: (string) SOPInstanceUID of the case
  6. 6.
    Finding_name: (string) finding corresponding to the ROI
Output : ROI

3. Secondary capture :

Heatmap of findings on the DICOM file format.