Exemplo n.º 1
0
 def __init__(self, parent=None):
     """
 Called when the user opens the module the first time and the widget is initialized.
 """
     ScriptedLoadableModuleWidget.__init__(self, parent)
     self.logic = None
     self.subjects = None
Exemplo n.º 2
0
 def __init__(self, parent=None):
   ScriptedLoadableModuleWidget.__init__(self, parent)
   VolumeSeriesTypeSceneObserver().refresh() # is a singleton and observes the mrmlScene
   self.modulePath = os.path.dirname(slicer.util.modulePath(self.moduleName))
   SlicerPIRADSConfiguration(self.moduleName, os.path.join(self.modulePath, 'Resources', "default.cfg"))
   self._loadedVolumeNodes = OrderedDict()
   self.logic = SlicerPIRADSModuleLogic()
Exemplo n.º 3
0
    def __init__(self, parent):
        ScriptedLoadableModuleWidget.__init__(self, parent)

        global OPENCV2_AVAILABLE
        try:
            global cv2
            import cv2
            OPENCV2_AVAILABLE = True
        except ImportError:
            OPENCV2_AVAILABLE = False

        if not OPENCV2_AVAILABLE:
            logging.error("OpenCV2 python interface not available.")
            return

        self.logic = PinholeCameraRayIntersectionLogic()
        self.markupsLogic = slicer.modules.markups.logic()

        self.canSelectFiducials = False
        self.isManualCapturing = False
        self.validPinholeCamera = False

        self.centerFiducialSelectionNode = None
        self.copyNode = None
        self.widget = None
        self.videoCameraIntrinWidget = None
        self.videoCameraSelector = None
        self.videoCameraNode = None
        self.markupsNode = None

        # Observer tags
        self.videoCameraObserverTag = None
        self.videoCameraTransformObserverTag = None
        self.pointModifiedObserverTag = None

        self.videoCameraTransformNode = None
        self.videoCameraTransformStatusLabel = None

        self.okPixmap = PinholeCameraRayIntersectionWidget.loadPixmap(
            'icon_Ok', 20, 20)
        self.notOkPixmap = PinholeCameraRayIntersectionWidget.loadPixmap(
            'icon_NotOk', 20, 20)

        # Inputs/Outputs
        self.imageSelector = None
        self.videoCameraTransformSelector = None

        # Actions
        self.captureButton = None
        self.resetButton = None
        self.actionContainer = None

        # Results
        self.resultsLabel = None
        self.videoCameraToReference = None

        self.identity3x3 = vtk.vtkMatrix3x3()
        self.identity4x4 = vtk.vtkMatrix4x4()
 def __init__(self, parent=None):
     """
 Called when the user opens the module the first time and the widget is initialized.
 """
     ScriptedLoadableModuleWidget.__init__(self, parent)
     VTKObservationMixin.__init__(
         self)  # needed for parameter node observation
     self.logic = None
     self.subjects = None
Exemplo n.º 5
0
 def __init__(self, parent):
     ScriptedLoadableModuleWidget.__init__(self, parent)
     slicer.mrmlScene.Clear()
     self.logic = ResynthLogic()
     self.logic.installLibraries()
     self.modelNode = slicer.mrmlScene.AddNewNodeByClass('vtkMRMLModelNode')
     self.modelNode.CreateDefaultDisplayNodes()
     self.loadBrainMesh()
     self.makeGUI()
     slicer.resynth = self
Exemplo n.º 6
0
 def __init__(self, parent=None):
   ScriptedLoadableModuleWidget.__init__(self, parent)
 def __init__(self, parent=None):
   ScriptedLoadableModuleWidget.__init__(self, parent)