Пример #1
0
    def onApply(self):
        logic = WatershedFromMarkerEffectLogic(EditUtil.getSliceLogic())
        logic.undoRedo = self.undoRedo

        logic.sigma = float(self.sigmaSpinBox.value)

        logic.doit()
Пример #2
0
    def changeLabel(self):
        #
        # change the label values based on the parameter node
        #
        if not self.sliceLogic:
            self.sliceLogic = EditUtil.getSliceLogic()
        parameterNode = EditUtil.getParameterNode()
        parameterNode = EditUtil.getParameterNode()
        inputColor = int(
            parameterNode.GetParameter("ChangeLabelEffect,inputColor"))
        outputColor = int(
            parameterNode.GetParameter("ChangeLabelEffect,outputColor"))

        change = slicer.vtkImageLabelChange()
        if vtk.VTK_MAJOR_VERSION <= 5:
            change.SetInput(self.getScopedLabelInput())
        else:
            change.SetInputData(self.getScopedLabelInput())
        change.SetOutput(self.getScopedLabelOutput())
        change.SetInputLabel(inputColor)
        change.SetOutputLabel(outputColor)

        # TODO
        #$this setProgressFilter $change "Change Label"
        change.Update()

        self.applyScopedLabel()
        change.SetOutput(None)
  def onApply(self):
    logic = WatershedFromMarkerEffectLogic( EditUtil.getSliceLogic() )
    logic.undoRedo = self.undoRedo

    logic.sigma = float( self.sigmaSpinBox.value )

    logic.doit()
Пример #4
0
  def changeLabel(self):
    #
    # change the label values based on the parameter node
    #
    if not self.sliceLogic:
      self.sliceLogic = EditUtil.getSliceLogic()
    parameterNode = EditUtil.getParameterNode()
    parameterNode = EditUtil.getParameterNode()
    inputColor = int(parameterNode.GetParameter("ChangeLabelEffect,inputColor"))
    outputColor = int(parameterNode.GetParameter("ChangeLabelEffect,outputColor"))

    change = slicer.vtkImageLabelChange()
    if vtk.VTK_MAJOR_VERSION <= 5:
      change.SetInput( self.getScopedLabelInput() )
    else:
      change.SetInputData( self.getScopedLabelInput() )
    change.SetOutput( self.getScopedLabelOutput() )
    change.SetInputLabel( inputColor )
    change.SetOutputLabel( outputColor )

    # TODO
    #$this setProgressFilter $change "Change Label"
    change.Update()

    self.applyScopedLabel()
    change.SetOutput( None )
Пример #5
0
    def __init__(self, parent=0):
        super(FastMarchingEffectOptions, self).__init__(parent)

        # self.attributes should be tuple of options:
        # 'MouseTool' - grabs the cursor
        # 'Nonmodal' - can be applied while another is active
        # 'Disabled' - not available
        # self.attributes = ('MouseTool')
        self.displayName = 'FastMarchingEffect Effect'

        self.logic = FastMarchingEffectLogic(EditUtil.getSliceLogic())
Пример #6
0
  def __init__(self, parent=0):
    super(FastMarchingEffectOptions,self).__init__(parent)

    # self.attributes should be tuple of options:
    # 'MouseTool' - grabs the cursor
    # 'Nonmodal' - can be applied while another is active
    # 'Disabled' - not available
    # self.attributes = ('MouseTool')
    self.displayName = 'FastMarchingEffect Effect'

    self.logic = FastMarchingEffectLogic(EditUtil.getSliceLogic())