Converting JPG to DCM files

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
superot
Posts: 3
Joined: 2012-02-29T01:38:57-07:00
Authentication code: 8675308

Converting JPG to DCM files

Post by superot » 2012-02-29T02:11:07-07:00

Hi there,
I try to convert a JPG file to a DCM (DICOM) file.

The command I give:
convert Pic2.JPG Pic2.DCM
The reply I'm getting:
convert:exe: no encode delegate for this image formar 'Pic2.DCM' @ error/constitute.c/WriteImage/1195.

I would like to add that:
1. I DO get a file called "Pic2.DCM", but can't open it with the Xeleris (our DICOM files reader).
2. I did the dame with some tiff files and got the same result.

I use ImageMagic 6.7.5-7 Q16, under Win Xp Pro. I run the commands under command window (cmd).

Thank you very much!
The best fight is the one you avoid.

jespa
Posts: 4
Joined: 2012-02-28T08:34:32-07:00
Authentication code: 8675308

Re: Converting JPG to DCM files

Post by jespa » 2012-02-29T04:08:20-07:00

Hi,

Current version of ImageMagick can only read DICOM file format, not write it.

See http://www.imagemagick.org/script/formats.php

superot
Posts: 3
Joined: 2012-02-29T01:38:57-07:00
Authentication code: 8675308

Re: Converting JPG to DCM files

Post by superot » 2012-02-29T07:12:27-07:00

Thank you, Jespa, for your answer and the link. For some reason, I was sure that ImageMagic can also create DCM files.

Anyway, I've found a solution to the problem: Apparently, on the Xeleris3 (the work station I use), there is an option to add JPG files to the patient's case.

Note to developers: the JPG files I used were converted from TIFF files. When I opened (with the Xeleris) the files I've converted with ImageMagic, I got a very poor imaging - there was some problem with the colors. But there was no such problem with the files I've converted with Windows Paint.
The best fight is the one you avoid.

Post Reply