A graphical interface for recording with OCPI microscopes.
A paper explaining most of the implementation details and related hardware can be found here.
@article{Greer2019,
title={Fast objective coupled planar illumination microscopy},
author = {Greer, Cody and Holy, Timothy E.},
journal={Nature Communications},
volume={10},
pages={4483},
year={2019},
URL = {https://doi.org/10.1038/s41467-019-12340-0},
eprint = {https://www.nature.com/articles/s41467-019-12340-0.pdf},
doi = {10.1038/s41467-019-12340-0}
}
We need to install below items
- Imagine
- Software development tools and libraries : Visual studio, QT, QWT, Boost, FFTW
- Hardware related SDK and driver : PCO camera SDK, National Instrument DAQ driver
-
Clone this Imagine repository
-
Install Visual Studio 2015
- make sure you installed "common tools" when you install
-
Install QT5
- make sure the version of QT is for 64bit
-
Install QT add-in for vc2015
- install add-in
- go to QT VS Tools tab in visual studio and set the right directory ex) for vc2015 and Qt5.7 : set this as C:\Qt\5.7\msvc2015_64
-
Install QWT v6.1.3
- open the Visual Studio tools directory under the windows Start menu, select "Developer's command prompt"(run as administrator)
> cd VC > vcvarsall amd64 > cd [qwt directory (extract .zip to c:\ then it will create Qwt-6.1.3 directory)] > C:\Qt_5_7\5.7\msvc2015_64\bin\qmake qwt.pro > nmake (if you recompile everything again, C:\Qwt-6.1.3\src\release directory should be clear) > nmake install- add an environment variable QWTDIR as C:\qwt-6.1.3
-
Install Boost v1.57.0
- extract .zip file to c:\Program Files\boost
- open the Visual Studio tools directory under the Start
menu, select "Developer's command prompt"(run as administrator)> cd c:\Program Files\boost\boost_1_57_0 > bootstrap.bat > .\b2 address-model=64 toolset=msvc-12.0
-
Install camera SDK
-
run SW_PCOSDKWIN_123
-
Choose interface type ex) Silicon Software Dll MeIV or Camera Link HS
-
Setup target project of visual studio : open project and bring up property page Configuration Properties C/C++>General>Additional>Include Directories
C:\Users\user\AppData\Roaming\Digital Camera Toolbox\pco.sdk\includeLinker>General>Additional>Library Directories
C:\Users\user\AppData\Roaming\Digital Camera Toolbox\pco.sdk\lib64 C:\Users\user\AppData\Roaming\Digital Camera Toolbox\pco.sdk\bin64Linker>Input>Additional>Dependencies
SC2_cam.lib
-
-
Install NI(National Instrument) DAQ driver
-
Setup target project of visual studio : open project and bring up property page Configuration Properties C/C++>General>Additional>Include Directories
C:\Program Files (x86)\National Instruments\NI-DAQ\DAQmx ANSI C Dev\includeLinker>General>Additional>Library Directories
C:\Program Files (x86)\National Instruments\Shared\ExternalCompilerSupport\C\lib64\msvcLinker>Input>Additional>Dependencies
NIDAQmx.lib
-
-
Modify some items in the preference of Imagine project, if the directory of camera sdk installation is changed from the OCPI's setting.
- include dir : .....pco.edge\include
- additional library dir : ...pco.edge\lib64 ...pco.edge\bin64(need this?)
- additional dependency : ...\lib64\sc2_cam.lib
-
Install FFTW for frequency analysis of piezo control waveform
-
Download FFTW 3.3.5 Windows : ftp://ftp.fftw.org/pub/fftw/fftw-3.3.5-dll64.zip
-
unzip and copy to c:\FFTW
-
Open the Visual Studio Developer Command prompt Start -> All Apps -> Visual Studio 2015 -> Developer Command prompt Or, run C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat
-
Produce .lib file : Navigate to the unzip location and type lib /machine:x64 /def:libfftw3-3.def lib /machine:x64 /def:libfftw3f-3.def lib /machine:x64 /def:libfftw3l-3.def
-
Setup visual studio : open project and bring up property page Configuration Properties C/C++>General>Additional>Include Directories
C:\FFTWLinker>General>Additional>Library Directories
C:\FFTWLinker>Input>Additional>Dependencies
libfftw3-3.lib, libfftw3f-3.lib, libfftw3l-3.lib
-
-
Now, we can build Imagine project. But, to execute the Imagine, we need to copy all files below under the 'Output Directory' and 'Working Directory' of Imagine project.
- Camera related dlls (located in C:\Program Files (x86)\Digital Camera Toolbox\pco.sdk\bin) : SC2_Cam.dll and camera interface dll (sc2_clhs.dll or sc2_cl_me4.dll)
- QT related dlls (located under the installed directory (ex) C:\Qt\Qt5.7.0\5.7\msvc2015_64\bin) : Qt5Core.dll, Qt5Gui.dll, Qt5OpenGL.dll, Qt5PrintSupport.dll, Qt5Script.dll, Qt5SerialPort.dll, Qt5Svg.dll, Qt5Widgets.dll
- QWT related dll (located in C:\Qwt-6.1.3\lib): qwt.dll
- FFTW related dll (located in C:\FFTW): libfftw3-3.dll, libfftw3f-3.dll, libfftw3l-3.dll
- JavaScript files (located in (Imagine directory)\Imagine\scripts) : imagine.js, 'related rig name'.js ((ex) ocpi-2.js)
- Parameter control mode
- Waveform control mode
- Script control mode
- Parameter and waveform control modes
- Script control mode In the script control mode, we can execute javascript code in Imagine. In addition, Imagine provides several javascript functions to provide access to some essential operations which are used to record data. Thereby, we can execute several experiments according to the control flow specified with javascript code by one execution without intervention.
In the Imagine GUI, general settings, parameter control settings and .json file name for waveform control can be saved in a configuration file with a ‘save configuration’ command in file menu. In script control mode, we can load, verify and record with this configuration file.
Typical work flow is as follows.
a. Prepare specimen
b. Capture full live image with a "live" button
c. Set parameters of display : intensity scale, zoom region, etc
d. Set parameters for an experiment : camera, positioner, laser, stimuli, output filename, etc
e. Press "Apply all" button : This verifies if the setting parameters are valid. If not, Imagine rejects the settings
f. Start acquisition : If the parameters are valid, we can start acquisition by clicking a "record" button.
g. Inspect the acquired data : Once the acquisition is end, we can verify the acquisition if it is ended normally or interrupted by some errors, Using "display" tab and "AI and DI" tab, we can verify that and also briefly check if we got the desired data.
Imagine GUI is composed with several sections as listed below with numbers corresponding the numbers in the above image.
- Parameters and display control window
This window is designed for setting overall parameters for the microscope operation and display. This window consists of three main sections which are "Config and control", "Histogram" and "Intensity". Currently, the "Intensity" tab is not used. "Histogram" section displays histogram of an image displayed in "Display window". "Config and control" tab is designed for setting overall parameters such as camera control, positioner control, laser control and stimuli control which are used to configure an experiment. Also, it provides some basic tools for later inspection of acquired data.
- Display window
This window displays live images from the cameras attached to the microscope or captured images during the acquisition or after the acquisition by loading the '.imagine' file at the "Display" tab. In this window, we can zoom the image. This zoomed region can be set as a soft ROI region at the "camera" tab.
- Log window
This window displays log messages.
- Stimuli window
This window makes a list of stimulus numbers according to the stack numbers when we load stimuli file. Details are explained in the explanation of "Stimuli" tab.
- Main menu
Details are explained in the explanation of main menu page.
- File menu
We can save a current configuration and load it later using this menu.
- Acquisition menu
We can start acquisition or live displaying the images from the cameras.
- Hardware menu
We can open and close a laser shutter of laser. "Heatsink Fan" and "Temperature" menus are not usable currently.
- View menu
- Display Full Image : this menu causes the camera to acquire images with the entire sensor.
- No Auto Scale : does not apply auto scale to the intensity of the captured images in displaying them.
- Auto Scale On First Frame : applies auto scale to the first frame image of a stack. And following frames are scaled with the scale factor of the first frame of the stack to which they belong.
- Auto Scale On All Frames : independently auto scales every frame of the captured images.
- Manual : enables users to set the scale manually. Intensity from "min" value and "max" value will be scaled to 0 to 255. If we overlap the camera1 image with the camera2 image, "cam2 min" and "cam2 max" can be used to set the minimum and maximum intensity value of the camera2 image.
- Colorize Saturated Pixels : enables display to indicate the saturated pixel with some colors. Blue color pixels indicates pixels which have minus intensity value after scaling. Red is for pixels having intensity over 256.
- Flicker control : reduces the flicker caused by abnormal black frames between normal frames.
- General tab
This tab is designed for setting the location and filename of output file and adding some comments about the parameter settings of this experiment. These settings and comments can be saved in a configuration file which will be created by clicking the "Save Configuration" item in the "File" menu.
- Camera tab
- Record both cameras : enables recording from both cameras.
- number of stacks : sets the number of stacks.







