Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, December 11, 2009 8:32:10 PM(UTC)

gag2463  
gag2463

Groups: Registered
Posts: 19


hello guys !~

i have trouble in ajusting WindowsLevel and WindowsWidth,

the Leadertools support ajusting wl and ww of 16-bit grayscale image by
WindowLevelCommand , but how to do this with the 8-bit grayscale(or
10-bit) from DCM file, convert the 8-bit RasterImage to 16-bit?
and convert the 8-bit RasterImage's lut to 16-bit's?
if like this, how to make it exact?


hurry for the ansewer ...

thanks!..
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Sunday, December 13, 2009 7:28:33 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

In LEADTOOLS there's support for 8, 12 and 16-bit grayscale images as follows:
1. All 8-bit images have palettes. If the palette contains pure grayscales, which are RGB(0,0,0) to RGB(255,255,255), the image is grayscale.
2. 10-bit gray images are a special case of 12- or 16-bit images. The number of allocated bits would be 12 or 16, and the number of stored bits would be 10.

The Window Level functions in LEADTOOLS only work on 12 and 16 bit images, but not 8-bit images. This means they also work on 10-bit images.
If you want to have a similar effect with 8-bit images, you can either convert them to 12/16 bits, or you can manipulate the palette, which lets you change the display without modifying pixel data.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Monday, December 14, 2009 12:34:54 AM(UTC)

gag2463  
gag2463

Groups: Registered
Posts: 19


Thank u for reply!~

I covert 8-bits to 16-bits as u said, when I try to windowleve the image , I found that with original ww/wl  8-bit image 's lut is RasterColor[256], but 16-bit img's is RasterColor[65536], the problem is that it's hard to fill the 16-bit img' lut by the original ww/wl,  I don't think it will be exact, I means that in 8-bit the RasterColor[256] is 0~255 -->RGB(0,0,0) to RGB(255,255,255) , and in 16-bit the RasterColor[65536] is 0~65535-->RGB(0,0,0) to RGB(255,255,255) , how to accurattly calculate the 16-bit's ww/wl by the original ww/wl?

thanks!

 
#4 Posted : Monday, December 14, 2009 3:07:36 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

The displayed pixels are always in the 0 to 255 intensity range, because that's what normal RGB monitors can display.
If the data is in the 16 bits range, the intensity of each pixel is divided by 256 before it is displayed. This is done using integer division.
This means 65535 becomes 255, 10000 becomes 39, 1000 becomes 3 and so on.
If you want to fill a lookup table based on this, you can do the conversion in a loop.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#5 Posted : Monday, December 14, 2009 4:22:51 PM(UTC)

gag2463  
gag2463

Groups: Registered
Posts: 19


I have do it in a loop , like that RasterColor[0]~RasterColor[255] becomes 0, RasterColor[256]~RasterColor[511] becomes 1, and RasterColor[65280]~RasterColor[65535] becomes 255, becouse of  different form Windowleveling the 16-bits by MecicalView , so it will not be an authority, and it make me in a difficult position , I can't find a authoritative law.....

ps. u means that is there monitors can support over 0 to 255 intensity range, if like this, how does LTs support?

 

thank u!!~

 

 
#6 Posted : Tuesday, December 15, 2009 5:25:21 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

I have never seen a monitor display driver that supports more than 256 gray levels, so unless you have such a monitor, you don't need to worry about them.
About your problem, do you mean you want to display something in a specific way (similar to some viewer), but you're getting the desired output? If yes, please send me a detailed description of what you need to do. If there's a sample image that shows the requirements, send it to me with steps that show what you mean.
If you post a file, please put it in a ZIP or RAR file and do not use the Preview feature on our forums.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#7 Posted : Wednesday, December 16, 2009 12:48:24 AM(UTC)

gag2463  
gag2463

Groups: Registered
Posts: 19


first , got a 8bit gray img and its ww/wl( for example , 80/80) from the DCM file ... and u know , the LTs is only support 16bit(maybe and 12bit.....but not 8bit)  windowleveling the RasterImage, so I creat a 16bit image's clone(for windowleveling ).

then , I have to chang  the ww/wl   to 40/40,  I try to fill a lut[256]  with ww/wl(40/40) for 8bits img, and then if i successfully convert the lut[256]  to lut[65536] for the img's clone , i think that it will be displayed the same effect. but i 'm not sure whether  the lut[65536] is divided by 256 using integer division, like what i say before  , just by 256 using integer division is ok ? i don't want some specific ways , i just ..not sure... maybe 0~200 to 0, and 201 ~512 to 1,  who knows ..[:$]

