Pixel values for CT images

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
zanguzen
Posts: 8
Joined: Mon, 2007-07-09, 22:17

Pixel values for CT images

#1 Post by zanguzen »

Hi,

I'm working with 5 different CT images and I was wondering if anyone could shed some light on the following information. First, when I do getInterData->getRepresentation() and findAndGetOFString(DCM_PixelRepresentation), usually I'll get something like Sint16 for the first and Sint8 for the second. So does that mean the latter method refers to output representation? Regardless, for one of the images, the first method returns Uint16 while the second method returns Sint8 - how could the sign"ity" of the data change?

Second, I realized that for CT images, the pixel values should be represented by 12 bits per pixel instead of the 16 that I've been extracting from the arrays, so to correct this, whenever I access data, I apply a right shift of 4 (ex. pixelData[0]>>4) which usually works (my ranges go from 0 to 4096). However, a couple images whose original range was 0-4096 even though their bits stored & allocated were both 16 end up containing values 0-255. How can I avoid this problem, because I can't find any header info that indicates these images are already being represented by 12 bpp?

Finally, can someone please shed some light on the difference between sign and unsigned and if it is important? I mean I understand the numerical differences (ex. for 16 bit signed goes from -32000ish to +32000 and unsigned goes from 0 to 64000ish), but I'm confused as to how that affects pixel values. For instance, if I have a raw pixel value of 24, and apply slope/intercept so it becomes -1000, the unsigned value is along the lines of 63000. But since this is a high value, does that mean now the pixel will be very bright or will it still be low? I'm sorry if this is a confusing question, since I really don't know what to ask short of any relevant info regarding signed and unsigned values.

Thank you so much for any and all help!
________
Home made vaporizer
Last edited by zanguzen on Mon, 2011-02-14, 02:16, edited 1 time in total.

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 »

Short answer to the DCMTK related part of your question: getInterData() returns a reference to the internal intermediate representation of the pixel data, i.e. the modality LUT transformation (if present) is already applied to the pixel data stored in the DICOM image. This is also described in the documentation of this function:

Code: Select all

    /** get intermediate pixel data representation (read-only).
     *  This function allows to access the pixel data after they have been extracted
     *  from the DICOM data element and the modality transformation has been applied
     *  (if present and not disabled).  Please note that for monochrome images the
     *  internal representation might be signed whereas color images are automatically
     *  converted to unsigned RGB format.  Pixels are aligned to 8, 16 or 32 bits.
     *
     ** @return pointer to intermediate pixel data representation
     */
    inline const DiPixel *getInterData() const
For CT images, the representation is usually signed because the pixels correspond to Hounsfield Units.

Post Reply

Who is online

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