Skip to content

Commit 2c63547

Browse files
IMAQdxCamera: Allow displaying of 3D data in manual mode.
Ensure only the last two axes are tranposed so that a 3D array will be displayed as a video by the pyqtgraph widget.
1 parent 885ed42 commit 2c63547

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

IMAQdxCamera/blacs_tabs.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,12 @@ def update(self, image, frame_rate):
9292
return
9393
if self.image_view.image is None:
9494
# First time setting an image. Do autoscaling etc:
95-
self.image_view.setImage(image.T)
95+
self.image_view.setImage(image.swapaxes(-1, -2))
9696
else:
9797
# Updating image. Keep zoom/pan/levels/etc settings.
98-
self.image_view.setImage(image.T, autoRange=False, autoLevels=False)
98+
self.image_view.setImage(
99+
image.swapaxes(-1, -2), autoRange=False, autoLevels=False
100+
)
99101
# Update fps indicator:
100102
if frame_rate is not None:
101103
self.label_fps.setText(f"{frame_rate:.01f} fps")

0 commit comments

Comments
 (0)