[Dcmlib] Signed Images

Aris Basic aris.basic at silencesoftware.com
Tue Jun 14 18:24:57 CEST 2005


I guess you miss understood me. Applyig W/L transformation to the pixel 
data for display.
and yeah OpenGL gives me range 0..1 but for some reason the textures 
with signed pixel values
have very small range in my case and i guess its not becasue of gdcm 
butbecasue fo me or how opengl read it but ill
continue to hunt :)

thx for your help
Aris

Mathieu Malaterre wrote:

> you're the boss ! I don't think opengl is giving you access to the 
> scalar range, I believe it always assume texture are [0,1]
>
> Anyway he fastest ever solution would still be reading the value from 
> the DICOM tags, by any chance do you have those values in your images ?
>
> Mathieu
>
> On Jun 14, 2005, at 12:07 PM, Aris Basic wrote:
>
>> applying it to the image in fastes possible way :)
>> and correspodning formula is why i went towards OpenGL (should allowe 
>> me to use GPU to do it)
>> dont get how VTK adn some other libraries do it very fast withouth 
>> GPU :(
>>
>>
>> Mathieu Malaterre wrote:
>>
>>> For the window/level is is pretty easy:
>>>
>>> double range[2];
>>> my_function(range, image);
>>> // range now contains the pixel value min and pixel value max.
>>>
>>> level = (range[1]+range[0] )/2
>>> window = range[1]-range[0]
>>>
>>> In theory there is a window/level tag in DICOM but I don't trust 
>>> them :P
>>>
>>> HTH
>>> Mathieu
>>>
>>> On Jun 14, 2005, at 11:38 AM, Aris Basic wrote:
>>>
>>>> I have some of my images havnot tested it with gdcm provided images 
>>>> will probably do it and compare with vtkgdcmViewer.
>>>> IM trying to display them with OpenGL (creating and RECT texture 
>>>> from pixel data [ opengl supposedly shoudl be able to
>>>> deal with signed pixel data , but doesnt look like its doing )
>>>> (i tryed too figgure out how is VTK donig the W/L transfomration 
>>>> and rest but did not have luck finding that piece of code quickly :)
>>>>
>>>>
>>>> Jean-Pierre Roux wrote:
>>>>
>>>>> Aris Basic wrote:
>>>>>
>>>>>> is gdcm doing any conversion on pixel data from signed 
>>>>>> (pixelrepresentation == 1) images ?
>>>>>> pixelrepresentation == 0 images i can display nicely but 
>>>>>> representation 1 they come up strange :(
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> gdcm doesn't make any transformation for 'signed pixels'.
>>>>> It's up to the user to deal with the sign.
>>>>> How do you display the image?
>>>>> Did you try with vtkgdcmViever? (of course, you need VTK ...)
>>>>>
>>>>> In our test data set ( gdcmData), there are a few 'signed pixels' 
>>>>> images :
>>>>>
>>>>> MR-MONO2-16-head.dcm CT-MONO2-16-chest.dcm
>>>>> CT-MONO2-16-ankle.dcm  CT-MONO2-16-ort.dcm
>>>>> CT-MONO2-16-brain.dcm
>>>>> GE_RHAPSODE-16-MONO2-JPEG-Fragments.dcm 
>>>>> GE_GENESIS-16-MONO2-Uncompressed-UnusualVR.dcm
>>>>> GE_GENESIS-16-MONO2-WrongLengthItem.dcm 
>>>>> PICKER-16-MONO2-No_DicomV3_Preamble.dcm
>>>>> 012345.002.050.dcm
>>>>>
>>>>> Did you try to display them?
>>>>> HTH.
>>>>>
>>>>> Jean-Pierre
>>>>>
>>>>>>
>>>>>> jsut trying to find a bug :) not pointing fingers
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Thx for reporting it.
>>>>> Could you send us one of your images, so we can check 'at home' if 
>>>>> there is any problem.
>>>>>
>>>>>>
>>>>>>
>>>>>> Aris
>>>>>> _______________________________________________
>>>>>> Dcmlib mailing list
>>>>>> Dcmlib at creatis.insa-lyon.fr
>>>>>> http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib
>>>>>>
>>>>
>>>> _______________________________________________
>>>> Dcmlib mailing list
>>>> Dcmlib at creatis.insa-lyon.fr
>>>> http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib
>>>>
>>>
>>
>




More information about the Dcmlib mailing list