roi_histogram¶
-
class
pdsspect.roi_histogram.
ROIHistogramModel
(image_set)[source]¶ Bases:
pdsspect.roi_plot.ROIPlotModel
Model for ROI histogram and accompanying widget
-
add_selected_color
(color)¶ Select a color and inform views to display new color
Parameters: color ( str
) – The color to add
-
compare_data
¶ bool
– True ifimage_index
is not-1
-
image_index
¶ int
– The index of the image to which to compare data withWhen setting
image_index
, it may be changed to-1
if the image is the same as the current image. Furthermore, when setting theview_index
, theimage_index
may be changed to-1
if theview_index
and thecurrent_image_index
are the same.
-
image_set
¶ PDSSpectImageSet
– Image set that corresponds with the current view
-
image_sets
¶ list
– All the image sets, including the current one
-
register
(view)¶ Register view with the model
-
remove_selected_color
(color)¶ Remove a selected color and inform views to not display the color
Parameters: color ( str
) – The color to remove
-
unit
¶ str
– Latex version ofpdsspect_image_set.PDSSpectImageSet.unit
-
unregister
(view)¶ Unregister view with the model
-
view_index
¶ int
– The index of the view to display the ROI dataIf there are not multiple views, view_index is automatically
-1
.
-
xdata
(color)[source]¶ Data inside a ROI with the given color for the current image
Parameters: color ( str
) – The color of the ROIReturns: data – Data in ROI color for the xaxis Return type: numpy.ndarray
-
ydata
(color)[source]¶ Data inside a ROI with the given color for the image in the menu
Parameters: color ( str
) – The color of the ROIReturns: data – Data in ROI color for the yaxis Return type: numpy.ndarray
-
-
class
pdsspect.roi_histogram.
ROIHistogramController
(model, view)[source]¶ Bases:
pdsspect.roi_plot.ROIPlotController
Controller for ROI histogram and accompanying widget
Parameters: - model (
ROIHistogramModel
) – The model - view (
ROIHistogramWidget
orROIHistogram
) – The view
-
model
¶ ROIHistogramModel
– The model
-
view
¶ ROIHistogramWidget
orROIHistogram
– The view
-
color_state_changed
(color)¶ Select or remove the color when a checkbox color changes
Parameters: color ( str
) – The name of the checkbox whose state changed
- model (
-
class
pdsspect.roi_histogram.
ROIHistogramWidget
(model)[source]¶ Bases:
pdsspect.roi_plot.ROIPlotWidget
Widget to hold the histogram and check boxes
Parameters: model ( ROIHistogramModel
) – The model-
model
¶ ROIHistogramModel
– The model
-
controller
¶ ROIHistogramController
– The controller
QtWidgets.QComboBox
– Menu to select image for y axis
-
-
class
pdsspect.roi_histogram.
ROIHistogram
(model)[source]¶ Bases:
pdsspect.roi_plot.ROIPlot
Histogram view of the data in each ROI color
Parameters: model ( ROIHistogramModel
) – The model-
model
¶ ROIHistogramModel
– The model
-