Change display default settings to abdominal window

Hey there,

I am wondering if there is a possibility to change the settings for imported DICOMS to be displayed in the soft tissue/abdomen window by default. I will be doing a lot of annotations on the abdominal region and a default window of settings W:400 L:-150 would be perfect, saving the time of changing the window for every single study.

Any help is much appreciated, thanks in advance.

I’m using this in .slicerrc.py :

def setPreferredScalarVolumeWindowLevel(inputVolume):
    if inputVolume is None or inputVolume.GetClassName() != "vtkMRMLScalarVolumeNode":
        return
    # https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository
    displayNode = inputVolume.GetDisplayNode()
    displayNode.AutoWindowLevelOff()
    # CT-Bones
    displayNode.SetWindow(1000)
    displayNode.SetLevel(400)

You may adapt it and map it to a keyboard shortcut, or add an observer to the scene on its ‘onNodeAdded’ event.

2 Likes

Thank you, this worked for me!

1 Like