def buildPlotButtons(self): bbar_name = 'Plot' bbar = ButtonBarWidget( bbar_name, self.renderWindowInteractor, position=( 0.0, 0.96) ) b = bbar.addConfigButton( names=['SliceRoundRobin'], key='p', interactionHandler=bbar.sliceRoundRobin ) b = bbar.addSliderButton( names=['XSlider'], key='x', toggle=True, group='SliceRoundRobin', state=1, sliderLabels='X Slice Position', label="Slicing", position=[0,3], interactionHandler=self.processSlicingCommand ) b.addFunctionKey( 'W', 1, Button.FuncToggleStateOff ) b = bbar.addSliderButton( names=['YSlider'], key='y', toggle=True, group='SliceRoundRobin', sliderLabels='Y Slice Position', label="Slicing", position=[1,3], interactionHandler=self.processSlicingCommand ) b.addFunctionKey( 'W', 1, Button.FuncToggleStateOff ) b = bbar.addSliderButton( names=['ZSlider'], key='z', toggle=True, group='SliceRoundRobin', sliderLabels='Z Slice Position', label="Slicing", position=[2,3], interactionHandler=self.processSlicingCommand ) b.addFunctionKey( 'W', 1, Button.FuncToggleStateOff ) b = bbar.addConfigButton( names=['ToggleSurfacePlot'], key='s', children=['IsosurfaceValue'], toggle=True, interactionHandler=self.processSurfacePlotCommand ) b = bbar.addConfigButton( names=['ToggleVolumePlot'], key='v', children=['ScaleTransferFunction'], toggle=True, interactionHandler=self.processVolumePlotCommand ) bbar.build()
def buildPlotButtons(self): bbar_name = 'Plot' bbar = ButtonBarWidget(bbar_name, self.renderWindowInteractor, position=(0.0, 0.96)) b = bbar.addConfigButton(names=['SliceRoundRobin'], key='p', interactionHandler=bbar.sliceRoundRobin) b = bbar.addSliderButton(names=['XSlider'], key='x', toggle=True, group='SliceRoundRobin', sliderLabels='X Slice Position', label="Slicing", position=[0, 3], interactionHandler=self.processSlicingCommand) b.addFunctionKey('W', 1, Button.FuncToggleStateOff) b = bbar.addSliderButton(names=['YSlider'], key='y', toggle=True, group='SliceRoundRobin', sliderLabels='Y Slice Position', label="Slicing", position=[1, 3], interactionHandler=self.processSlicingCommand) b.addFunctionKey('W', 1, Button.FuncToggleStateOff) b = bbar.addSliderButton(names=['ZSlider'], key='z', toggle=True, group='SliceRoundRobin', sliderLabels='Z Slice Position', label="Slicing", position=[2, 3], interactionHandler=self.processSlicingCommand) b.addFunctionKey('W', 1, Button.FuncToggleStateOff) b = bbar.addConfigButton( names=['ToggleSurfacePlot'], key='S', children=['IsosurfaceValue'], toggle=True, interactionHandler=self.processSurfacePlotCommand) b = bbar.addConfigButton( names=['ToggleVolumePlot'], key='v', children=['ScaleTransferFunction'], toggle=True, interactionHandler=self.processVolumePlotCommand) bbar.build()
def showConfigurationButton(self): bbar_name = 'Configure' bbar = ButtonBarWidget.getButtonBar( bbar_name ) if bbar == None: bbar = ButtonBarWidget( bbar_name, self.renderWindowInteractor ) config_button = bbar.addConfigButton( names=['Configure'], id='Configure', key='g', toggle=True, interactionHandler=self.processConfigurationToggle ) # config_button.StateChangedSignal.connect( self.togglePlotButtons ) bbar.build() bbar.show()
def showConfigurationButton(self): bbar_name = 'Configure' bbar = ButtonBarWidget.getButtonBar(bbar_name) if bbar == None: bbar = ButtonBarWidget(bbar_name, self.renderWindowInteractor) config_button = bbar.addConfigButton( names=['Configure'], id='Configure', key='g', toggle=True, interactionHandler=self.processConfigurationToggle) # config_button.StateChangedSignal.connect( self.togglePlotButtons ) bbar.build() bbar.show()