Created
November 17, 2020 09:35
-
-
Save sohail-aspose/094e6bcbf3f48c700e2eb27ec83375a6 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