Created
November 17, 2020 12:42
-
-
Save aspose-com-gists/510622a7ac9ecc1d520561229fafaae5 to your computer and use it in GitHub Desktop.
Convert DICOM to BMP 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"); | |
// Resizes the width proportionally. | |
dicomImage.resizeWidthProportionally(dicomImage.getWidth()* 2, ResizeType.NearestNeighbourResample); | |
BmpOptions bmpOptions = new BmpOptions(); | |
// Save as BMP | |
dicomImage.save("src/main/resources/Output/DICOM_to_BMP.bmp", bmpOptions); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment