Setting default window width (WW) and default window level (WL)
See original GitHub issueWe 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:
After applying lung window (WW=1500, WL=-600):
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:
- Created 2 years ago
- Reactions:1
- Comments:11 (1 by maintainers)
Top GitHub Comments
>> or add presets to the right-click menu in slice viewers.
For your information, this function is now available in SLicer 5
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.