Import Zeiss lookup tables

This macro imports a Zeiss lookuptable file, as found in the AIM or ZEN software, and applies it to the current image.

Apply Zeiss Lut.txt
// This macro imports a Zeiss lookuptable file, as found in the AIM or ZEN software.
// and applies it to the current image.
// jm at ibmp dot fr
// checks if the current image can accept a lookup table.
if (bitDepth==24) exit ("RGB images cannot have lookup tables");
// selects a file and checks if it complies with the announced Zeiss Confocal Palette file format
path=File.openDialog("Select Zeiss LUT to apply");
if (!startsWith(s,"CZ - LSM510 Color Palette , Version 1.00")) exit ("Not a Zeiss LUT definition file.");
// reads the palette's name's length, and the palette's name itself, and finds out the offset to the palette data
// creates three 8-bit arrays and fills them with each 16th value read from the 12bit to 12bit Zeiss palette.
for (i=0;i<256;i++) {
// applies the 8-bit palette to the current image
// end of macro : displays a success message 
showStatus(nameString+" Zeiss LUT Applied");
function read32int(n) {
return charCodeAt(s,n)+charCodeAt(s,n+1)<<8+charCodeAt(s,n+2)<<16+charCodeAt(s,n+3)<<24;
function read16int(n) {
return charCodeAt(s,n)+charCodeAt(s,n+1)<<8;

Here is a montage of all Lookuptables available in the ZEN software.

macro/importzeisslut.txt · Last modified: 2010/03/29 16:41 by mutterer
Back to top
CC Attribution-Noncommercial-Share Alike 3.0 Unported = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0