# Apply window width and level on 8 bit dicom image which was converted from 16 bit image

• 10-02-2007, 10:33 AM
unix
Apply window width and level on 8 bit dicom image which was converted from 16 bit image
Dear friends,

I Have a problem with applying window width and level to a 16 bit dicom
images.

For display, I am converting this 16 bit to 8 bit.

Before conversion, I am applying window width and level to this 16 bit
image pixel.
It is working fine.

I would like to know, how can I apply further window width and level to
the new 8 bit image pixel.

Is there any algorithm or mathematical ratios for convert the window
width
and level values accordingly , so that it can be applicable to 8 bit
image.

Thanks and regards
Alvin

• 10-02-2007, 10:33 AM
unix
Re: Apply window width and level on 8 bit dicom image which was converted from 16 bit image

alvin schrieb:
[color=blue]
> Dear friends,
>
> I Have a problem with applying window width and level to a 16 bit dicom
> images.
>
> For display, I am converting this 16 bit to 8 bit.
>
> Before conversion, I am applying window width and level to this 16 bit
> image pixel.
> It is working fine.
>
> I would like to know, how can I apply further window width and level to
> the new 8 bit image pixel.
>
> Is there any algorithm or mathematical ratios for convert the window
> width
> and level values accordingly , so that it can be applicable to 8 bit
> image.
>
> Thanks and regards
> Alvin[/color]

Why would you want to do this? You cut down the grayscale range
dramatically in the 16 to 8bit convertion step, thats why this step
should be the last before displaying the image.

My application uses the following pipeline for mouse "windowing":

Mouse move event
|
rescale 16 bit buffer with new win width and center via slope/intercept
equation
|
Downscaling from 16/12/10 bit to 8 bit
| |
Copy new 8bit buffer into windows DIP

As you can see, rescaling is done before downscaling.

regards,
Andreas

• 10-02-2007, 10:33 AM
unix
Re: Apply window width and level on 8 bit dicom image which was converted from 16 bit image
This is exactly what I am doing now.
But I am facing a problem with images having large size, for example,
some CR iamges width x height = 2048 x 2048
In this case,
applying rescale 16 bit buffer with new win width and center via
slope/intercept
+
Downscaling to 8 bit

is taking lots of time.

Thanks and Regards
Alvin

• 10-02-2007, 10:33 AM
unix
Re: Apply window width and level on 8 bit dicom image which was converted from 16 bit image
Hello Alvin,

Apply a better algo for window width or window level. Try to use some
low level row wise or col wise image manipulations function calls
rather than by evey pixel.

The end user might not always use a high resolution monitir that is 1K
by 1K. Under conventional monitor you can resize the original image 16
bit image to the current view resolution and then apply ww and wl. I am
doing the same i am getting good results on a low end workstation. My
customers max resolution is less that 1200 by 800.

with regards

alvin wrote:[color=blue]
> Thanks Andreas for the reply.
> This is exactly what I am doing now.
> But I am facing a problem with images having large size, for example,
> some CR iamges width x height = 2048 x 2048
> In this case,
> applying rescale 16 bit buffer with new win width and center via
> slope/intercept
> +
> Downscaling to 8 bit
>
> is taking lots of time.
>
>
> Thanks and Regards
> Alvin[/color]

• 10-02-2007, 10:33 AM
unix
Re: Apply window width and level on 8 bit dicom image which was converted from 16 bit image
Hello Alvin,

Apply a better algo for window width or window level. Try to use some
low level row wise or col wise image manipulations function calls
rather than by evey pixel.

The end user might not always use a high resolution monitir that is 1K
by 1K. Under conventional monitor you can resize the original image 16
bit image to the current view resolution and then apply ww and wl. I am
doing the same i am getting good results on a low end workstation. My
customers max resolution is less that 1200 by 800.

with regards

alvin wrote:[color=blue]
> Thanks Andreas for the reply.
> This is exactly what I am doing now.
> But I am facing a problem with images having large size, for example,
> some CR iamges width x height = 2048 x 2048
> In this case,
> applying rescale 16 bit buffer with new win width and center via
> slope/intercept
> +
> Downscaling to 8 bit
>
> is taking lots of time.
>
>
> Thanks and Regards
> Alvin[/color]

• 10-02-2007, 10:34 AM
unix
Re: Apply window width and level on 8 bit dicom image which was converted from 16 bit image