7.1. How to apply a LUT to a ChannelΒΆ
In this example, we will apply a Lookup Table to a Channel called channel to a scene:
from ORSServiceClass.ORSWidget.orslutwidget.orslutlogic import OrsLUTLogic
from OrsHelpers.layoutpropertieshelper import LayoutPropertiesHelper
from OrsHelpers.layoutHelper import LayoutHelper
from OrsLibraries.workingcontext import WorkingContext
from ORSModel import Channel, VisualChannel
visualChannel = channel.getFirstChildOfClass(VisualChannel.getClassNameStatic())
lutUUID = OrsLUTLogic.getFirstLutUUIDByLutName("temperature")
view = WorkingContext.getCurrentView(None)
sceneLayout = LayoutHelper.getSceneLayoutOfView(view)
LayoutPropertiesHelper.set2DLUTUUID(sceneLayout, visualChannel, lutUUID)
LayoutPropertiesHelper.set3DLUTUUID(sceneLayout, visualChannel, lutUUID)
view.refresh()