layerstack.insert( 0, layer )
volumeEditor = VolumeEditor( layerstack )
volumeEditorWidget = VolumeEditorWidget(parent=self)
volumeEditorWidget.init(volumeEditor)
if imageSlot.ready() and imageSlot.meta.axistags is not None:
// Use an Op5ifyer adapter to transpose the shape for us.
op5 = Op5ifyer( graph=imageSlot.graph )
op5.input.connect( imageSlot )
dataShape = op5.output.meta.shape
volumeEditor.dataShape = dataShape
// We just needed the operator to determine the transposed shape.
// Disconnect it so it can be garbage collected.
op5.input.disconnect()
self.volumeEditors[imageSlot] = (volumeEditorWidget, layerstack)
self.viewerStack.addWidget( volumeEditorWidget )
// Show the right one
self.viewerStack.setCurrentWidget( self.volumeEditors[imageSlot][0] )