def __init__(self): self.step = 0 self.sliceLogic = slicer.vtkMRMLSliceLayerLogic() self.sliceLogic.SetMRMLScene(slicer.mrmlScene) self.sliceNode = slicer.vtkMRMLSliceNode() self.sliceNode.SetLayoutName("Black") slicer.mrmlScene.AddNode(self.sliceNode) self.sliceLogic.SetSliceNode(self.sliceNode)