NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
titleContents of this Page

Table of Contents
minLevel2

Naming

  • case_id: Used to uniquely identify an image.
  • execution_id: Used to uniquely identify an algorithm. A case_id can have multiple execution_ids associated with it.
  • subject_id: Used to uniquely idenify a patient. A subject_id can have multiple case_ids associated with it.

/ImageLoader

The /ImageLoader resource is a Node application that extracts image metadata (such as width and height of the image) from the existing whole slide image and stores it in a Mongo database.

HTTP Verb

QueryEndpoint

Query Parameters(Input)

Output(Description)

 POST /submitImage   case_id,

File_location, subject_id

 {“status”: “Success”} on success

Example of /ImageLoader

Code Block
curl -v -F case_id=TCGA-02-0001 -F file_location=@TCGA-02-0001-01Z-00-DX1.83fce43e-42ac-4dcd-b156-2908e75f2e47.svs http://localhost:32799/submitData

...

file_location: Location of the image on file system

/uAIMDataLoader

Node application that converts masks (aperio Aperio and binary masks ) to to GeoJSON objects and stores them in a Mongo database. Need input, output, and command for each.

HTTP Verb

QueryEndpoint

Query Parameters(Input)

Output(Description)

POST

 /submitMaskOrder
 

Case_id,

Execution_id,

Height,

Width,

X,

Y,

Type(optional)

 {“jobId”: 12}

GET

/job/:id  None{“status”:”incomplete”}

 

Example of /uAIMDataLoader

Example curl cURL command (aperioAperio):

Code Block
$ curl localhost:6000/submitMaskOrder -F mask=@1.png -F case_id=cbtc_test_11 -F execution_id=ganesh:test2 -F width=1743 -F height=2017 -F x=0 -F y=0

Example

...

cURL command (binary mask):

 

Code Block
$ curl localhost:6000/submitMaskOrder -F mask=@1.xml -F case_id=cbtc_test_11 -F execution_id=ganesh:test2 -F width=1743 -F height=2017 -F x=0 -F y=0 -F type= maskfile
VariableDefinition
case_idThe unique identifier for the image
execution_idThe name(label) of the algorithm/run
widthwidth of the image/roi
heightheight of the image/roi
xtop left x coordinate of the image/roi (Default: 0)
ytop left y coordinate of the image/roi (Default:  0)

/ImageData

Bindaas APIs for handling Image Metadata. (Internal APIs, not meant to be exposed)

HTTP Verb

QueryEndpoint

Query Parameters(Input)

Output(Description)
Questions
Additional Description

GET

/fileLocation

case_id

Get file location of image
Need explanation
Used by the caMicroscope viewer to give the image location to its backend server.
  /mpp case_id

Get mpp-x, mpp-y of the image

Need explanation

Used by the viewer to adjust the scales.

  /metadata case_id

Get all metadata of the image(width, height, mpp etc.)

Need explanation

Used by dynamic services to get width, height, and file location of the image.

  /md5 case_id

Get MD5 of the image file

Need explanation

Used to check the MD5 to make sure that the image was loaded successfully.

POST/jsonmetdatametadata of the image in JSON format
What are you posting? What is in the mongo database about this image?
Stored in Mongo(db: Camicroscope, collection: ImageData).

Example of /ImageData

...

Need explanation of reason to use each item above.

...

POST

Code Block
$ curl -H "Content-Type: application/json" -X POST -d '{"case_id": "TCGA-01-0001", "width": 30000, "height": 31000}' http://localhost:9099/Camicroscope/ImageData/json

GET

Code Block
$ curl http://localhost:9099/Camicroscope/ImageData/fileLocation

...

/MarkupData

Bindaas

HTTP Verb

QueryEndpoint

Query Parameters(Input)

Output(Description)

Questions

Additional Information

GET

 /multipleMarkups
 Case
case_id,

x1,y1,x2,y2,footprint,algorithms

 GeoJSON
Need explanation

x1, y1, x2, y2 are

different than what is in caMicroscope demo (had x, y, width, height)

the coordinates of a rectangular region of interest.

(x1,y1) is the top-left coordinate pair. (x2, y2) is the bottom-right coordinate pair.

 N/A

/executionIds

case_id

List of execution IDs available for a case

Need explanation. How would one get these execution IDs for a specific slide? Need to explain the difference between a caseID and an executionID–also any of the query modifiers.

The case_id uniquely identifies an image.

The execution_ids identify the image segmentation algorithm that is run on images. The results of these images appear as green polygons in caMicroscope. 

Examples of /MarkupData

/uAIMTemplates

Schema: https://github.com/joshfire/jsonform

Multiexcerpt include
MultiExcerptNameExitDisclaimer
nopaneltrue
MultiExcerptNameExitDisclaimer
PageWithExcerptwikicontent:Exit Disclaimer to Include

HTTP Verb

QueryEndpoint

Query Parameters(Input)

Output(Description)

 GET /template 
id?
N/A Jsonform template

  POST

 /json
 N/A
Form in JSON format(see this)200 OK
N/A

Examples of /uAIMTemplates

Examples of authoring a JSON form can be seen here.

/Tasks

Jobs

APIs for posting and retrieving tasks for caMicroscope. It uses Kue

Multiexcerpt include
MultiExcerptNameExitDisclaimer
nopaneltrue
PageWithExcerptwikicontent:Exit Disclaimer to Include
to maintain the tasks. It is well documented.Firebase/Kue???

HTTP Verb

QueryEndpoint

Query Parameters(Input)

Output(Description)

POST

/
task
jobJob data in JSON format
N/A
N/A
GET


/
task
jobtask_idN/A

Examples of /Tasks

...

Code Block
languagebash
titleExample of POSTing a task
$ curl -H "Content-Type: application/json" -X POST -d \
    '{
       "type": "order",
       "data": {
      
       },
       "options" : {
         "attempts": 5,
         "priority": "high"
       }
     }' http://localhost:3000/job
 

will output: 

  {"message": "job created", "id": 3}

This ID can be used to query the status of the job.

 
Code Block
languagebash
titleGET /job/:id
curl http://localhost/job/3
Code Block
languagebash
titleExample of GETting status of a task
{"id":"3","type":"queue","data":{},"priority":-10,"progress":"100","state":"complete","attempts":null,"created_at":"1309973155248","updated_at":"1309973155248","duration":"15002"}

 Examples here