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:
PyQt5.QtWidgets.QToolBar
QToolBar providing profile tools operating on a
PlotWindow
.Attributes:
- plot: Associated
PlotWindow
on which the profile line is drawn. - 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
>>> 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: - plot –
PlotWindow
instance on which to operate. - profileWindow – Plot widget instance where to display the profile curve or None to create one.
- title (str) – See
QToolBar
. - parent – See
QToolBar
.
-
plot
¶ The
PlotWidget
associated to the toolbar.
-
getProfilePlot
()[source]¶ Return plot widget in which the profile curve or the profile image is plotted.
-
getProfileMainWindow
()[source]¶ Return window containing the profile curve widget. This can return None if a custom profile plot window was specified in the constructor.
-
overlayColor
¶ 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.
- plot: Associated
Profile3DToolBar
class¶
-
class
silx.gui.plot.Profile.
Profile3DToolBar
(parent=None, stackview=None, title='Profile Selection')[source]¶ Bases:
silx.gui.plot.Profile.ProfileToolBar
-
stackView
= None¶ StackView
instance
-
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.
-