|
Dicom2Jpeg is an open source application that converts Dicom files to jpeg or to movies. The source code of Dicom2Jpeg is available as an example with the open source dicom library Imebra. Binary files are provided for Ubuntu (32 and 64 bit).
To convert dicom files into movies this application needs the open source program ffmpeg, available for Windows and linux platforms. Ffmpeg is not redistributed with Imebra and must be downloaded from here: Usage dicom2jpeg dicomFileName jpegFileName [-ffmpeg mpegPath [mpegOptions]]
- dicomFileName: the name of the dicom file to convert
- jpegFileName: the name of the resulting jpeg file
- mpegPath: the path to the ffmpeg executable
- mpegOptions: the list of options to be passed to ffmpeg, using the ffmpeg format. The input file and the frame rate are added automatically by dicom2jpeg
Examples The following command converts a dicom file named "input.dcm" to a jpeg file named "output.jpg". If the file output.jpg already exists then it will be overwritten. dicom2jpeg input.dcm output.jpg
The following code converts a multiframe file named "multiframe.dcm" to several jpeg files named "output.jpg", "output1.jpg", "output2.jpg", ..., "outputN.jpg" (N=number of frames-1) dicom2jpeg multiframe.dcm output.jpg
The following command converts a multiframe file named "multiframe.dcm" to a swf movie named "movie.swf". Before producing the movie, dicom2jpeg creates a serie of jpg images named output0.jpg, output1.jpg, ..., outputN.jpg (N=number of frames-1). Then dicom2jpeg executes ffmpeg and specifies the created jpg images as input images and also specifies the frame rate; other options must be specified in the call to dicom2jpeg. dicom2jpeg multiframe.dcm output.jpg -ffmpeg ffmpeg.exe movie.swf
|