LAT Hologramm-Software 2.0
Loading...
Searching...
No Matches
show_slm_preview.m
Go to the documentation of this file.
1% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%
3% Copyright (C) 2020 HOLOEYE Photonics AG. All rights reserved.
4% Contact: https://holoeye.com/contact/
5%
6% This file is part of HOLOEYE SLM Display SDK.
7%
8% You may use this file under the terms and conditions of the
9% "HOLOEYE SLM Display SDK Standard License v1.0" license agreement.
10%
11% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12%
13%
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.
18
19
20function show_slm_preview(scale)
21 global heds_slmpreview_flags
22
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;
27
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);
36
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);
43end
Definition: SLM.m:7
int main(void)
Definition: main.c:39
static char line[LINE_BUFFER_SIZE]
Definition: protocol.c:30
function show_slm_preview(in scale)