Skip to content

Commit

Permalink
Added missing servlets and API documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rui-Jesus committed Oct 1, 2024
1 parent 2115a69 commit 14470f6
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ public DicoogleWeb(int port) throws Exception {
createServletHandler(new TrainServlet(), "/ml/train"),
createServletHandler(new ListAllModelsServlet(), "/ml/model/list"),
createServletHandler(new ModelinfoServlet(), "/ml/model/info"),
createServletHandler(new CacheServlet(), "/ml/cache"),
createServletHandler(new ImplementedMethodsServlet(), "/ml/provider/methods"),
webpages};

// setup the server
Expand Down
61 changes: 60 additions & 1 deletion dicoogle_web_api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,7 @@ paths:
$ref: '#/components/schemas/DatastoreRequest'
responses:
'200':
description: The datastore request was successully processed and sent to the provider
description: The datastore request was successfully processed and sent to the provider
'400':
description: Malformed request
/ml/infer/single:
Expand Down Expand Up @@ -1300,6 +1300,55 @@ paths:
$ref: '#/components/schemas/MLModelTrainInfo'
'400':
description: Malformed request
/ml/cache:
post:
tags:
- Machine Learning
summary: Cache DICOM objects on a provider
operationId: mlCache
parameters:
- in: query
name: provider
description: The name of the provider, e.g "MONAI"
required: true
schema:
type: string
requestBody:
description: Contains the DICOM files to cache
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DICOMDataset'
responses:
'200':
description: The cache request was successfully processed and sent to the provider
'400':
description: Malformed request
/ml/provider/methods:
get:
tags:
- Machine Learning
summary: Retrieves the implemented methods of the machine learning interface from a provider
operationId: mlCache
parameters:
- in: query
name: provider
description: The name of the provider, e.g "MONAI"
required: true
schema:
type: string
responses:
'200':
description: A list of the implemented methods
content:
application/json:
schema:
type: array
items:
type: string
'400':
description: Malformed request

components:
securitySchemes:
Expand Down Expand Up @@ -1724,6 +1773,16 @@ components:
dataset:
type: object
description: A map where keys represent SOPInstances and the values are annotations to upload
DICOMDataset:
type: object
properties:
level:
type: string
enum: [PATIENT, STUDY, SERIES, INSTANCE]
dimUIDs:
type: array
items:
type: string
TrainRequest:
type: object
properties:
Expand Down

0 comments on commit 14470f6

Please sign in to comment.