Custom window/level presets


I often import many images of the same type, and they all should be the same window/level which I would like to set (when Slicer loads them they are washed out with the auto W/L). It is very tedious to go through each one on the Volumes module and type in the appropriate window and level value for each image. Is there a way I could customize a preset window/level setting? Or maybe just change a bunch of them at the same time? I welcome GUI or programmatic advice.


You can set default window/level settings like this (the example sets minimum/maximum to 30/60):

defaultVolumeDisplayNode = slicer.mrmlScene.CreateNodeByClass("vtkMRMLScalarVolumeDisplayNode")

You can add this code snippet to your file to set these defaults persistently.

1 Like