16 bit CT images too bright
Moderator: Moderator Team
16 bit CT images too bright
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
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
-
- Posts: 101
- Joined: Wed, 2009-07-08, 16:06
- Location: Oldenburg, Germany
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.
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.
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?
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?
-
- Posts: 101
- Joined: Wed, 2009-07-08, 16:06
- Location: Oldenburg, Germany
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
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.
As I mentioned the same image is presented properly in other viewers, so there should be a workaround.
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
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 ...Why isnt it possible to calculate the upper limit?
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.As I mentioned the same image is presented properly in other viewers, so there should be a workaround.
Who is online
Users browsing this forum: Baidu [Spider], Google [Bot] and 1 guest