8.5.5.1.6. pymodaq_gui.plotting.data_viewers.viewer2D module
- class pymodaq_gui.plotting.data_viewers.viewer2D.Histogrammer(histogram_container, histogram_refs=['red', 'green', 'blue'])[source]
Bases:
QObject- Attributes:
- autolevels
Methods
set_gradient([histo, gradient])Change the color gradient of the specified histogram :type histo: (str) either
'red','green','blue','spread'or'all':param histo: :type histo: (str) either'red','green','blue','spread'or'all':type gradient:(strorGradient):param gradient: :type gradient:(strorGradient)activated
add_histogram
affect_histo_to_imageitems
get_histogram
get_histograms
gradient_changed
set_autolevels
setup_histograms
show_hide_histogram
- set_gradient(histo='red', gradient='grey')[source]
Change the color gradient of the specified histogram :type histo: (str) either
'red','green','blue','spread'or'all':param histo: :type histo: (str) either'red','green','blue','spread'or'all':type gradient:(strorGradient):param gradient: :type gradient:(strorGradient)
- property autolevels
- class pymodaq_gui.plotting.data_viewers.viewer2D.ImageDisplayer(plotitem, data_distribution)[source]
Bases:
QObjectThis Object deals with the display of 2D data with a plotitem
- Attributes:
- autolevels
- labels
- legend
- levels_sym
Methods
get_image
get_images
set_autolevels
set_levels_sym
show_legend
update_data
update_display_items
update_image_visibility
updated_item
- property autolevels
- property labels
- property legend
- class pymodaq_gui.plotting.data_viewers.viewer2D.IsoCurver(image_source, histogram_parent)[source]
Bases:
QObjectMethods
set_isocurve_data
setup_iso_curve
show_hide_iso
update_histogram_parent
update_image_source
update_isocurve
- class pymodaq_gui.plotting.data_viewers.viewer2D.View2D(parent_widget=None)[source]
Bases:
ActionManager,QObject- Attributes:
- plotitem
Methods
Convenience function from the Crosshair
Convenience function from the Crosshair
move_scale_roi_target([pos, size])Move and scale the target ROI (used to display a particular area, for instance the currently scanned points during a scan :type pos:
(iterable) setting the central positionofthe ROI in the view:param pos: :type pos:(iterable) setting the central positionofthe ROI in the view:type size:(iterable) setting the sizeofthe ROI:param size: :type size:(iterable) setting the sizeofthe ROIscale_axis(xaxis, yaxis)scale view coordinates from the regular axes to the scaled/offset ones
set_axis_label(position[, label, units])Convenience method to set label and unit of any view axes :type position:
(str) anyofAXIS_POSITIONS:param position: :type position:(str) anyofAXIS_POSITIONS:type label:(str) textofthe axis label:param label: :type label:(str) textofthe axis label:type units:(str) unitsofthe axis label:param units: :type units:(str) unitsofthe axis labelset_axis_scaling([position, scaling, ...])Method used to update the scaling of the right and top axes in order to translate pixels to real coordinates :type position:
(str) axis position either oneofAXIS_POSITIONS:param position: :type position:(str) axis position either oneofAXIS_POSITIONS:type scaling:(float) scalingofthe axis:param scaling: :type scaling:(float) scalingofthe axis:type offset:(float) offsetofthe axis:param offset: :type offset:(float) offsetofthe axis:type label:(str) textofthe axis label:param label: :type label:(str) textofthe axis label:type units:(str) unitsofthe axis label:param units: :type units:(str) unitsofthe axis labelset_crosshair_position(*positions)Convenience function from the Crosshair
unscale_axis(xaxis, yaxis)scale view coordinates from the scaled/offset axes to the regular ones
update_roi_channels(roi_name)Update the use_channel setting each time a ROI is added
add_roi_displayer
clear_plot_item
collapse_lineout_widgets
connect_things
display_crosshair_lineouts
display_images
display_roi_lineouts
get_axis
get_axis_label
get_data_at
get_double_clicked
get_image_item
get_view_range
get_visible_images
lock_aspect_ratio
move_left_splitter
move_right_splitter
notify_visibility_data_displayer
prepare_image_widget_for_lineouts
prepare_ui
remove_roi_displayer
roi_clicked
set_image_displayer
set_image_labels
setup_graphs
setup_widgets
show_ROI_select
show_hide_crosshair
show_hide_histogram
show_legend
show_lineout_widgets
show_roi_target
update_colors
- move_scale_roi_target(pos=None, size=None)[source]
Move and scale the target ROI (used to display a particular area, for instance the currently scanned points during a scan :type pos:
(iterable) setting the central positionofthe ROI in the view:param pos: :type pos:(iterable) setting the central positionofthe ROI in the view:type size:(iterable) setting the sizeofthe ROI:param size: :type size:(iterable) setting the sizeofthe ROI
- scale_axis(xaxis, yaxis)[source]
scale view coordinates from the regular axes to the scaled/offset ones
- set_axis_label(position, label='', units='')[source]
Convenience method to set label and unit of any view axes :type position:
(str) anyofAXIS_POSITIONS:param position: :type position:(str) anyofAXIS_POSITIONS:type label:(str) textofthe axis label:param label: :type label:(str) textofthe axis label:type units:(str) unitsofthe axis label:param units: :type units:(str) unitsofthe axis label
- set_axis_scaling(position='top', scaling=1, offset=0, label='', units='Pxls')[source]
Method used to update the scaling of the right and top axes in order to translate pixels to real coordinates :type position:
(str) axis position either oneofAXIS_POSITIONS:param position: :type position:(str) axis position either oneofAXIS_POSITIONS:type scaling:(float) scalingofthe axis:param scaling: :type scaling:(float) scalingofthe axis:type offset:(float) offsetofthe axis:param offset: :type offset:(float) offsetofthe axis:type label:(str) textofthe axis label:param label: :type label:(str) textofthe axis label:type units:(str) unitsofthe axis label:param units: :type units:(str) unitsofthe axis label
- unscale_axis(xaxis, yaxis)[source]
scale view coordinates from the scaled/offset axes to the regular ones
- data_displayer: ImageDisplayer
- lineout_types = ['hor', 'ver', 'int']
- property plotitem
- class pymodaq_gui.plotting.data_viewers.viewer2D.Viewer2D(parent=None, title='')[source]
Bases:
ViewerBaseObject managing plotting and manipulation of 2D data using a View2D
- Attributes:
crosshairConvenience method
image_widgetConvenience method
roi_managerConvenience method
roi_targetTo be implemented if necessary (Viewer1D and above)
- x_axis
- y_axis
Methods
activate_roi([activate])Activate the Roi manager using the corresponding action
get_axes_from_view(data)Obtain axes info from the view
Convenience method
move_roi_target([pos, size])move a specific read only ROI at the given position on the viewer
set_crosshair_position(xpos, ypos)Convenience method to set the crosshair positions
set_gradient(image_key, gradient)convenience function
Deactivate some tool buttons if data type is "spread" then apply transform_image
show_roi([show, show_roi_widget])convenience function to control roi
autolevels_first
crosshair_changed
double_clicked
prepare_connect_ui
process_crosshair_lineouts
process_roi_lineouts
roi_changed
selected_region_changed
set_visible_items
transform_image
update_crosshair_data
update_data
- move_roi_target(pos=None, size=(1, 1))[source]
move a specific read only ROI at the given position on the viewer
- set_image_transform()[source]
Deactivate some tool buttons if data type is “spread” then apply transform_image
- Return type:
- property crosshair
Convenience method
- property image_widget
Convenience method
- property roi_manager
Convenience method
- property roi_target: ROI
- property x_axis
- property y_axis
- pymodaq_gui.plotting.data_viewers.viewer2D.histogram_factory(image_item=None, gradient='red')[source]
Create a pyqtgraph HistogramLUTWidget widget (histogram) and link it to the corresponding image_item :type image_item:
(ImageItem) the image itemtobe linked with the histogram:param image_item: :type image_item:(ImageItem) the image itemtobe linked with the histogram:type gradient: (str) either'red','green','blue','spread'oroneofthe Gradients:param gradient: :type gradient: (str) either'red','green','blue','spread'oroneofthe Gradients- Return type:
HistogramLUTWidget instance
- pymodaq_gui.plotting.data_viewers.viewer2D.image_item_factory(item_type='uniform', axisOrder='row-major', pen='r')[source]
- Return type:
Union[UniformImageItem,SpreadImageItem]