I have tried to use gdcmimg to convert dcm to jpg. (windows binary
package from sourceforge - 2.0.14).
The "--help" output [1] seems to indicate that this is possible. When
I try "gdcmimg -i foo.dcm -o foo.jpg", the output is dicom with a jpg
extension...
[1]
gdcmimg: gdcm 2.0.14 $Date: 2009-10-24 21:19:36 +0200 (Sat, 24 Oct 2009) $
Usage: gdcmimg [OPTION]... FILE...
Manipulate DICOM image file:
1. Convert to and from other file format (jpg, jp2, pnm...)
2. Anonymize burn-in annotation (rect region fill with pixel value)
Parameter (required):
-i --input Input filename
-o --output Output filename
Options:
--endian %s Endianess (LSB/MSB).
-d --depth %d Depth (8/16/32).
--sign %s Pixel sign (0/1).
-s --size %d,%d Size.
-C --sop-class-uid SOP Class UID (name or value).
-T --study-uid Study UID.
-S --series-uid Series UID.
--root-uid Root UID.
Fill Options:
-R --region %d,%d Region.
-F --fill %d Fill with pixel value specified.
General Options:
-V --verbose more verbose (warning+error).
-W --warning print warning info.
-D --debug print debug info.
-E --error print error info.
-h --help print help.
-v --version print version.
Env var:
GDCM_ROOT_UID Root UID
solution:
$ gdcmconv anyinput.dcm jpeg.dcm
$ gdcmraw jpeg.dcm jpeg.jpg