Skip to content

ENH: Allow setting color node when loading volumes

Add support to pick a non default color node when loading in a volume via python or the Add Data widget.

In the volumes reader, check for a new property, colorNodeID, and use it to set the color node information on the volume's display node after reading.

This can be used from python:

properties = {}
properties['colorNodeID'] = 'vtkMRMLColorTableNodeWarm1'
slicer.util.loadVolume(fileName, properties)

Added a color table node selector to the Volumes module IO widget. Set the default color nodes via the color logic pointer, for label maps and greyscales. Pass the colorNodeID property to the Volumes IO reader. Added testing the color node setting to the widget test.

add-color-to-vol-loading-labelmap add-color-to-vol-loading-scalar

Merge request reports

Loading