-
Notifications
You must be signed in to change notification settings - Fork 1
/
scanimage-5.3.1.patch
38 lines (36 loc) · 1.68 KB
/
scanimage-5.3.1.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
31
32
33
34
35
36
37
38
From 1db6144406dfcc638751d771c897b01225fcde0d Mon Sep 17 00:00:00 2001
From: Ben Pearre <[email protected]>
Date: Thu, 19 Apr 2018 13:27:38 -0400
Subject: [PATCH] Add Ben's PrintImage hook.
---
+scanimage/+components/WaveformManager.m | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/+scanimage/+components/WaveformManager.m b/+scanimage/+components/WaveformManager.m
index 48a10aa..a2c021e 100644
--- a/+scanimage/+components/WaveformManager.m
+++ b/+scanimage/+components/WaveformManager.m
@@ -142,7 +142,23 @@ 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.');
end