dicom >> dcmtk - using dcmconv to clean-up a DICOM image

by bland » Fri, 19 Oct 2007 05:01:08 GMT


I am producing a DICOM image from a JPEG using gimp v2.0.5. This
works pretty well, but the DICOM image so-produced needs some cleaning-
up. At one time I got dcmconv to take care of most of the problems,
the most egregious of which was the absence of values for attributes
such as number of rows and columns, high bit, etc. I'm embarrassed to
say that I can no longer produce this result; that is, I've forgotten
exactly which command line options I used. Instead, I'm taking the
extra step of using dcmodify to set the correct values which is fine
but probably not the best way. Can someone give me some guidance?
I'm using dcmtk v3.5.4.

On the other hand, it seems that I should be able to produce a valid
DICOM image from a JPEG in a more direct fashion using the dcmtk
utilities. What am I missing?

Peyton Bland

dicom >> dcmtk - using dcmconv to clean-up a DICOM image

by Marco Eichelberg » Mon, 22 Oct 2007 15:16:39 GMT

> At one time I got dcmconv to take care of most of the problems,

That would be most surprising since dcmconv does not contain
the functionality you would need for this. I could imagine that you
have used dcmdump/dcm2dcm; dcmodify is an acceptable solution anyway.

This is actually no tool in DCMTK that would convert a general purpose
image format into a DICOM image - this is not too difficult to write,
but apparently nobody has ever bothered. That said, the next release
might contain a tool that will convert a JPEG file into a DICOM image
(in JPEG Baseline transfer syntax) without a decompression/recompression
cycle. This tool is work-in-progress at the moment, however, and has not
yet made it into our CVS (and there is no target date for a next release

Marco Eichelberg

PS: DCMTK specific discussions should preferrably be posted to the
DCMTK discussion forum at http://forum.dcmtk.org/

dicom >> dcmtk - using dcmconv to clean-up a DICOM image

by Lint Radley » Tue, 23 Oct 2007 21:20:32 GMT

I think LEADTools Command Line Tools (free) will convert almost any
format to DICOM.


dicom >> dcmtk - using dcmconv to clean-up a DICOM image

by Yves Martel » Sun, 28 Oct 2007 23:54:52 GMT


The main problem when converting from a JPEG image (or any orther
"non-mdeical format such as those supported by LEAD converter) is that
those image format do not contain enough information to create a valid
DICOM image.

These images only contain enough information to be displayed
correctly, they do not have any of the patient information or pixel
metrics that you find in any of the medical image formats.

Some medical image format use private tags in standard image formats
to place more information in the images (DSR and DEFF are 2 ultrasound
formats that are based around TIFF and use private TIFF tags for the
patient information and pixel metrics). But I am not aware of anybody
doing this with JPEG.

The missing pixel metrics can be omitted by creating a "second
Capture" DICOM from the images, but there is no easy workaround for
the missing patient information. You need to add these infromation
for each image, and this prevent the conversion from being automated.
Unless you have a database of matching information that you can merge
with the images when converting, but then you will need to either
write your own converter or at least a wrapper around a converter to
do the merge...

DICOMatic support JPEG and TIFF conversion, but that is only because I
need to support JPEG for the compressed DICOM and TIFF for the DSR and
DEFF formats. So, since the format where already supported, I added
them to the converter, but it is not a "magic" solution. Unless you
use the associated rules file or modify the DICOM tables to create the
patient info, you will need to use the interactive conversion mode to
add them manually for each image.


On Tue, 23 Oct 2007 13:20:32 GMT, Lint Radley
< XXXX@XXXXX.COM > wrote:

Similar Threads

1. How to display dicom image by dcmtk?

2. Modify pixel data of Dicom image with Dcmtk

Hi everyone.

How can i modify pixel data of Dicom image?

I want to:
1. load a dicom image.
2. change the image (for instance: set red pixel in the center of
3. save the modified image.

my problems are over point 2.

I use findAndGetUint8Array(DCM_PixelData, ...) and
putAndInsertUint8Array(DCM_PixelData, ...) method of DcmDataset. But
the problem is if the image is compressed or 8bit or 16 bit, ...

Can anyone help me?

3. Printing DICOM Image buffer without header information using a DICOM Printer

4. using dcmtk dcmscale to print a skull image at life like size


We took a Caldwell view of the skull on a patient and when we printed
it out from either the GE centricity printing method or from efilm
1.5.3 the skull is HUGE. Looks like a patient with acromegally :).

The ent surgeon wants a "life size" film for surgical planning.

So I tried to use dcmscale.

I did
dcmscale +Sxf .657 image.in image.out

wwhere we used a ruler to compare the size of the printed big copy and
the electronic calipers and used

.657= (Caliper size)/ (film size)

and then when we printed that, using efilm it was still the same HUGE
size skull. :(

Am I doing something wrong?

Mitchell Laks

5. Help using DCMTK to create a multi frame image

6. Dicom image orientation using Siemens Magnetom 1.5 T scanner


I am acquiring images using Syngo on a Siemens Magnetom 1.5 T scanner.
I observed the following behavior and hope to obtain some mathematical
explanation to it:

While obtaining double oblique planes, if I try to specify the
following sequence,
T-S:-30 to C: -30 (Rotate from transverse to coronal plane, and then
towards Sagittal plane)

the software modifies it to,
T-C:33.7, to S:-25.7 

I wrote up some code to test the resulting transform and it matches
the transform retrieved from the final DICOM image. (Transform
reconstructed from the image orientation tag) Why does the order of
orientation change?
Applying the original sequence results in a different transform.

Any help would be appreciated.

7. how to display a dicom multiframe image using java

8. Printing DICOM images using CTN Software over MS Windows

In the Wire Communication Laboratory of the Universtity of Patras in
Greece we try to develope DICOM services using CTN Software. We use
2.12.0 edition of CTN. I would like to ask you if there is any
capability using CTN Software to develope DICOM Printing service over
a MS Windows platform? I would appreciate your answers. Thank you in

George Koutelakis 
Phd Student