EP_Representation of JPEG lossless

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
m-ishihara
Posts: 40
Joined: Thu, 2008-09-18, 09:20
Location: Japan

EP_Representation of JPEG lossless

#1 Post by m-ishihara »

Hi DICOM @ OFFIS,

I have a trouble with JPEG lossless files.
I have a series of DICOM image of JPEG lossless.
But, when I read those files using DCMTK, EP_Representation of each files are mixed with both EPR_Uint8 and EPR_Uint16 although DCM_BitsAllocated of all those files are DcmUnsignedShort, which means data of all those files are 16bit data.

I would appreciate it if you let me know your thinking about it.

Thanks,

Maty
Maty

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 »

You have to understand that the internal pixel data representation is not identical to what is stored in the Pixel Data element in the DICOM image. The internal representation also includes the modality LUT transformation (if present and not disabled). In addition, the internal representation uses an optimized way to store the pixel data (by checking the range of used pixel values).

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

#3 Post by Marco Eichelberg »

This essentially means that even if your source image is 16 bits/pixel - if it is mostly black and contains only few shades of gray, then class DicomImage might decide to only "spend" one byte per pixel because that is enough to represent all image values without losing any information. As long as you use the getOutputData() routines, you will never notice the difference. If you access the internal intermediate representation you will have to "live" with that.

Post Reply

Who is online

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