Get tag value from DicomImage class

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
kamil
Posts: 63
Joined: Fri, 2009-04-17, 09:18

Get tag value from DicomImage class

#1 Post by kamil »

Is it possible? I find there no way to get the tag value, because the DiDocument *Document is private.
How can I get it?
Using the DcmFileFormat and open it again? :(

And I find when I use findAndGetUint16Array() to get the pixel data, the data value is reverse.(Raw data is '0', the retrieval data is '1023', Bits Stored = 10 bit) Why?

Thank you!

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#2 Post by Jörg Riesmeier »

First of all, you should use DcmFileFormat::loadFile() and feed the fileformat (or dataset) into the DicomImage class constructor. This avoids double loading of the DICOM file.
And I find when I use findAndGetUint16Array() to get the pixel data, the data value is reverse.(Raw data is '0', the retrieval data is '1023', Bits Stored = 10 bit) Why?
What do you mean by "raw data"? The above method returns a sequence of unsigned 16-bit values (OW). This has nothing to do with Bits Stored or the like. Please read the DICOM standard (esp. part 5) in order to understand how pixel data is stored.

kamil
Posts: 63
Joined: Fri, 2009-04-17, 09:18

#3 Post by kamil »

Jörg Riesmeier wrote: What do you mean by "raw data"? The above method returns a sequence of unsigned 16-bit values (OW).
Thank you for your post.
I find this sequence values and write them out to the txt. But I find they are different from sequence values when I use getOutPutData() method of DicomImage, and these two pData value are mod by 1023 by each other(2 to the 10th power -1, Bit store = 10)

Thank you!

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#4 Post by Jörg Riesmeier »

Short answer: findAndGetUint16Array() returns the original pixel data as stored in the DICOM image, getOutputData() returns the rendered pixel data (including all grayscale and non-grayscale transformations). Of course, they are not identical. Depending on what you want, use one of these methods.

Again, please read the DICOM standard (esp. part 5) in order to understand how pixel data is stored. And, also read part 3 on the grayscale transformations ...

kamil
Posts: 63
Joined: Fri, 2009-04-17, 09:18

#5 Post by kamil »

Jörg Riesmeier wrote:Short answer: findAndGetUint16Array() returns the original pixel data as stored in the DICOM image, getOutputData() returns the rendered pixel data (including all grayscale and non-grayscale transformations). Of course, they are not identical. Depending on what you want, use one of these methods.

Again, please read the DICOM standard (esp. part 5) in order to understand how pixel data is stored. And, also read part 3 on the grayscale transformations ...
Thanks a lot! I will try to refer them!

kamil
Posts: 63
Joined: Fri, 2009-04-17, 09:18

#6 Post by kamil »

Jörg Riesmeier wrote: And, also read part 3 on the grayscale transformations ...
Is it refer to LUT?

Post Reply

Who is online

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