-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8093 from meyertst-aws/add_medical_imaging_examples
Add medical imaging examples
- Loading branch information
Showing
18 changed files
with
654 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
**Example 1: To copy an image set without a destination.** | ||
|
||
The following ``copy-image-set`` code example makes a duplicate copy of an image set without a destination. :: | ||
|
||
aws medical-imaging copy-image-set \ | ||
--datastore-id 12345678901234567890123456789012 \ | ||
--source-image-set-id ea92b0d8838c72a3f25d00d13616f87e \ | ||
--copy-image-set-information '{"sourceImageSet": {"latestVersionId": "1" } }' | ||
|
||
|
||
|
||
Output:: | ||
|
||
{ | ||
"destinationImageSetProperties": { | ||
"latestVersionId": "1", | ||
"imageSetWorkflowStatus": "COPYING", | ||
"updatedAt": 1680042357.432, | ||
"imageSetId": "b9a06fef182a5f992842f77f8e0868e5", | ||
"imageSetState": "LOCKED", | ||
"createdAt": 1680042357.432 | ||
}, | ||
"sourceImageSetProperties": { | ||
"latestVersionId": "5", | ||
"imageSetWorkflowStatus": "COPYING_WITH_READ_ONLY_ACCESS", | ||
"updatedAt": 1680042357.432, | ||
"imageSetState": "LOCKED", | ||
"createdAt": 1680027126.436 | ||
}, | ||
"datastoreId": "12345678901234567890123456789012" | ||
} | ||
|
||
**Example 2: To copy an image set with a destination.** | ||
|
||
The following ``copy-image-set`` code example makes a duplicate copy of an image set with a destination. :: | ||
|
||
aws medical-imaging copy-image-set \ | ||
--datastore-id 12345678901234567890123456789012 \ | ||
--source-image-set-id ea92b0d8838c72a3f25d00d13616f87e \ | ||
--copy-image-set-information '{"sourceImageSet": {"latestVersionId": "5" }, "destinationImageSet": { "imageSetId": "ea92b0d8838c72a3f25d00d13616f87e", "latestVersionId": "1"} }' | ||
|
||
|
||
|
||
|
||
Output:: | ||
|
||
{ | ||
"destinationImageSetProperties": { | ||
"latestVersionId": "2", | ||
"imageSetWorkflowStatus": "COPYING", | ||
"updatedAt": 1680042505.135, | ||
"imageSetId": "b9a06fef182a5f992842f77f8e0868e5", | ||
"imageSetState": "LOCKED", | ||
"createdAt": 1680042357.432 | ||
}, | ||
"sourceImageSetProperties": { | ||
"latestVersionId": "5", | ||
"imageSetWorkflowStatus": "COPYING_WITH_READ_ONLY_ACCESS", | ||
"updatedAt": 1680042505.135, | ||
"imageSetId": "ea92b0d8838c72a3f25d00d13616f87e", | ||
"imageSetState": "LOCKED", | ||
"createdAt": 1680027126.436 | ||
}, | ||
"datastoreId": "12345678901234567890123456789012" | ||
} | ||
|
||
For more information, see `Copying an image set`_ in the *AWS HealthImaging Developers Guide*. | ||
|
||
.. _`Copying an image set`: https://docs.aws.amazon.com/healthimaging/latest/devguide/copy-image-set.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
**To create a data store** | ||
|
||
The following ``create-datastore`` code example creates a data store with the name ``my-datastore``. :: | ||
|
||
aws medical-imaging create-datastore \ | ||
--datastore-name "my-datastore" | ||
|
||
Output:: | ||
|
||
{ | ||
"datastoreId": "12345678901234567890123456789012", | ||
"datastoreStatus": "CREATING" | ||
} | ||
|
||
For more information, see `Creating a data store`_ in the *AWS HealthImaging Developers Guide*. | ||
|
||
.. _`Creating a data store`: https://docs.aws.amazon.com/healthimaging/latest/devguide/create-data-store.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
**To delete a data store** | ||
|
||
The following ``delete-datastore`` code example deletes a data store. :: | ||
|
||
aws medical-imaging delete-datastore \ | ||
--datastore-id "12345678901234567890123456789012" | ||
|
||
Output:: | ||
|
||
{ | ||
"datastoreId": "12345678901234567890123456789012", | ||
"datastoreStatus": "DELETING" | ||
} | ||
|
||
For more information, see `Deleting a data store`_ in the *AWS HealthImaging Developers Guide*. | ||
|
||
.. _`Deleting a data store`: https://docs.aws.amazon.com/healthimaging/latest/devguide/delete-data-store.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
**To delete an image set** | ||
|
||
The following ``delete-image-set`` code example deletes an image set. :: | ||
|
||
aws medical-imaging delete-image-set \ | ||
--datastore-id 12345678901234567890123456789012 \ | ||
--image-set-id ea92b0d8838c72a3f25d00d13616f87e | ||
|
||
Output:: | ||
|
||
{ | ||
"imageSetWorkflowStatus": "DELETING", | ||
"imageSetId": "ea92b0d8838c72a3f25d00d13616f87e", | ||
"imageSetState": "LOCKED", | ||
"datastoreId": "12345678901234567890123456789012" | ||
} | ||
|
||
For more information, see `Deleting an image set`_ in the *AWS HealthImaging Developers Guide*. | ||
|
||
.. _`Deleting an image set`: https://docs.aws.amazon.com/healthimaging/latest/devguide/delete-image-set.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
**To get a data store's properties** | ||
|
||
The following ``get-datastore`` code example gets a data store's properties. :: | ||
|
||
aws medical-imaging get-datastore \ | ||
--datastore-id 12345678901234567890123456789012 | ||
|
||
|
||
Output:: | ||
|
||
{ | ||
"datastoreProperties": { | ||
"datastoreId": "12345678901234567890123456789012", | ||
"datastoreName": "TestDatastore123", | ||
"datastoreStatus": "ACTIVE", | ||
"datastoreArn": "arn:aws:medical-imaging:us-east-1:123456789012:datastore/12345678901234567890123456789012", | ||
"createdAt": "2022-11-15T23:33:09.643000+00:00", | ||
"updatedAt": "2022-11-15T23:33:09.643000+00:00" | ||
} | ||
} | ||
|
||
For more information, see `Getting data store properties`_ in the *AWS HealthImaging Developers Guide*. | ||
|
||
.. _`Getting data store properties`: https://docs.aws.amazon.com/healthimaging/latest/devguide/get-data-store.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
**To get a dicom import job's properties** | ||
|
||
The following ``get-dicom-import-job`` code example gets a dicom import job's properties. :: | ||
|
||
aws medical-imaging get-dicom-import-job \ | ||
--datastore-id "12345678901234567890123456789012" \ | ||
--job-id "09876543210987654321098765432109" | ||
|
||
|
||
Output:: | ||
|
||
{ | ||
"jobProperties": { | ||
"jobId": "09876543210987654321098765432109", | ||
"jobName": "my-job", | ||
"jobStatus": "COMPLETED", | ||
"datastoreId": "12345678901234567890123456789012", | ||
"dataAccessRoleArn": "arn:aws:iam::123456789012:role/ImportJobDataAccessRole", | ||
"endedAt": "2022-08-12T11:29:42.285000+00:00", | ||
"submittedAt": "2022-08-12T11:28:11.152000+00:00", | ||
"inputS3Uri": "s3://medical-imaging-dicom-input/dicom_input/", | ||
"outputS3Uri": "s3://medical-imaging-output/job_output/12345678901234567890123456789012-DicomImport-09876543210987654321098765432109/" | ||
} | ||
} | ||
|
||
For more information, see `Getting import job properties`_ in the *AWS HealthImaging Developers Guide*. | ||
|
||
.. _`Getting import job properties`: https://docs.aws.amazon.com/healthimaging/latest/devguide/get-dicom-import-job.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
**To get image set pixel data** | ||
|
||
The following ``get-image-frame`` code example gets an image frame. :: | ||
|
||
aws medical-imaging get-image-frame \ | ||
--datastore-id "12345678901234567890123456789012" \ | ||
--image-set-id "98765412345612345678907890789012" \ | ||
--image-frame-information imageFrameId=3abf5d5d7ae72f80a0ec81b2c0de3ef4 \ | ||
imageframe.jph | ||
|
||
|
||
Note: | ||
This code example does not include output because the GetImageFrame action returns a stream of pixel data to the imageframe.jph file. For information about decoding and viewing image frames, see HTJ2K decoding libraries. | ||
|
||
|
||
For more information, see `Getting image set pixel data`_ in the *AWS HealthImaging Developers Guide*. | ||
|
||
.. _`Getting image set pixel data`: https://docs.aws.amazon.com/healthimaging/latest/devguide/get-image-frame.html |
44 changes: 44 additions & 0 deletions
44
awscli/examples/medical-imaging/get-image-set-metadata.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
**Example 1: To get image set metadata without version** | ||
|
||
The following ``get-image-set-metadata`` code example gets metadata for an image set without specifying a version. | ||
|
||
Note: ``outfile`` is a required parameter :: | ||
|
||
aws medical-imaging get-image-set-metadata \ | ||
--datastore-id 12345678901234567890123456789012 \ | ||
--image-set-id ea92b0d8838c72a3f25d00d13616f87e \ | ||
studymetadata.json.gz | ||
|
||
The returned metadata is compressed with gzip and stored in the studymetadata.json.gz file. To view the contents of the returned JSON object, you must first decompress it. | ||
|
||
Output:: | ||
|
||
{ | ||
"contentType": "application/json", | ||
"contentEncoding": "gzip" | ||
} | ||
|
||
**Example 2: To get image set metadata with version** | ||
|
||
The following ``get-image-set-metadata`` code example gets metadata for an image set with a specified version. | ||
|
||
Note: ``outfile`` is a required parameter :: | ||
|
||
aws medical-imaging get-image-set-metadata \ | ||
--datastore-id 12345678901234567890123456789012 \ | ||
--image-set-id ea92b0d8838c72a3f25d00d13616f87e \ | ||
--version-id 1 \ | ||
studymetadata.json.gz | ||
|
||
The returned metadata is compressed with gzip and stored in the studymetadata.json.gz file. To view the contents of the returned JSON object, you must first decompress it. | ||
|
||
Output:: | ||
|
||
{ | ||
"contentType": "application/json", | ||
"contentEncoding": "gzip" | ||
} | ||
|
||
For more information, see `Getting image set metadata`_ in the *AWS HealthImaging Developers Guide*. | ||
|
||
.. _`Getting image set metadata`: https://docs.aws.amazon.com/healthimaging/latest/devguide/get-image-set-metadata.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
**To get image set properties** | ||
|
||
The following ``get-image-set`` code example gets the properties for an image set. :: | ||
|
||
aws medical-imaging get-image-set \ | ||
--datastore-id 12345678901234567890123456789012 \ | ||
--image-set-id 18f88ac7870584f58d56256646b4d92b \ | ||
--version-id 1 | ||
|
||
Output:: | ||
|
||
{ | ||
"versionId": "1", | ||
"imageSetWorkflowStatus": "COPIED", | ||
"updatedAt": 1680027253.471, | ||
"imageSetId": "18f88ac7870584f58d56256646b4d92b", | ||
"imageSetState": "ACTIVE", | ||
"createdAt": 1679592510.753, | ||
"datastoreId": "12345678901234567890123456789012" | ||
} | ||
|
||
|
||
For more information, see `Getting image set properties`_ in the *AWS HealthImaging Developers Guide*. | ||
|
||
.. _`Getting image set properties`: https://docs.aws.amazon.com/healthimaging/latest/devguide/get-image-set-properties.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
**To list data stores** | ||
|
||
The following ``list-datastores`` code example lists available data stores. :: | ||
|
||
aws medical-imaging list-datastores | ||
|
||
Output:: | ||
|
||
{ | ||
"datastoreSummaries": [ | ||
{ | ||
"datastoreId": "12345678901234567890123456789012", | ||
"datastoreName": "TestDatastore123", | ||
"datastoreStatus": "ACTIVE", | ||
"datastoreArn": "arn:aws:medical-imaging:us-east-1:123456789012:datastore/12345678901234567890123456789012", | ||
"createdAt": "2022-11-15T23:33:09.643000+00:00", | ||
"updatedAt": "2022-11-15T23:33:09.643000+00:00" | ||
} | ||
] | ||
} | ||
|
||
|
||
For more information, see `Listing data stores`_ in the *AWS HealthImaging Developers Guide*. | ||
|
||
.. _`Listing data stores`: https://docs.aws.amazon.com/healthimaging/latest/devguide/list-data-stores.html |
26 changes: 26 additions & 0 deletions
26
awscli/examples/medical-imaging/list-dicom-import-jobs.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
**To list dicom import jobs** | ||
|
||
The following ``list-dicom-import-jobs`` code example lists dicom import jobs. :: | ||
|
||
aws medical-imaging list-dicom-import-jobs \ | ||
--datastore-id "12345678901234567890123456789012" | ||
|
||
Output:: | ||
|
||
{ | ||
"jobSummaries": [ | ||
{ | ||
"jobId": "09876543210987654321098765432109", | ||
"jobName": "my-job", | ||
"jobStatus": "COMPLETED", | ||
"datastoreId": "12345678901234567890123456789012", | ||
"dataAccessRoleArn": "arn:aws:iam::123456789012:role/ImportJobDataAccessRole", | ||
"endedAt": "2022-08-12T11:21:56.504000+00:00", | ||
"submittedAt": "2022-08-12T11:20:21.734000+00:00" | ||
} | ||
] | ||
} | ||
|
||
For more information, see `Listing import jobs`_ in the *AWS HealthImaging Developers Guide*. | ||
|
||
.. _`Listing import jobs`: https://docs.aws.amazon.com/healthimaging/latest/devguide/list-dicom-import-jobs.html |
50 changes: 50 additions & 0 deletions
50
awscli/examples/medical-imaging/list-image-set-versions.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
**To list image set versions** | ||
|
||
The following ``list-image-set-versions`` code example lists the version history for an image set. :: | ||
|
||
aws medical-imaging list-image-set-versions \ | ||
--datastore-id 12345678901234567890123456789012 \ | ||
--image-set-id ea92b0d8838c72a3f25d00d13616f87e | ||
|
||
Output:: | ||
|
||
{ | ||
"imageSetPropertiesList": [ | ||
{ | ||
"ImageSetWorkflowStatus": "UPDATED", | ||
"versionId": "4", | ||
"updatedAt": 1680029436.304, | ||
"imageSetId": "ea92b0d8838c72a3f25d00d13616f87e", | ||
"imageSetState": "ACTIVE", | ||
"createdAt": 1680027126.436 | ||
}, | ||
{ | ||
"ImageSetWorkflowStatus": "UPDATED", | ||
"versionId": "3", | ||
"updatedAt": 1680029163.325, | ||
"imageSetId": "ea92b0d8838c72a3f25d00d13616f87e", | ||
"imageSetState": "ACTIVE", | ||
"createdAt": 1680027126.436 | ||
}, | ||
{ | ||
"ImageSetWorkflowStatus": "COPY_FAILED", | ||
"versionId": "2", | ||
"updatedAt": 1680027455.944, | ||
"imageSetId": "ea92b0d8838c72a3f25d00d13616f87e", | ||
"imageSetState": "ACTIVE", | ||
"message": "INVALID_REQUEST: Series of SourceImageSet and DestinationImageSet don't match.", | ||
"createdAt": 1680027126.436 | ||
}, | ||
{ | ||
"imageSetId": "ea92b0d8838c72a3f25d00d13616f87e", | ||
"imageSetState": "ACTIVE", | ||
"versionId": "1", | ||
"ImageSetWorkflowStatus": "COPIED", | ||
"createdAt": 1680027126.436 | ||
} | ||
] | ||
} | ||
|
||
For more information, see `Listing image set versions`_ in the *AWS HealthImaging Developers Guide*. | ||
|
||
.. _`Listing image set versions`: https://docs.aws.amazon.com/healthimaging/latest/devguide/list-image-set-versions.html |
Oops, something went wrong.