0
The dcmcjpeg
tool from the dcmtk package (sudo apt-get install dcmtk
) is supposed to convert DICOM image files to JPEG.
But I suspect it still wraps the image in a DICOM container, because when I try, I get this:
> file 000010.*
000010.dcm: DICOM medical imaging data
> md5sum 000010.*
a64dee7fa9c9fb383c9aec833006f161 000010.dcm
> dcmcjpeg --verbose --encode-extended --quality 75 --huffman-optimize --bits-force-8 --monochrome 000010.dcm 000010.jpg
I: reading input file 000010.dcm
I: Convert DICOM file to compressed transfer syntax
I: Output transfer syntax JPEG Extended, Process 2+4 can be written
I: creating output file 000010.jpg
I: conversion successful
> file 000010.*
000010.dcm: DICOM medical imaging data
000010.jpg: DICOM medical imaging data
> md5sum 000010.*
a64dee7fa9c9fb383c9aec833006f161 000010.dcm
c3019b54640179805ab3912414b97936 000010.jpg
How can I fully extract the image from a DICOM file and convert it to a common format such as JPEG or PNG?
I've also asked a similar question about converting from DICOM to PNG. If the questions are too similar, then this one can be closed as I'd prefer to know how to convert to PNG versus JPG. https://superuser.com/questions/1497370/how-to-convert-dicom-images-to-png
– Stéphane – 2019-10-30T09:39:23.917