num_channels = 1
if num_channels != len(names) or num_channels != len(colors):
names = ["Label {}".format(n) for n in range(1, num_channels+1)]
colors = colortables.default16_new[1:num_channels+1]
// Use a slicer to provide a separate slot for each channel layer
opSlicer = OpMultiArraySlicer2( parent=opLane.viewed_operator().parent )
opSlicer.Input.connect( predictionSlot )
After Change
drange = channelSlot.meta.drange or (0.0, 1.0)
predictsrc = LazyflowSource(channelSlot)
predictLayer = AlphaModulatedLayer( predictsrc,
tintColor=QColor(*colors[channel]),
// FIXME: This is weird. Why are range and normalize both set to the same thing?
range=drange,
normalize=drange )