How to store multi frame image in Pixel Data element tag?

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
hemp110
Posts: 11
Joined: Tue, 2013-03-05, 09:28

How to store multi frame image in Pixel Data element tag?

#1 Post by hemp110 »

Hi, I'm going to make a multi frame image with DCMTK. By refering DICOM standard file PS 3.5 Annex G.6 I see the strategy goes like this: Assume there are n frames, in Data Element there are n+1 Items. The first item stores Basic Offset Table where the offset of every item is stored. Then each Item stores the pixel data of a frame.
Yet when I tried to insert a item in Pixel Data Element(7FE0, 0010) with DCMTK, it told me that the VR of Pixel Data Element(7FE0, 0010) is not SQ but OB and items are not allowed to be added.
If anyone could solve it, please tell me, lots of thx! :)

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

Re: How to store multi frame image in Pixel Data element tag

#2 Post by J. Riesmeier »

Are you talking about compressed pixel data? I'm asking because what you describe (encapsulation of pixel items) only applies to compressed pixel data. If so, please have a look at the classes DcmPixelData and DcmPixelSequence.

Btw, the value representation (VR) is "OB" for compressed pixel data, as you can also read in PS 3.5.

hemp110
Posts: 11
Joined: Tue, 2013-03-05, 09:28

Re: How to store multi frame image in Pixel Data element tag

#3 Post by hemp110 »

J. Riesmeier wrote:Are you talking about compressed pixel data? I'm asking because what you describe (encapsulation of pixel items) only applies to compressed pixel data. If so, please have a look at the classes DcmPixelData and DcmPixelSequence.

Btw, the value representation (VR) is "OB" for compressed pixel data, as you can also read in PS 3.5.
Thank you for the clue, sir. Yes, I am dealing with compressed pixel data.
Now I can organize a DcmPixelSequence. However, I can't write it into DcmFileFormat or find any example of writing (actually I found an example of reading). Would you please give me some clue again?
Btw, the pixel data I'm using is pre-compressed and I didn't use the compress function in DCMTK.

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

Re: How to store multi frame image in Pixel Data element tag

#4 Post by J. Riesmeier »

The two command line tools dump2dcm and xml2dcm show how to fill pre-compressed pixel data into a DICOM dataset. Search for "putOriginalRepresentation"... Hope that helps.

Post Reply

Who is online

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