Creating a new DICOM image from an existing DICOM image

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
xargon
Posts: 15
Joined: Mon, 2007-04-30, 13:16

Creating a new DICOM image from an existing DICOM image

#1 Post by xargon »

Hi all,

I am trying to create a new DICOM file from an existing DICOM file. So, the scenario is that I have a DICOM file and I do some image processing on it and produce a transformed/processed file and I would like to save it using the original file as a template.

The only things that change are

1: The pixel data
2: The rescale and offset tags.

Does anyone know how I can achieve this with DCMTK? I looked at various examples but most of them show how to save a JPG or BMP image into a new DICOM file. However, I was wondering if this was already thought about and there is some convenient way to do this.

J. Riesmeier
DCMTK Developer
Posts: 2509
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Creating a new DICOM image from an existing DICOM image

#2 Post by J. Riesmeier »

In fact, there are examples in the documentation of the "dcmdata" module.
Also the command line tool "dcmodify" and its underlying classes do exactly what you want...

And, don't forget to change some other element values in the DICOM dataset, e.g. the SOP Instance UID.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest