| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

lsgui Discussion

Page history last edited by Max Seligman 3 years, 11 months ago

Home  *  Installation  *  Using lsgui  *  Under the hood  *  Applications  *  Discussion  *  Contact Us

 

Lsgui is a versatile graphical user interface (GUI) written exclusively in MATLAB that runs Etaluma's Lumascope. "Low level" hardware control is through Etaluma's LumaUSB.dll, the Trinamic motion controller wsc.dll, and and a Basler and ImageSource camera were interfaced through their drivers and MATLAB's Image Acquisition Toolbox. Lsgui can be compiled to run as a stand-alone application (dependent on MATLAB's Runtime Environment (downloadable freely at the time of installation) or called as a function from MATLAB's command line. A major advantage of the command line approach is that a user has access to all sorts of camera parameters and the full complement of MATLAB toolbox functions for image processing, deep learning, statistics, timing, control of other instruments and devices, etc. Even though MATLAB's command line is single-threaded, lsgui doesn't block the main thread. This makes it ideal for exploration. Without any recompilation, the effects of changing code or camera parameter settings can often be instantly evaluated. Having both a command line interface (CLI) and GUI running concurrently greatly accelerates debugging of "high level" features and capabilities.  

 

MATLAB's timer object and guide-based GUI's enabled us to implement multi-threaded code without having to get into the weeds of complicated thread management. Its object model for graphics enabled us to accelerate the frame rate by avoiding slower, higher overhead routines such as plot and imagesc with simply drilling down into graphical objects on the screen and updating their embedded data, all triggered by a timer. Additional performance increases are clearly possible within MATLAB, as demonstrated by the preview function, but we have yet to explore how to integrate those interfaces with other Lumascope elements. Alternately, when specific performance is required, such as achieving maximal frame rate, we can do that from MATLAB's command line after setting up experimental parameters with lsgui. We thus generally perform common functions like focus and adjusting exposure and illumination from the GUI, and perform one-off or experimental parameter tinkering from the command line, without a need to encapsulate our experimental code in any module nor provide it with an interface. 

 

Some of our applications are obvious and simple to implement, like frame averaging. At first it wasn't obvious that we could implement focus stacking and tiling since our instrument lacks motorized stage and focus. But then we realized the user can be the "motor", and we coded these algorithms accordingly. They are as useful on a manual instrument as on an automatic one (which costs 2-3x more).  

 

Microscopes must perform two distinct functions: make things appear bigger, and reveal or enhance contrast. Especially as magnification approaches the diffraction limit, depth of field (DOF) becomes so small that for many natural subjects, there's almost no natural contrast. Fluorescence and structured illumination are two of a variety of methods that can produce contrast and even reveal molecules and structures much smaller than the diffraction limit. Accurate colocalization of images taken with different illumination is sometimes difficult with microscopes that move optical elements when switching illumination conditions. The Lumascope 620 has built-in stationary triple band epi-fluorescence and a gooseneck brightfield illuminator, enabling superimposition of images taken with different illumination parameters without any image shift artifacts. Our GUI lets the user construct and display pseudo color images by selecting any choice of red, green, blue, brightfield, or none images to be mapped into any of the red, green, and blue color planes of the synthetic image displayed in the main GUI. The broader point is that in a digital microscope, there's no reason one needs to think they are seeing what the microscope "sees", but instead, they are seeing the result of a computation, an algorithm, than combines multiple images with multiple parameters, with the goal of enhancing the contrast, signal-to-noise ratio, or any other computed result of the underlying previous image data, illumination parameters, and even meta-data. Integrating MATLAB as a computation and visualization engine behind the image acquisition engine of a Lumascope creates a powerful instrument. 

 

In addition to having distinct functions, in order for microscopes or any piece of equipment to be needed, it also has to be able to provide useful information. Microscopes are able to do this through magnification and enhanced contrast but also need to be able to provide a usable image back to the user whether it be through an eyepiece or from a camera sensor like the Lumascope. For example, in the medical field, the Lumascope needs to be able to enlarge a specimen so that regions of interest are seen, increase contrast to be able to discern the region due to reduced depth of field, and also provide a diagnostically valuable image. The Lumascope accomplishes this by being able to configure the objective lens, camera, and LED intensities to give the desired image to the user. This custom configuration can then be paired with the unique features we have outlined in this project or other features that are needed to be developed to provide a complete and powerful imaging and analysis interface.  

 

References

 

 

 

Acknowledgements

 

Special thanks to Chris Shumate for his time and contribution to this project.

 

Special thanks to Eric Weiner for providing the cameras used in this project.

 

 

Contact Us

 

Comments (0)

You don't have permission to comment on this page.