4

I am viewing Computerized Tomography ( CT) DICOM images. These were originally uncompressed DICOM images. I have lossless J2K compressed form of these DICOM images: Transfer syntax = 1.2.840.10008.1.2.4.90 (JPEG-2K Lossless). When I uncompress these DICOM images back: Transfer Syntax =1.2.840.10008.1.2.1 (Little Endian Explicit) and view both the compressed and uncompressed DICOM images side by side in a DICOM viewer then I observe that - The compressed and uncompressed images need a different "window level " for viewing ( "Window level" = Combination of window center' = WC = Brightness and "window Width" = WW = Contrast) - The DICOM header does not seem to be different - The compressed image can be viewed at the industry standard/preset level for the kind of image - but the uncompressed image does NOT look good at that level

So questions

  1. Could this change in level ( window center and window width) be attributed to a problem with my codec. Like my codec is messing with pixel data because it treats it incorrectly ?
  2. Is there a way I could correct this problem by adjusting fields in DICOM header ?

I checked out the Post on Window width and center calculation of Dicom Image. While that post tells me that rescale intercept and slope are applied to transform the pixel values of the image into values that are meaningful to the application I am trying to figure how I can correlate with

  • what I see visually ( relation between the original and adjusted window center and window width)
  • Is there a way I can correlate the pixel values in a programmatic way to arrive at a value for wc, ww, scale intercept slope ?

I also checked out (Correct Pixel Processing Logic for DICOM JPEG(RGB) for Applying Window Width and Level Filter) - however that seems to relate to rendering of image. My question is related to adjusting DICOM header ( wc? ww? scale intercept ? slope ? ) to enable viewers to render it correctly. Looking at the DICOM pixel data can I arrive at appropriate level for these group 28 elements based on pixel values in the pixel data element . Is there a known function to compute something of this sort ?

my image is monochrome

Thanks much

Yogesh Devi

2 Answers 2

2

Please check the value for Pixel Representation (0028, 0103) tag of compressed image. The value of 1 means the image data is signed after the Modality LUT transformation is applied. If you apply the Modality LUT transformation as part of your decompression process, you should reset them (Rescale Slope to 1 and Rescale Intercept to 0) in the uncompressed dataset when saving as Little Endian. Otherwise, viewer will apply the Modality LUT transformation again on the transformed image data.

2
  • The value of Pixel Representation (0028, 0103) in my case is 0. That means data is unsigned. I am however still going to try and reset the escale Slope to 1 and Rescale Intercept to 0 Jan 12, 2016 at 7:45
  • IMHO this is not true. The Pixel Representation expresses how the raw pixel data in the file shall be interpreted. After that, the Modality LUT is applied. E.g. for a CT which produces Hounsfield units, one common way of encoding is to store the pixel data unsigned and have Rescale Intercept set to -1000 (or something near that) to shift these values to the hounsfield scale Jan 13, 2016 at 7:02
1

If you know the real-world range, you should be able to calculate the scale and intercept to fix in the header, leaving everything else like the window levels the same. See below for the calculations...

From the good image, if you find the range of the pre-scaled data, it might look like this:

min1 = 100
max1 = 1900

Using the header scale/intercept info...

scale1 = 5
intercept1 = 500

... you can then convert it into real-world, meaningful values:

(min1 * scale1) + intercept1 = real-min
(max1 * scale1) + intercept1 = real-max

real-min = 1000
real-max = 10000
real-range = 9000

In the bad image, you need to ignore the header and just find the pre-scaled data range. For example:

min2 = -100
max2 = 17900
range2 = 18000

Now calculate the scale and intercept using the real-world range:

scale2 = (real-range / range2) = 0.5
intercept2 = real-max - (max2 * scale2) = 1050

Applying them, you can test that you get the right real-world values:

(min2 * scale2) + intercept2 = (-100 * 0.5) + 1050 = 1000 = real-min
(max2 * scale2) + intercept2 = (17900 * 0.5) + 1050 = 10000 = real-max
2
  • IMO this is not a solution, but just a workaround to be able to obtain some kind of usable images
    – jap1968
    Jan 8, 2016 at 7:05
  • @jap1968 It's an answer to the question posed. Jan 8, 2016 at 12:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.