def TestCallback(self): dialog = slicer.vtkKWMessageDialog() dialog.SetParent(slicer.ApplicationGUI.GetMainSlicerWindow()) dialog.SetMasterWindow(slicer.ApplicationGUI.GetMainSlicerWindow()) dialog.SetStyleToMessage() dialog.SetText("TestCallback") dialog.Create() dialog.Invoke()
def ErrorDialog(self, text): slicer.Application.InformationMessage(text) dialog = slicer.vtkKWMessageDialog() parent = slicer.ApplicationGUI.GetMainSlicerWindow() dialog.SetParent(parent) dialog.SetMasterWindow(parent) dialog.SetStyleToMessage() dialog.SetText(text) dialog.Create() dialog.Invoke()
def CheckForVmtkLibrary(self): try: t = slicer.vtkvmtkFastMarchingUpwindGradientImageFilter() except Exception: d = slicer.vtkKWMessageDialog() d.SetParent(slicer.ApplicationGUI.GetMainSlicerWindow()) d.SetMasterWindow(slicer.ApplicationGUI.GetMainSlicerWindow()) d.SetStyleToMessage() d.SetText("VmtkSlicerModule not found! Please install the VmtkSlicerModule extension to use this module!") d.Create() d.Invoke() return 0 return 1