-
Notifications
You must be signed in to change notification settings - Fork 1
/
scanimage-5.4.patch
30 lines (29 loc) · 1.39 KB
/
scanimage-5.4.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
diff --git a/+scanimage/+components/WaveformManager.m b/+scanimage/+components/WaveformManager.m
index 40ed66d..3038708 100644
--- a/+scanimage/+components/WaveformManager.m
+++ b/+scanimage/+components/WaveformManager.m
@@ -147,6 +147,25 @@ function updateWaveforms(obj,forceOptimizationCheck)
% generate ao using scannerset
[ao_volts_raw, ao_samplesPerTrigger, sliceScanTime, pathFOV] = ...
rg.scanStackAO(ss,zPowerReference,zs,waveform,fb,zActuator,sliceScanTime,[]);
+
+
+ %% BWP (printimage): if called by PRINTIMAGE, replace the motor controls
+ try
+ evalin('base', 'global STL');
+ STL = evalin('base', 'STL');
+ catch ME
+ end
+ if exist('STL', 'var') ...
+ & isfield(STL, 'print') ...
+ & isfield(STL.print, 'armed') ...
+ & STL.print.armed
+
+ ao_volts_raw = printimage_modify_beam(ao_volts_raw);
+ disp('ScanImage+PrintImage: printing on ao_volts_raw...');
+ end
+ %% End BWP PrintImage hook
+
+
if isfield(ao_volts_raw,'G')
assert(size(ao_volts_raw(1).G,1) > 0, 'Generated AO is empty. Ensure that there are active ROIs with scanfields that exist in the current Z series.');