feat(controller_detection): implement def rgb_array_to_qimage
This commit is contained in:
parent
4d3c1f3a89
commit
a25e4620d7
1 changed files with 7 additions and 0 deletions
|
|
@ -62,3 +62,10 @@ class AutotuneTask(QRunnable):
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
details = f"{exc}\n\n{traceback.format_exc()}"
|
details = f"{exc}\n\n{traceback.format_exc()}"
|
||||||
self.signals.failed.emit(details)
|
self.signals.failed.emit(details)
|
||||||
|
|
||||||
|
|
||||||
|
# rgb_array_to_qimage: function definition for ScanSlicer behavior.
|
||||||
|
def rgb_array_to_qimage(image):
|
||||||
|
h, w, c = image.shape
|
||||||
|
bytes_per_line = c * w
|
||||||
|
return QImage(image.data, w, h, bytes_per_line, QImage.Format_RGB888).copy()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue