question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Setting default window width (WW) and default window level (WL)

See original GitHub issue

We have had some feedback from clinical partners regarding setting of window for highlighting different organs. The window/levels are defined typically by window width (WW) and window level (WL). This is then used in the following formula to set the min/max levels for CT images. w_min = WL - WW/2 w_max = WL+WW/2

More info about this can be found here: https://radiopaedia.org/articles/windowing-ct?lang=gb

There are known WL/WW values for different organs/tissues (as listed in the above link).

For example, a lung window is typically defined as WW=1500 and WL=-600. This has the following effect on visualizing the image volume:

Before applying lung window: image

After applying lung window (WW=1500, WL=-600): image

You can notice that it highlights tissues/lesions inside lung better. The above is just one example, the values for WW/WL can vary for different organs and institute.

In 3D Slicer, the above can be achieved as:

WL=-600; WW=1500
volumeNode = slicer.mrmlScene.GetFirstNodeByClass("vtkMRMLScalarVolumeNode")
volumeNode.GetDisplayNode().SetAutoWindowLevel(False)
volumeNode.GetDisplayNode().SetWindowLevelMinMax(WL-WW/2, WL+WW/2)

Does this sound like something we can pass as argument from an app as default, given that we know the target organ/tissue and its WL/WW. In cases where these are not present, we can skip updating the above. In other cases where the user wants to change these, there is a window level button that can be used to adjust manually.

cc: @tvercaut

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
rbummcommented, Jun 17, 2022

>> or add presets to the right-click menu in slice viewers.

For your information, this function is now available in SLicer 5

3reactions
lassoancommented, Oct 8, 2021

If you load the data from DICOM then the recommended WW/WL values are stored in the file and Slicer applies them when the data is loaded. If you load from nrrd or there is no WW/WL in the DICOM file then the full intensity range is displayed, which indeed may not be always ideal.

I agree that it could also make sense for the applications to specify display options, such as WW/WL, colormap, threshold value, but also things like enable/disable volume rendering (and volume rendering settings) or hanging protocols (defining a list of views and what each view should display).

Alternatively, you could make WW/WL sticky. It would be very easy to implement this: when the user requests loading of the next data set, you would first remember the WW/WL value of the current volume and then apply this to the volume that you load next.

Also note that users can choose WW/WL preset in Volumes module in Slicer (see screenshot below). It is probably not convenient for users to switch modules (and they may not even know that the Volumes module exist and there are presets there), so we could make things more convenient - we are open to suggestions. For example, we could add common presets to the drop-down menu of the WW/WL mouse mode button; or add presets to the right-click menu in slice viewers.

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windowing (CT) | Radiology Reference Article - Radiopaedia
The window width (WW) as the name suggests is the measure of the range of CT numbers that an image contains. A wider...
Read more >
Window Width and Window Level - My CT Registry Review
The range of the numbers is referred to as the Window Width (WW). The center of the range is the Window Level (WL)....
Read more >
Changing brightness / contrast - RadiAnt DICOM Viewer
Click the Adjust image window button on the toolbar (or press the W key). ... to change brightness (window level - WL), or...
Read more >
CT stroke window settings: an unfortunate misleading ... - NCBI
However, the use of narrow window width (and therefore high-contrast) CT review settings (i.e. “stroke windows” [2] 40 WW 40 WL) as an...
Read more >
Image Navigation and Analysis
Other Window Width and Window Level features, such as WW/WL presets, ... All expanded image windows have text overlay with the following default...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found