Extracting pixeldata from private tag?

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
rullbandspelare
Posts: 18
Joined: Fri, 2005-12-09, 11:40

Extracting pixeldata from private tag?

#1 Post by rullbandspelare »

Hi!
I have a DICOM object (Explicit VR Little Endian)that has pixeldata stored in a private tag.
How can I extract it in a usable format like BMP?

I have tried dcmdump.exe +M +L +P 0029,2009 data.dcm
But that gives me a bunch of HEX numbers that I don know what to do with.

Extracting it with a HEX editor is not producing any viewable result in any image viewer. But I do see the image when I use the HEX editors "pixel view" function.

Thanks for any help!

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

Re: Extracting pixeldata from private tag?

#2 Post by J. Riesmeier »

Since it's private data, DCMTK does not know how to handle it and how to convert it to BMP format. In other words, the best way is probably to write a little tool for this purpose.

rullbandspelare
Posts: 18
Joined: Fri, 2005-12-09, 11:40

Re: Extracting pixeldata from private tag?

#3 Post by rullbandspelare »

Thanks for Yor quick response!

Do You have any tip on how to encode The DICOM PixelDate to a valid BMP file ? That would be realy helpful
I.e any document describing the conversion needed.

Thanks!

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

Re: Extracting pixeldata from private tag?

#4 Post by J. Riesmeier »

The tool dcm2pnm does exactly this when used with option --write-bmp.

rullbandspelare
Posts: 18
Joined: Fri, 2005-12-09, 11:40

Re: Extracting pixeldata from private tag?

#5 Post by rullbandspelare »

Hi!
again...
I want to extract the contents of a TAG just as a raw binary content.

dcmdump.exe +M +L +P 07a3,1096 55A72B2A >./object/output

Gives me a large file with the HEX representation. /00/00...
Can this be dumped as a binary file instead?

Thanks!

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

Re: Extracting pixeldata from private tag?

#6 Post by J. Riesmeier »

No, not with dcmdump since this is a textual dump tool, with one exception: the Pixel Data element value can also be extracted to a binary raw file.

Post Reply

Who is online

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