File Exchange

image thumbnail

LSM File Toolbox

version 1.0 (14.2 KB) by

Functions for reading info databases of Zeiss LSM confocal microscope files.

8 Ratings



No License

Zeiss confocal microscopes output data in LSM files, a stacked TIFF image format with some additional headers and info directories. See for details. The functions included here will allow you to read the additional info, for example useful fields such as the pixel dimensions of the stack. I have based the current version heavily on the open source code from the LSM Toolbox plugin for ImageJ (

This toolbox does not read the actual image data from the file, for that you could simply export the images into simpler formats and then use IMREAD to import the data to MATLAB. There are also now versions of tiffread or other programs out there that can read the image data directly.

See comments for additional suggestions. Note also that if you have the .mdb file output by Zeiss, this is readable in Microsoft Access and includes much of the information available here.

Comments and Ratings (12)


lsminfo worked out of the box for me. thanks!

Hi Arthur, I did a time series scan, with a marker using trigger in 1, and I could not find any variable that provide me the time at which this events happened (markers). would you tell me if there is a vector or cell that provides this information?


Peter Li

Peter Li (view profile)

Thanks Arthur, I probably will not get around to looking into this for a long time but hopefully your comment will help people avoid any trouble.

Brilliant, thank you! What exactly I was looking for


Arthur (view profile)

I noticed a small bug in reading the scaninfo. The last character of all strings were chopped off. In scaninforead.m I changed line 46 to

value = value(1:end-1);

which solved it for me.


Arthur (view profile)

Very usefull tool

Anton Semechko

Anton Semechko (view profile)

To read in the CLSM slice directly into MatLab download m-file called tiffread.m

Google search it or get the m-code here:

norbert kirchgessner

very nice tool to get all info of lsm data
lsminfo spends most of its time with imfinfo, can be commented out..

Andrew Chen

wait I should supply a link for tiffread

thanks Peter Li!

Andrew Chen

Very useful for me. Saves me some headaches of making text files for matlab to read.

I want to let yalls know that some folks wrote 'tiffread.m' and the 4th version of it can read images, but make sure that your lsm files are saved with no palette.


More fields are now read. Outputs are simplified: a single struct is returned with additional data in substructs. Despite changes, should remain be backward compatible except for very unusual cases, covered in the file comments.

Information about other code that can be used in conjunction with my work.

Additional suggestions and cleaning up HTML problem

Trying to fix hyperlink, clarifying that CStruct is required.

MATLAB Release
MATLAB 6.5 (R13)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today