You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Integral part of SPIM imaging is data processing sometimes referred to
4
-
as **SPIMage processing**. The OpenSPIM project relies on tight
5
-
integration with [Fiji](http://fiji.sc) where most of the algorithms for
6
-
SPIMage processing have been implemented in the past.
3
+
Integral part of SPIM imaging is data processing sometimes referred to as **SPIMage processing**. The OpenSPIM project relies on tight integration with [Fiji](https://fiji.sc) where most of the algorithms for SPIMage processing have been implemented in the past.
7
4
8
-
We have assembled [**extensive
9
-
tutorials**](Operation#Data_processing"wikilink") that will walk you
10
-
through all the steps required to put multi-view SPIM data together.
5
+
We have assembled [**extensive tutorials**](Operation#Data_processing) that will walk you through all the steps required to put multi-view SPIM data together.
11
6
12
-
- We start by defining [**System
13
-
requirements**](Pre-requisites"wikilink") and downloading
14
-
['''sample OpenSPIM data](Raw_data"wikilink"),
15
-
- followed by optional [**pre-processing
16
-
steps**](Pre-processing"wikilink").
17
-
-[**Multi-view registration**](Registration"wikilink") is at the
18
-
heart of SPIMage processing pipeline.
19
-
-[**Multi-view Fusion**](Fusion"wikilink") section discusses how to
20
-
combine several view into one output image
21
-
-[**Time series registration**](Timelapse_Registration"wikilink")
22
-
removes the sample drift across long-term timelapse.
7
+
- We start by defining [**System requirements**](Pre-requisites) and downloading [sample OpenSPIM data](Raw_data), - followed by optional [**pre-processing steps**](Pre-processing).
8
+
-[**Multi-view registration**](Registration) is at the heart of SPIMage processing pipeline.
9
+
-[**Multi-view Fusion**](Fusion) section discusses how to combine several view into one output image
10
+
-[**Time series registration**](Timelapse_Registration) removes the sample drift across long-term timelapse.
23
11
24
-
The pipeline is relatively linear as described above, we highlight the
The pipeline is relatively linear as described above, we highlight the steps where [**alternative routes exist**](Registration#cross-road_in_spim_plugins).
27
13
28
-
Theoretical principles of the methods involved are best described on the
29
-
[SPIM pages of Fiji wiki](http://fiji.sc/SPIM_Registration).
14
+
Theoretical principles of the methods involved are best described on the [SPIM pages of Fiji wiki](https://fiji.sc/SPIM_Registration).
30
15
31
-
The description of several steps of the SPIMage processing pipeline are
The description of several steps of the SPIMage processing pipeline are still in the works. Particularly [**multi-view deconvolution**](Fusion#deconvolution), [**data viewing**](https://fiji.sc/BigDataViewer) and [**3D rendering**](3D_rendering). Stay tuned.
Copy file name to clipboardExpand all lines: Arduino_based_camera-laser_synchronization_system.md
+42-84
Original file line number
Diff line number
Diff line change
@@ -2,119 +2,77 @@
2
2
---
3
3
## Principle of operation
4
4
5
-
We assume that the camera is controlled by the computer via the API or
6
-
other means and that it is configured such that one of its IO pins
7
-
reports the integration interval. We will call this signal CINT. This
8
-
pin is at 0V when not integrating and +5V when integrating. Depending on
9
-
the camera model this can be reversed.
10
-
11
-
We assume that the laser has a digital IO port for binary control of
12
-
intensity. We will call this signal LT. The laser illumination is then
13
-
synchronized to the camera integration interval by generating the
14
-
appropriate LT signal according to the incoming CINT signal. Two
15
-
variables can be adjusted: delay and duration. Delay is how many
16
-
microseconds separate the start of aquisition and the switching of the
17
-
laser to on state. And duration is, well, how long in microseconds the
18
-
laser remains on.
19
-
20
-
This parameters are sent as serial commands to the Arduino. For example,
21
-
sending the following string: 'l=0,d=1000' sets the delay to zero ms and
22
-
duation to 1000 mus = 1 ms.
5
+
We assume that the camera is controlled by the computer via the API or other means and that it is configured such that one of its IO pins reports the integration interval. We will call this signal CINT. This pin is at 0V when not integrating and +5V when integrating. Depending on the camera model this can be reversed.
6
+
7
+
We assume that the laser has a digital IO port for binary control of intensity. We will call this signal LT. The laser illumination is then synchronized to the camera integration interval by generating the appropriate LT signal according to the incoming CINT signal. Two variables can be adjusted: delay and duration. Delay is how many microseconds separate the start of acquisition and the switching of the laser to on state. And duration is, well, how long in microseconds the laser remains on.
8
+
9
+
This parameters are sent as serial commands to the Arduino. For example, sending the following string: 'l=0,d=1000' sets the delay to zero ms and duration to 1000 mus = 1 ms.
23
10
24
11
## Arduino Wiring
25
12
26
-
<spanstyle="color:#FF0000">Rule zero of electronics: check your wirings
27
-
several times, and in different ways, before powering up, there is no
28
-
undo\! When it's burned it's burned\!</span>
13
+
<spanstyle="color:#FF0000">Rule zero of electronics: check your wirings several times, and in different ways, before powering up, there is no undo! When it's burned it's burned!</span>
29
14
30
15
In the following, inputs and outputs are relative to the Arduino:
31
16
32
17
- Camera pins:
33
-
- pinCSB --\> Camera SYNC-B/Strobe pin (input)
34
-
35
-
<!-- end list -->
18
+
- pinCSB -> Camera SYNC-B/Strobe pin (input)
36
19
37
20
- Laser pins:
38
-
- pinLT 4 --\> Laser Trigger (output)
21
+
- pinLT 4 -> Laser Trigger (output)
39
22
40
23
Below is an overview diagram of the very simple wiring needed:
isolation](http://en.wikipedia.org/wiki/Galvanic_isolation): it's a
48
-
optical bridge that lets the signal go through without any current flow.
49
-
Such a device needs electric current to function, and by definition this
50
-
current cannot come from the camera/laser itself otherwise that would
51
-
defeat the purpose of the optocoupler... To cut a long story short, you
52
-
need to check whether the IO interface of the camera/laser needs to be
53
-
supplied with DC current (most likely +5V). In any case you will also
54
-
need to connect the GND (ground) to your 0V on the Arduino. For that you
55
-
can use the +5V and 0V GND pins of the Arduino. It is a general rule
56
-
that all grounds of communicating devices to be shorted together.
57
-
58
-
<spanstyle="color:#FF0000">Rule one of digital electronics: when in
59
-
doubt about the amount of current sinked or sourced by a pin and about
60
-
tolerances, it is a good idea to 1) read the manual again and check how
61
-
much an output pin can source, and what is the impedance of an input
62
-
pin, 2) to add a resistor (200 Ohm) in series to limit current flow,
63
-
just in case... </span>
24
+
25
+
{% include image src="OverviewCircuit.png" width="70%" caption="" %}
26
+
27
+
It is often the case that the internal camera/laser electronics are protected against electronic noise or damage by [optocouplers](https://en.wikipedia.org/wiki/Optocouplers). Optocouplers are essentially an optical form of [galvanic
28
+
isolation](https://en.wikipedia.org/wiki/Galvanic_isolation): it's an optical bridge that lets the signal go through without any current flow. Such a device needs electric current to function, and by definition this current cannot come from the camera/laser itself otherwise that would defeat the purpose of the optocoupler... To cut a long story short, you need to check whether the IO interface of the camera/laser needs to be supplied with DC current (most likely +5V). In any case you will also need to connect the GND (ground) to your 0V on the Arduino. For that you can use the +5V and 0V GND pins of the Arduino. It is a general rule that all grounds of communicating devices to be shorted together.
29
+
30
+
<spanstyle="color:#FF0000">Rule one of digital electronics: when in doubt about the amount of current sinked or sourced by a pin and about tolerances, it is a good idea to 1) read the manual again and check how much an output pin can source, and what is the impedance of an input pin, 2) to add a resistor (200 Ohm) in series to limit current flow, just in case... </span>
64
31
65
32
## Camera Wiring
66
33
67
-
Here we detail how to use the synchronization system for the SonyXCD
68
-
cameras. As explained above, and as shown in the diagram below, most
69
-
cameras IO interfaces have an optocoupler - thus you have to connect GND
70
-
pins to ground and DC IN pins to +5V.
34
+
Here we detail how to use the synchronization system for the SonyXCD cameras. As explained above, and as shown in the diagram below, most cameras IO interfaces have an optocoupler - thus you have to connect GND pins to ground and DC IN pins to +5V.
71
35
72
-
This distracting detail aside, the really interesting pin is STROBE OUT
73
-
which is our CINT pin and which tells us when the camera is acquiring.
74
-
SonyXCD cameras output 0V when acquiring and +5V when not. This is
75
-
different from Retiga-SRV cameras for example that output the opposite
76
-
signal.
36
+
This distracting detail aside, the really interesting pin is STROBE OUT which is our CINT pin and which tells us when the camera is acquiring. SonyXCD cameras output 0V when acquiring and +5V when not. This is different from Retiga-SRV cameras for example that output the opposite signal.
{% include image src="SonyXCD12pin.png" width="70%" caption="" %}
79
39
80
40
## Laser Wiring
81
41
82
-
Wiring the laser is usually much easier, you just need a diftal IO pin
83
-
that gives access to a binary control of the laser. For example, for the
84
-
Coherent CUBE lasers this is called "digital enable".
42
+
Wiring the laser is usually much easier, you just need a diftal IO pin that gives access to a binary control of the laser. For example, for the Coherent CUBE lasers this is called "digital enable".
85
43
86
44
## Arduino Sketch
87
45
88
46
Below is the current version of the Arduino sketch:
89
47
90
-
```cpp
91
-
// OpenSPIM laser/camera synchronization based on Arduino
48
+
<pre>
49
+
// OpenSPIM laser/camera synchronization based on Arduino
92
50
// Loic Royer
93
51
94
52
// The principle of operation is simple:
95
-
// We assume that the camera is controlled by the computer via the API
96
-
// or other means and that the CINT signal reports the integration time
97
-
// interval. In other words the CINT pin on the camera tells us when the
53
+
// We assume that the camera is controlled by the computer via the API
54
+
// or other means and that the CINT signal reports the integration time
55
+
// interval. In other words the CINT pin on the camera tells us when the
98
56
// camera is aquiring (excluding the read-out time).
99
57
// On the laser side, we assume that the laser is in pulse mode.
100
58
//
101
-
// The laser is then controlled in a "slave" mode. This program synchronizes
59
+
// The laser is then controlled in a "slave" mode. This program synchronizes
102
60
// the laser to the camera aquisition.
103
61
// Two variables can be adjusted via a simple serial protocol: delay and duration.
104
62
// Delay is how many microseconds between start of aquisition and laser on have elapsed,
105
-
// and duration is, well, how long the laser is on in microseconds.
106
-
// sending the following string: 'l=0,d=1000' sets the delay to zero ms
63
+
// and duration is, well, how long the laser is on in microseconds.
64
+
// sending the following string: 'l=0,d=1000' sets the delay to zero ms
107
65
// and duation to 1000 mus = 1 ms
108
66
109
67
// in the following, inputs and outputs are relative to the arduino
110
68
// Camera pins:
111
69
#define pinCINT 2// Camera integration signal pin (input)
112
70
113
-
// Laser pins:
114
-
//Important: In the case of the Coherent laser CUBE system,
71
+
// Laser pins:
72
+
//Important: In the case of the Coherent laser CUBE system,
115
73
// the control box BNC connector has an input impedance of 2.2 K ohm.
116
74
// The laser SMB connector has an input impedance of 50 ohm.
117
-
// --> This means that a the same resistor value have to be put in series between
75
+
// --> This means that a the same resistor value have to be put in series between
118
76
// the pin and the connector on the laser.
119
77
120
78
#define pinLT 4 // Laser Trigger pin
@@ -123,17 +81,17 @@ Below is the current version of the Arduino sketch:
123
81
#define pinLED 13
124
82
125
83
// Parameters:
126
-
unsignedlong delaytime=0;
84
+
unsigned long delaytime=0;
127
85
unsigned long duration=5000;
128
86
129
87
130
88
// We define what is INT and NOINT for the camera:
Strategies to implement a proper brightfield illumination in an
4
-
OpenSPIM.
3
+
Strategies to implement a proper brightfield illumination in an OpenSPIM.
5
4
6
5
## Michael Redd's solution
7
6
@@ -14,18 +13,10 @@ OpenSPIM.
14
13
15
14
### setup & wiring
16
15
17
-
The arduino and light are powered by USB and are turned on and off by
18
-
micro-manager and can be used as a brightfield channel in micromanager
19
-
multi-dimensional acquisition window. The potentiometer and resistor
20
-
determine the intensity of the light. The diode is fixed in place behind
21
-
a collimating lens which fills the back aperture of a 10x immersion lens
22
-
on axis with the sample and imaging lens. If your SPIM rig does not have
23
-
a appropriate port and/or you do not have the 10x lens, one could focus
24
-
the diode on the sample from above at an oblique angle. This may require
25
-
a brighter light, but would probably work with the diode I am using.
26
-
Light level can be dialed in by using different resistors and
27
-
potentiometers.
16
+
The Arduino and light are powered by USB and are turned on and off by micro-manager and can be used as a brightfield channel in micromanager multi-dimensional acquisition window. The potentiometer and resistor determine the intensity of the light. The diode is fixed in place behind a collimating lens which fills the back aperture of a 10x immersion lens on axis with the sample and imaging lens. If your SPIM rig does not have a appropriate port and/or you do not have the 10x lens, one could focus the diode on the sample from above at an oblique angle. This may require a brighter light, but would probably work with the diode I am using. Light level can be dialed in by using different resistors and potentiometers.
28
17
29
18
by Michael Redd, Cell Imaging Core Facility, University of Utah
0 commit comments