last , if the lut[65536] is filled successfully , i think it will be finished..

 

 
#8 Posted : Wednesday, December 16, 2009 5:40:44 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

I'm afraid I still don't understand the requirements. Can you answer the following questions?
1. Do you have an image you want to load and display using LEADTOOLS?
2. If yes, is the image displaying correctly or incorrectly?
3. If it is displaying correctly, are you trying to change its display in any way? If yes, how exactly?
4. If it is displaying incorrectly, what is the expected result?
5. Can you send me the original image before any changes were made to it and explain to me what you're trying to do with it?

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#9 Posted : Thursday, December 17, 2009 12:29:40 AM(UTC)

gag2463  
gag2463

Groups: Registered
Posts: 19


attachment is DCM file ..and is 8bits , it's original ww/wl is 255/128 , I need to change the ww/wl by user-defined (customer required) ,  because LTs's WindowLevelCommand  not support windowleveling the 8bit img, so, i try to convert the 8bit-img to 16bits image , and convert the 8bit's lut  to16bit's , is that clearly? 

ps. if i want to windowleveling the color image, how should i do...the customer required me to convert the Y of  color image's  NTSC  format, how does Lts  support this..?  and i know that first i should convert  the RGB format to NTSC format(and i know the interface.), and then how should i do ? i need ur help!~

thank u!~Maen!~

File Attachment(s):
XA.rar (418kb) downloaded 25 time(s).
 
#10 Posted : Thursday, December 17, 2009 5:25:00 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

I opened the image into our main .NET demo and used the Grayscale 16 menu item to convert it to 16-bit.
I then displayed the Windows Level dialog in the demo and was able to change the window center and width parameters.
Does this do what you want? If not, what is the problem exactly?

About the new question, this question is not directly related to this issue. Please send this question in a new thread.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#11 Posted : Thursday, December 17, 2009 10:59:10 PM(UTC)

gag2463  
gag2463

Groups: Registered
Posts: 19


I know what u mean ... but it's not i wanted . the point is that  , I don't want to  base on  the  16bit's ww/wl (65535/32768) to windowlevel the 16bit' Image which is converted from dcm file's 8bit data,  as main.demo does.  because of  the custom required ,  i just know the original ww/wl(255/128) when it 's 8bit date..and i am required  to ajust the ww/wl value base on original ww/wl(255/128) ,  and then  using the changed ww/wl  value to windowleveling the data..
 
#12 Posted : Monday, December 21, 2009 5:28:47 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

Is there a reason you want to window level the 8-bit image? With 16-bit grayscale images, Window Leveling is usually done to make some of the gray shades visible, since monitors can only show 256 shades.

With 8-bit images, all shades are already displayed, so Window Leveling will likely degrade the image display instead of improving it.

If you need the effect anyway, you mentioned that the original WW/WL values are 255/128. What do you want to change them to after window leveling?

Also, using the XA.DCM sample data set, can you send me a screenshot of the expected result (the effect you want)?

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#13 Posted : Monday, December 21, 2009 11:26:01 PM(UTC)

gag2463  
gag2463

Groups: Registered
Posts: 19


thank u

i am required doing like the MedicalViewer does. and u can read the attachment . I know that maybe can't open how the viewer does,  but  the customer require me to imitate the effect . so I will try to do like it  by mouse moving.

 
#14 Posted : Monday, December 21, 2009 11:29:42 PM(UTC)

gag2463  
gag2463

Groups: Registered
Posts: 19


here is the attachment.
File Attachment(s):
Book2.rar (339kb) downloaded 25 time(s).
 
#15 Posted : Wednesday, December 23, 2009 6:37:05 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

For 8-bit images, our viewer does not perform actual window-leveling. Instead, the palette entries of the image are being handled.

If you want the features of the Image Viewer control, I suggest you use the Image Viewer itself. Our engineers do not publish the source code of the control, so trying to implement its features into your own code might not always be easy.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#16 Posted : Wednesday, December 23, 2009 5:21:13 PM(UTC)

gag2463  
gag2463

Groups: Registered
Posts: 19


I' m sorry that I 'm not allow to use the viewer . Thank u for all the replys.

 
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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.593 seconds.