|
| 1 | +# Import HealthImaging Image Sets and Download Image Frames using the AWS SDK for JavaScript |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +This workflow shows how to use the AWS SDK for JavaScript to import DICOM files into an AWS HealthImaging data store. It then shows how to download, decode, and verify the image frames created by the DICOM import. |
| 6 | + |
| 7 | +Digital Imaging and Communications in Medicine (DICOM) is a technical standard for the digital storage and transmission of medical images and related information. |
| 8 | + |
| 9 | +This workflow runs as a command-line application prompting for user input. |
| 10 | + |
| 11 | +1. All the necessary resources are created from an AWS CloudFormation template. |
| 12 | + 1. A HealthImaging data store. |
| 13 | + 2. An Amazon Simple Storage Service (Amazon S3) input bucket for a DICOM import job. |
| 14 | + 3. An Amazon S3 output bucket for a DICOM import job. |
| 15 | + 4. An AWS Identity and Access Management (IAM) role with the appropriate permissions for a DICOM import job. |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +2. The user chooses a DICOM study to copy from the [National Cancer Institute Imaging Data Commons (IDC) Collections](https://registry.opendata.aws/nci-imaging-data-commons/)' public S3 bucket. |
| 20 | + |
| 21 | +3. The chosen study is copied to the user's input S3 bucket. |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | +4. A HealthImaging DICOM import job is run. |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | +5. The workflow retrieves the IDs for the HealthImaging image frames created by the DICOM import job. |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | +6. The HealthImaging image frames are downloaded, decoded to a bitmap format, and verified using a CRC32 checksum. |
| 34 | + |
| 35 | +7. The created resources can then be deleted, if the user chooses. |
| 36 | + |
| 37 | +## ⚠ Important |
| 38 | + |
| 39 | +- Running this code might result in charges to your AWS account. |
| 40 | +- Running the tests might result in charges to your AWS account. |
| 41 | +- We recommend that you grant your code least privilege. At most, grant only the minimum permissions required to perform the task. For more information, see [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege). |
| 42 | +- This code is not tested in every AWS Region. For more information, see [AWS Regional Services](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services). |
| 43 | + |
| 44 | +## Scenario |
| 45 | + |
| 46 | +### Prerequisites |
| 47 | + |
| 48 | +For information on prerequisites for running this scenario, see the main [JavaScript V3 README.md](../../../../README.md). |
| 49 | + |
| 50 | +### Run the Scenario |
| 51 | + |
| 52 | +To run the scenario, follow these steps: |
| 53 | + |
| 54 | +1. Clone the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples) to your local environment. |
| 55 | +2. Navigate to the `javascriptv3/example_code/medical-imaging/scenarios/health-image-sets` directory. |
| 56 | +3. Run the scenario by running `node index.js --scenario <deploy | demo | destroy> [-h|--help] [-y|--yes] [-v|--verbose]` |
| 57 | + |
| 58 | +### Deploy |
| 59 | +This step will prompt you for a name for the CloudFormation stack and the datastore. It will then deploy the stack. |
| 60 | + |
| 61 | +### Demo |
| 62 | +This step copies images from the public bucket, imports them into your datastore, and runs a checksum validation to ensure data integrity. |
| 63 | + |
| 64 | +### Destroy |
| 65 | +This step deletes the image sets from the datastore and deletes the CloudFormation stack. It does not delete saved state that is output from the intermediary steps. Those are left behind for reference. You can delete them by running `rm *state.json` in this directory. |
| 66 | + |
| 67 | +## Additional Resources |
| 68 | + |
| 69 | +- [HealthImaging User Guide](https://docs.aws.amazon.com/healthimaging/latest/devguide/what-is.html) |
| 70 | +- [HealthImaging API Reference](https://docs.aws.amazon.com/healthimaging/latest/APIReference/Welcome.html) |
| 71 | +- [AWS SDK for JavaScript Documentation](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/index.html) |
| 72 | + |
| 73 | +--- |
| 74 | + |
| 75 | +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 76 | + |
| 77 | +SPDX-License-Identifier: Apache-2.0 |
0 commit comments