Created
November 17, 2020 09:37
-
-
Save aspose-com-gists/cd3cc2832c75fd30fb41106f0ad79a7b to your computer and use it in GitHub Desktop.
Convert DICOM to JPEG in Java
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
DicomImage dicomImage = (DicomImage) Image.load("src/main/resources/image.dcm"); | |
// Set the active page to be converted to JPEG | |
dicomImage.setActivePage(dicomImage.getDicomPages()[0]); | |
JpegOptions jpegOptions = new JpegOptions(); | |
// Save as JPEG | |
dicomImage.save("src/main/resources/Output/DICOM_to_JPEG.jpg", jpegOptions); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment