Skip to content

Commit 1ab6d9b

Browse files
committed
Add dicom back to response spec
1 parent 468c46b commit 1ab6d9b

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

README.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@ The SDK helps you containerize your model into a Flask app with a predefined API
1010
- [The healthcheck endpoint](#the-healthcheck-endpoint)
1111
- [Handling an inference request](#handling-an-inference-request)
1212
- [Standard model outputs](#standard-model-outputs)
13+
- [Bounding box](#bounding-box)
14+
- [Classification labels (and other additional information)](#classification-labels-and-other-additional-information)
15+
- [Segmentation masks](#segmentation-masks)
16+
- [Probability mask for 3D Series](#probability-mask-for-3d-series)
17+
- [Boolean mask for 3D Series](#boolean-mask-for-3d-series)
18+
- [Heatmaps for 3D series](#heatmaps-for-3d-series)
19+
- [Heatmaps for 2D series (e.g. X-Rays)](#heatmaps-for-2d-series-eg-x-rays)
20+
- [Numeric label mask for 3D series](#numeric-label-mask-for-3d-series)
21+
- [Linear measurements](#linear-measurements)
22+
- [Secondary capture support](#secondary-capture-support)
23+
- [DICOM structured report](#dicom-structured-report)
24+
- [Returning DICOM conformance errors](#returning-dicom-conformance-errors)
1325
- [Request JSON format](#request-json-format)
1426
- [Build and run the mock inference service container](#build-and-run-the-mock-inference-service-container)
1527
- [Adding GPU support](#adding-gpu-support)
@@ -358,7 +370,7 @@ For an example, the `write_dataset_to_bytes` function on [this Pydicom help page
358370

359371
##### DICOM structured report
360372

361-
If your model returns a DICOM Structured Report then do the same as for secondary captures explained in the previous section, just change `'binary_type'` to `'dicom_structured_report'`.
373+
If your model returns a DICOM Structured Report then do the same as for secondary captures explained in the previous section, just change `'binary_type'` to `'dicom'`.
362374

363375
##### Returning DICOM conformance errors
364376

inference-test-tool/run.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
def save_secondary_captures(json_response, output_folder_path, multipart_data):
3333
secondary_capture_parts = [
3434
p for p in json_response['parts'] if p['binary_type'] in
35-
['dicom_structured_report', 'dicom_secondary_capture']
35+
['dicom', 'dicom_structured_report', 'dicom_secondary_capture']
3636
]
3737

3838
# Create DICOM files for secondary capture outputs

inference-test-tool/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import SimpleITK as sitk
1212
from PIL import Image
1313

14-
DICOM_BINARY_TYPES = {'dicom_secondary_capture', 'dicom_structured_report'}
14+
DICOM_BINARY_TYPES = {'dicom_secondary_capture', 'dicom', 'dicom_structured_report'}
1515

1616
class DCM_Image:
1717
def __init__(self, dcm, path):

tests/test_secondary_capture.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def testOutputFiles(self):
4040
output_files = os.listdir(output_folder_path)
4141
count_masks = len([f for f in output_files if f.startswith("sc_")])
4242
secondary_capture_parts = [p for p in data["parts"] if p['binary_type']
43-
in {'dicom_secondary_capture', 'dicom_structured_report'}]
43+
in {'dicom_secondary_capture', 'dicom', 'dicom_structured_report'}]
4444
self.assertEqual(count_masks, len(secondary_capture_parts))
4545

4646
# Read and verify output secondary capture dicom files

0 commit comments

Comments
 (0)