Code in fo-dicom to apply window width and center on an image #1903
-
|
I am using fo-dicom to render images and change the window width and center of the images. All works great. I have a scenario where i dont have the dicom file and yet, and i need to apply the window width and center. This is then used while rendering the image. I would like to know where exactly the window width and center are applied? I would have expected following code somewhere to apply ww/wl.. Where can i find this in fo-dicom code?? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
fo-dicom uses a more generic approach than your code. The calculation of the pixel data depending on WindowLevel and WindowWith does not apply to the definition in DICOM-Standard. WindowWidth and WindowCenter are not always applied in a linear way, sometimes you have to use SIGMOID, a exponential function. This depends on the content of VOILUTFunction (https://dicom.innolitics.com/ciods/breast-projection-x-ray-image/breast-projection-x-ray-image-multi-frame-functional-groups/52009229/00289132/00281056) Then there are other properties like rescale slope and rescale intercept. Futhermore some images contain Lookup-Tables, that have to be applied. Your code assumes that the pixeldata always has 16 bits, but it also may be 8 bit, or 24 bit color. etc etc etc In fo-dicom the The |
Beta Was this translation helpful? Give feedback.
-
|
The question has been solved with no further feedback. This issue may be closed. |
Beta Was this translation helpful? Give feedback.
fo-dicom uses a more generic approach than your code. The calculation of the pixel data depending on WindowLevel and WindowWith does not apply to the definition in DICOM-Standard. WindowWidth and WindowCenter are not always applied in a linear way, sometimes you have to use SIGMOID, a exponential function. This depends on the content of VOILUTFunction (https://dicom.innolitics.com/ciods/breast-projection-x-ray-image/breast-projection-x-ray-image-multi-frame-functional-groups/52009229/00289132/00281056)
Then there are other properties like rescale slope and rescale intercept.
Futhermore some images contain Lookup-Tables, that have to be applied.
Your code assumes that the pixeldata always …