Pixel format woes

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Carioca
Posts: 3
Joined: Thu, 2006-02-23, 18:45

Pixel format woes

#1 Post by Carioca »

Hello,

I've been toying with the dcmimgle module and I think I grasp most of what I need of it.
I need to extract pixel information from monochrome images (the ammount of gray in pixel), and as such I :

*Created a DicomImage from a .dcm file.
*Queried the DiPixel from that DicomImage for the representation (getRepresentation()). It returns EPR_Sint16, which in my understanding means that the pixels are stored as signed 16-bit values, no?
*Stored the intermediate representation (with getData()) in a array of short integers.

If what I've been doing so far is correct, the issue I have left is knowing the exact boundaries and meaning of each value in that array (that is, each individual pixel). How far does it go negatively and positively?

I hope I managed to explain my question. Thank you.

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1459
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

#2 Post by Marco Eichelberg »

As you have probably noticed, class DiPixel does not provide methods for computing the minimum and maximum value. Class DiMonoPixel (which is probably what you actually get by the call to getInterData()) does, but there is no API that would provide a pointer to that class directly, so a dynamic_cast might be needed here.

Carioca
Posts: 3
Joined: Thu, 2006-02-23, 18:45

#3 Post by Carioca »

Thank you, I'll look into it. I'll just statically cast, then, and take my chances.

Carioca
Posts: 3
Joined: Thu, 2006-02-23, 18:45

#4 Post by Carioca »

As a follow-up, that did indeed solve my problem. Thanks a lot.

Post Reply

Who is online

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