This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Monday, July 23, 2007 6:22:53 PM(UTC)
Groups: Registered
Posts: 2
Hi:
I want do a conversion.
Original image with attributes:
Bits Allocated: 16
Bits Stored: 16
High Bit: 15
signed
I want the image result with attributes:
Bits Allocated: 16
Bits Stored: 12
High Bit: 11
unsigned
How Can I do?
I am a Chinese,I am not sure You Can see me inextenso,But I really want Your Help.
Thanks
#2
Posted
:
Wednesday, July 25, 2007 7:21:03 AM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 764
I would try using L_ColorResBitmap to convert the image to 12bpp. After that you will probably need to call L_GetMinMaxBits and then update your tags (bits allocated, stored, etc.) accordingly.
As for going from signed to unsigned, use the function L_ConvertBitmapSignedToUnsigned.
These functions are from the API, but there should be equivalents in whatever interface you're using.
#3
Posted
:
Wednesday, July 25, 2007 6:53:49 PM(UTC)
Groups: Registered
Posts: 2
I using LEADTOOLS Visual Component library(VCL) and LEADTOOLS DICOM VCL.
Can you do this conversion for me? post the code here. I think that is perfection.
then source file is attached.
thanks again.
#4
Posted
:
Friday, July 27, 2007 6:55:41 AM(UTC)
Groups: Registered, Tech Support
Posts: 207
Was thanked: 3 time(s) in 3 post(s)
What you're trying to do cannot be done. The image you have provided has a Minimum Value of -3023 and a Maximum Value of 1418. Meaning it contains 4441 values. It would take 2^13 bits per pixel to display this many values as 2^12 would only allow 4096 values.
An option you could use though would be the RemapIntensity to map the values from 2^13 to 2^12. I would recommend using this function.
Travis Montgomery
Senior Sales Engineer
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.