16 bit CT images too bright

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
psih128
Posts: 17
Joined: Wed, 2009-08-26, 02:10

16 bit CT images too bright

#1 Post by psih128 »

Hi

I'm using DicomImage::getOutputData() to read the pixel data and render it in my application.

The problem is that the rendered image appears too bright for most of 16 bit CT images. I suppose that image Width/Center is not set properly, but the dicom tags for these values are present and set. Should I manually set Width/Center on this kind of images? What is the right way to calculate them?

Also, pretty often the values for WIdth/Center are such that they suggest that there are negative pixel values (ex: Width = 1000, Center = 200). Is this because Pixel Representation is set to 1, and the actual pixel data is signed? How do I calculate the proper (signed?) maximum and minimum values for Width and Center (in case I want to adjust brightness/ contrast)

Thanks

omarelgazzar
Posts: 101
Joined: Wed, 2009-07-08, 16:06
Location: Oldenburg, Germany

#2 Post by omarelgazzar »

The WW/WL refers to the VOI trnasformation after applying modality Lut transformation (rescale slope/rescale intercept). If the pixel data is signed (i.e pixel representation = 1) and the modality lut is identity (rescale slope =1 and rescale intercept = 0), then you could expect wc of negative values. However, if the modality lut converts the pixel data from signed to unsigned, then WW/WL should refer to unsigned pixel data after the modality lut has been applied.

You can use the function DicomImage::setMinMaxWindow(0) to set the window to the min and max of the full pixel data. You can then use the function getWindow(wc,ww) to know the current ww/wc values.
Last edited by omarelgazzar on Fri, 2011-04-15, 21:39, edited 1 time in total.

psih128
Posts: 17
Joined: Wed, 2009-08-26, 02:10

#3 Post by psih128 »

What for the clarification on Length/Center. But if I want to adjust them - how do I calculate the appropriate range of values for L/C? From what you have said it is possible that Window will span over negative values. But getOutputData guarantees that all pixel data is unsigned... Basically I want to add some controls that will let the user to change the Window, and I need to know what is the appropriate range of values? Is it whatever is set by setMinMaxWindow?

I do call setMinMaxWindow(0) before retrieving the data, it affect the output, but the image still looks too bright, some images appear just grey - all the image features seem like noise on it. Other readers render the same image properly - all the details are visible. What might be the problem?

omarelgazzar
Posts: 101
Joined: Wed, 2009-07-08, 16:06
Location: Oldenburg, Germany

#4 Post by omarelgazzar »

The window width value is >=1 and it is maximum if it covers the full range of the input pixel data (from 0 to 2^n-1; where n is the number of bits stored) (see C.11.2.1.2). You can try the function setWindow(ww,wc) to change ww and/or wc using values provided by the user controls.

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#5 Post by Jörg Riesmeier »

Basically, there is no upper limit for Window Center and Window Width. There is only a lower limit for Window Width (as Omar wrote). So, IMHO it makes no sense to use a GUI control that expects fixed min/max values (e.g. a slider).

psih128
Posts: 17
Joined: Wed, 2009-08-26, 02:10

#6 Post by psih128 »

Why isnt it possible to calculate the upper limit? There is the pixel data after the VOI LUT transformation, why cant one look up the max/min values in this data, and use them as the bounds for Window Center?

As I mentioned the same image is presented properly in other viewers, so there should be a workaround.

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#7 Post by Jörg Riesmeier »

Why isnt it possible to calculate the upper limit?
Because the Window Width can be higher than the pixel value range, and the Window Center can be outside of the pixel value range. Usually, the user can change these values with the mouse (cursor) moving over the image ...
As I mentioned the same image is presented properly in other viewers, so there should be a workaround.
This is a totally different question. Either there is a bug in the rendering pipeline of DCMTK (btw, which version are you using?) or the image is encoded incorrectly. If you want us to analyze your image, please send it by email to dicom/at/offis/dot/de.

Post Reply

Who is online

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