pan_view¶
Display data in pan and make ROI selections
-
class
pdsspect.pan_view.
PanViewController
(image_set, view)[source]¶ Bases:
object
Controller for the
PanView
Parameters: - image_set (
PDSSpectImageSet
) – pdsspect model - view (
PanView
) – View to control
-
image_set
¶ PDSSpectImageSet
– pdsspect model
-
add_ROI
(coordinates)[source]¶ Add a region of interest
Parameters: coordinates ( numpy.ndarray
ortuple
) –Either a
(m x 2)
array or a tuple of two arraysIf an array, the first column are the x coordinates and the second are the y coordinates. If a tuple of arrays, the first array are x coordinates and the second are the corresponding y coordinates.
-
erase_ROI
(coordinates)[source]¶ Erase any region of interest inside coordinates
Parameters: coordinates ( numpy.ndarray
ortuple
) –Either a
(m x 2)
array or a tuple of two arraysIf an array, the first column are the x coordinates and the second are the y coordinates. If a tuple of arrays, the first array are x coordinates and the second are the corresponding y coordinates.
- image_set (
-
class
pdsspect.pan_view.
PanView
(image_set, parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
,pdsspect.pdsspect_image_set.PDSSpectImageSetViewBase
View of the image inside the pan
Parameters: - image_set (
PDSSpectImageSet
) – pdsspect model - parent (None) – The parent of the view
-
image_set
¶ PDSSpectImageSet
– pdsspect model
-
controller
¶ PanViewController
– The view’s controller
-
parent
¶ None – The view’s parent
-
main_layout
¶ QtWidgets.QVBoxLayout
– The main layout of the view
-
view_canvas
¶ PDSImageViewCanvas
– Canvas to view the image
-
redraw
()[source]¶ Redraw
view_canvas
- image_set (
-
class
pdsspect.pan_view.
PanView
(image_set, parent=None)[source] Bases:
PyQt5.QtWidgets.QWidget
,pdsspect.pdsspect_image_set.PDSSpectImageSetViewBase
View of the image inside the pan
Parameters: - image_set (
PDSSpectImageSet
) – pdsspect model - parent (None) – The parent of the view
-
image_set
PDSSpectImageSet
– pdsspect model
-
controller
PanViewController
– The view’s controller
-
parent
None – The view’s parent
-
main_layout
QtWidgets.QVBoxLayout
– The main layout of the view
-
view_canvas
PDSImageViewCanvas
– Canvas to view the image
-
check_ROI_in_pan
(func)[source] Wrapper to make sure ROI stays inside the current view
-
check_roi_in_process
(func)[source] Wrapper to make sure the roi making is in process
-
continue_ROI
(view_canvas, button, data_x, data_y)[source] Continue the ROI making on click
-
extend_ROI
(view_canvas, button, data_x, data_y)[source] Extend the ROI on mouse motion
-
is_erasing
bool
– True if current color iseraser
false otherwise
-
move_pan
()[source] Set the data when the pan is moved
-
redraw
()[source] Redraw
view_canvas
-
save_frame
()[source] Save current frame as image
-
set_data
()[source] Set pan data on the canvas
-
set_image
()[source] Set the data
-
set_roi_data
()[source] Set the ROI data on the canvas
-
start_ROI
(view_canvas, button, data_x, data_y)[source] Start the ROI at the mouse location
-
stop_ROI
(view_canvas, button, data_x, data_y)[source] Stop ROI on right click
- image_set (