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!
Get tag value from DicomImage class
Moderator: Moderator Team
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
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.
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.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 for your post.Jörg Riesmeier wrote: What do you mean by "raw data"? The above method returns a sequence of unsigned 16-bit values (OW).
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!
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
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 ...
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!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 ...
Who is online
Users browsing this forum: Google [Bot] and 1 guest