LSM (Zeiss) Image Reader

The LSMreader project is designed to open and read *.lsm files created by Zeiss LSM laser scanning confocal microscopes. Images are stored as Igor 2D or 3D (stacks) waves. Meta data are stored in strings or text waves. A subset of the meta data can be optionally stored as a wave note with each image. Individual parameters in the wave note can be extracted using the Igor functions StringByKey and NumberByKey. In this document, meta data refer to data associated with the image such as laser power, detector gain, etc., rather than spectral data acquired using the META detector in Zeiss LSM510 systems. The code has had limited testing on Mac PPC, Mac Intel, and Windows Intel. Note that bit order is different on Intel vs PPC computers but this is accounted for in the routine readLSMfile using the IgorInfo(4) function.

The *.lsm format is fairly complex and it is difficult to obtain accurate documentation that specify the entire format. Sources of information are listed in the comment section of the code. The most useful document was obtained at: The document is somewhat out of date but provides a good explanation of the general architecture of the format. Images are stored according to scan type (0-10). Scan types 0-4 are supported in the current version ( 0 = xy[z], 1 = xz, 2 = line scan [t], 3 = xy time series, 4 = xz time series). Meta data are stored via a linked list meaning that the whole structure must be traversed (i.e., there are no fixed offsets) regardless of what information is sought. Only a subset of the data are extracted into the wave note although the entire meta data information obtained are available in the data folder "root:LSMmetadata" and the string variable "root:LSMread:scanInfo_store".

The project can be used in two modes. As a standalone program (what is downloaded), there is one command in the "Macros" menu that is used to open and read a single *.lsm file (possibly containing many images). This mode is used for program development and testing. Image waves (2D or 3D) and meta data (stirngs or text waves) are stored in the data folder "root:LSMimages" and "root:LSMmetaData", respectively. Global variables are stored in the data folder "root:LSMread". A set of formatted tables are available that show information useful for debugging or extending the code. In this mode, the Data->Data Browser can be used to good advantage for examining the converted data.

In the second mode, the code can be used as module for another project. Directions for doing so are included in the code. Briefly, the Procedure is saved to an Igor *.ipf file and attached to new project. It is important to copy the three data folders mentioned above to the new project (using the Data Browser item Browse Expt…). This is especially true for "root:LSMread" as global variables and waves, at this time, don't have proper initialization routines. The compiler directive "#undef useAsModule" should be changed to "#define useAsModule" to suppress unnecessary menu items. In this mode, the only routine accessible (i.e., not static) from the calling program is readLSMfile(fnameStr, fillWavenote) where "fnameStr" is a string containing the complete file pathname and "fillWavenote" is a variable (Boolean) specifying whether the wave note should be populated with meta data. An example of obtaining the full pathname is shown in the function "readLSM()". The calling program should move or store the image waves in "root:LSMimages" prior to reading in the next *.lsm file (which will replace the existing images with new ones). A list of the image wave names are stored in the text wave "root:LSMread:image_names".

The complexity of the *.lsm format means that only a small subset of possible file types can be tested. The primary goal of obtaining the images as Igor waves appears to work for most scan types that we use. The secondary goal of extracting meta data into a wave note is working within the limited context of our experiments. However, many object types such as bleach regions, events, and time stamps are not implemented in the current version. Note, there are also scan info tags that are not defined or are unknown to us (and are thus skipped during scanning).

Project Details

Current Project Release

LSM (Zeiss) Image Reader IGOR.6.00.x-0.25.0

Release File:
Version: IGOR.6.00.x-0.25.0
Version Date: Sun, 05/11/2008 - 12:13 pm
Version Major: 0
Version Patch Level: 0
OS Compatibility: Mac-Intel Windows
Release Notes: Initial release (beta 25).
Currently supported SCANTYPES
0: normal xy[z]
1: xz scan
2: line scan [t]
3: xy time series
4: xz time series

View All Releases




Igor Pro 8

Learn More

Igor XOP Toolkit

Learn More

Igor NIDAQ Tools MX

Learn More