Profile: Toolbars with profile tools

Utility functions, toolbars and actions to create profile on images and stacks of images

ProfileToolBar class

class silx.gui.plot.Profile.ProfileToolBar(parent=None, plot=None, profileWindow=None, title='Profile Selection')[source]

Bases: PyQt4.QtGui.QToolBar

QToolBar providing profile tools operating on a PlotWindow.

Attributes:

  • plot: Associated PlotWindow.
  • profileWindow: Associated PlotWindow displaying the profile.
  • actionGroup: QActionGroup of available actions.

To run the following sample code, a QApplication must be initialized. First, create a PlotWindow and add a ProfileToolBar.

>>> from silx.gui.plot import PlotWindow
>>> from silx.gui.plot.Profile import ProfileToolBar
>>> from silx.gui import qt
>>> plot = PlotWindow()  # Create a PlotWindow
>>> toolBar = ProfileToolBar(plot=plot)  # Create a profile toolbar
>>> plot.addToolBar(toolBar)  # Add it to plot
>>> plot.show()  # To display the PlotWindow with the profile toolbar
Parameters:
  • plotPlotWindow instance on which to operate.
  • profileWindowProfileScanWidget instance where to display the profile curve or None to create one.
  • title (str) – See QToolBar.
  • parent – See QToolBar.
eventFilter(qobject, event)[source]

Observe when the close event is emitted to clear the profile

Parameters:
  • qobject – the object observe
  • event – the event received by qobject
overlayColor[source]

The color to use for the ROI.

If set to None (the default), the overlay color is adapted to the active image colormap and changes if the active image colormap changes.

clearProfile()[source]

Remove profile curve and profile area.

updateProfile()[source]

Update the displayed profile and profile ROI.

This uses the current active image of the plot and the current ROI.

hideProfileWindow()[source]

Hide profile window.

Profile3DToolBar class

class silx.gui.plot.Profile.Profile3DToolBar(parent=None, plot=None, title='Profile Selection')[source]

Bases: silx.gui.plot.Profile.ProfileToolBar

eventFilter(qobject, event)[source]

Observe the show and hide events of the widgets related to the profile plot (a container widget, a Plot1D and a Plot2D)

Parameters:
  • qobject – the observed object
  • event – the event received by qobject
updateProfile()[source]

Method overloaded from ProfileToolBar, to pass the stack of images instead of just the active image.

In 1D profile mode, use the regular parent method.

hideProfileWindow()[source]

Hide container window for profile windows.

getProfileWindow1D()[source]

Plot window used to display 1D profile curve.

Returns:Plot1D
getProfileWindow2D()[source]

Plot window used to display 2D profile image.

Returns:Plot2D

Table Of Contents

Previous topic

PlotTools: Tool widgets for PlotWidget

Next topic

CurvesROIWidget: ROI from curves

This Page