コード例 #1
0
 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()
コード例 #2
0
ファイル: EndoscopyGUI.py プロジェクト: kamirow/Slicer4
 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()
コード例 #3
0
 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()
コード例 #4
0
    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