LAT Hologramm-Software 2.0
Loading...
Searching...
No Matches
Pluto2.m
Go to the documentation of this file.
1classdef Pluto2 < SLM
2 properties
3 displayOptions;
4 end
5
6 methods
7 function obj = Pluto2()
8 obj.pixelX = 1920;
9 obj.pixelY = 1080;
10 obj.pixelPitch = 0.008; %mm
11 obj.grayLevels =256;
12 obj.phaseMax=2; %Maximale Phase [*pi]
13
14 end
16 function connect(obj)
17 %Code wurde aus Beispieldateien des Herstellers übernommen
18
19 %%Start [DISPLAY SDK]
20 % Import SDK:
21 add_heds_path;
22
23 % Check if the installed SDK supports the required API version
24 heds_requires_version(2);
25
26 % Make some enumerations available locally to avoid too much code:
27 heds_types;
28 obj.displayOptions = heds_showflags.Auto;
29
30
31 % Detect SLMs and open a window on the selected SLM:
32 heds_init_slm;
33
34 % Open the SLM preview window (might have an impact on performance):
36
37 %%Ende [DISPLAY SDK]
38 obj.connected = true;
39
40 obj.showBlankScreen();
41 end
42
43 function disconnect(obj)
44 %Code aus Beispielprogramm des Herstellers übernommen
45 obj.showBlankScreen();
46 heds_close_slm;
47 obj.connected = false;
48 end
49
50 function sendImage(obj,image)
51 image = rot90(image,2);
52 image = ResizeImage(image,obj.pixelY,obj.pixelX,obj.resizeBehaviour);
53 image = OffsetImage(image,obj.displacementX,obj.displacementY,obj.pixelPitch);
54 %#Anpassungsbefehle in Klassenmethode SLM?
55 heds_show_phasevalues(single(image*2*pi));%Übertragung der Matrix an den SLM
56 obj.active = true;
57 end
58
59 function showBlankScreen(obj)
60 %
61 heds_show_phasevalues(single(zeros(obj.pixelX,obj.pixelY))); %Übertragung leerer Matrix an den SLM
62 obj.active = false;
63 end
64 end
65end
66
function OffsetImage(in input, in x, in y, in pixelPitch)
Verschiebt eine Matrix um einen Abstand x,y und füllt die Ränder mit Nullen auf.
function ResizeImage(in input, in x, in y, in mode)
Passt ein Bild an eine andere Auflösung an. Verschiedene Anpassungsoptionen wählbar.
Definition: Pluto2.m:5
Definition: SLM.m:7
Property active
zeigt an, ob gerade Bild angezeigt wird
Definition: SLM.m:14
#define true
Definition: nuts_bolts.h:26
#define false
Definition: nuts_bolts.h:25
function show_slm_preview(in scale)