1% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3% Copyright (C) 2020 HOLOEYE Photonics AG. All rights reserved.
6% This file is part of HOLOEYE
SLM Display SDK.
8% You may use
this file under the terms and conditions of the
9%
"HOLOEYE SLM Display SDK Standard License v1.0" license agreement.
11% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
14%% This file is used by all examples to open the
SLM preview window. Opening the preview can of course also be done
15%% directly in the code, but with
this file you can set
a position
for all examples in one place.
16%% To make
this script work, we need to
import the
SLM Display SDK into MATLAB, call heds_types as well as
17%% heds_init_slm(), like done in the examples.
21 global heds_slmpreview_flags
23 % Open the
SLM preview window. This might have an impact on performance
if fast data playback is desired.
24 % Typically, the
"Realtime preview" mode (
default) does not impact performance too much,
25 % but the
"Capture SLM screen" mode will have an impact on playback performance.
26 heds_utils_slmpreview_show;
28 % Set scale in
SLM preview:
29 % 0.0 means
"Fit" scale mode which shows whole
SLM screen.
30 %
"Fit" is the
default scale mode
if not
using this function.
31 % Use
"scale = 1.0" to show data without any interpolation.
32 % Down-scaling interpolation can make data look completely different,
33 % esp.
for phase data with small structures.
34 % Please see
SLM Display SDK manual
for more information.
35 heds_utils_slmpreview_set(heds_slmpreview_flags.OnTop, scale);
37 % Move the preview window out of
main display center position:
38 % (x, y, w=0, h=0); x and y are the screen coordinates, w=0 and h=0 does
39 % not change width and height.
40 % Please adapt or comment (disable)
this line if preview window
41 % moves to wrong position or is not visible.
42 heds_utils_slmpreview_move(150, 75, 0, 0);
static char line[LINE_BUFFER_SIZE]
function show_slm_preview(in scale)