ai_ct_scans.GUI.scan_viewer module
- class ai_ct_scans.GUI.scan_viewer.ScanViewer
Bases:
QWidget
Widget for displaying 3D scan data.
- volume_plot
OpenGL 3D volume plot item
- Type
pyqtgraph.opengl.GLVolumeItem
- viewer_data
preprocessed array of scan data in format (x, y, z, RGBA)
- Type
np.ndarray
- class Ui(widget)
Bases:
object
- static convert_for_viewer(pointcloud, colour=(0, 0, 0, 0))
Convert scan data into 3D pointcloud matrix of RGBA values for displaying.
- Parameters
pointcloud (np.ndarray) – np.ndarray representing 3D scan data.
colour (tuple) – RGBA value to apply to pointcloud.
- Returns
array of format (x, y, z, RGBA) for display.
- Return type
(np.ndarray)
- display_data(slice_index=0, orientation=0, slice_through_scan=False, show_navigation_slice=False)
Update display to show scan with specific slicing or overlay.
- Parameters
slice_index (int) – Index of slice used to display or augment the displayed data.
orientation (int) – Slice orientation value.
slice_through_scan (bool) – Flag for specifying showing the cross section of the scan.
show_navigation_slice (bool) – Flag for adding the current slice location as plane to scan.
- static pre_process_data(data)
Covert scan data into (x, y, z, RGBA) and combine into single structure for display.
- Parameters
data (dict) – dictionary of np.ndarray, labelled ‘scan_1’, ‘scan_2’ for each full scan item.
- Returns
array of format (x, y, z, RGBA)
- Return type
(np.ndarray)
- set_data(data)
Preprocess scan data and add to OpenGL plot item.
- Parameters
data (dict) – dictionary of np.ndarray, labelled ‘scan_1’, ‘scan_2 for each full scan item.
- staticMetaObject = <PySide2.QtCore.QMetaObject object>