Uploading the Dicoms

BASE URL will be the API service hostname and each request to the Qure.ai app is expected to carry a bearer TOKEN. Qure will provide both of these.

Use the following sample script to upload Dicoms to the service.

Python
import requests
from requests_toolbelt.multipart.encoder import MultipartEncoder
file_paths = ['dicom-file1.dcm', 'dicom-file2.dcm']
m = MultipartEncoder({
    file_path: (file_path, open(file_path, 'rb'), 'application/dicom')
    for file_path in file_paths
})
content_type = 'multipart/related; type=application/dicom; boundary={}'\
.format(m.boundary_value)

# Make the HTTP POST request to the service
r = requests.post(
    url=URL, data=m,
    headers={'Content-Type': content_type,
             'Authorization': 'Token {}'.format(TOKEN)})

Uploading Dicoms to the Service

POST http://BASE URL + studies

Use the URL to make a POST call with the multipart encoded payload.

Path Parameters

NameTypeDescription

file_paths*

String

Represents the file location.

URL*

String

The URL pointing to the service.

Headers

NameTypeDescription

Authorization*

String

Bearer token.

Content-Type*

String

Request Body

NameTypeDescription

data*

String

Json
{
    "message": "Success",
    "series_instance_uids": ["SERIES_INSTANCE_UID_1", "SERIES_INSTANCE_UID_2",],
    "detailed_info":[
        {
            "SeriesInstanceUID": "SERIES_INSTANCE_UID 1",
            "NumberOfSeriesRelatedInstances": "INTEGER"
        },
        {
            "SeriesInstanceUID": "SERIES_INSTANCE_UID 2",
            "NumberOfSeriesRelatedInstances": "INTEGER"
        }      

    ]
}

For large data, it is recommended to perform batch uploads. Please ensure that the payload size of each request does not exceed 100 MB.

Response Attribute

AttributeValue typeDescriptionSample Value
message

String

It validates the post call action based on the response status code.

"message": "Success"
series_instance_uids

Integer

It is a unique identifier given for a series of Dicom images.

"series_instance_uids": [
    "1.2.826.0.1.3680043.8.498.83895378777916398722746509596078492186"
detailed_info

String

It is an object which contains a set of Dicom images.

-

NumberOfSeriesRelatedInstances

Integer

It is the number of series instance UID's that belong to a set of series.

"NumberOfSeriesRelatedInstances": 50
authenticated

Boolean

It validates the token validity.

"authenticated": false

Last updated