LinuxCommandLibrary

zeisstopnm

Convert Zeis scanner files to PNM image

TLDR

Convert a Zeiss cofocal file into either .pgm or .ppm format

$ zeisstopnm [path/to/file]
copy

Convert a Zeiss cofocal file to Netbpm format while explicitly specifying the target file type
$ zeisstopnm -[pgm|ppm] [path/to/file]
copy

SYNOPSIS

zeisstopnm [--verbose] [zeiss_file]

PARAMETERS

--verbose
    Prints diagnostic information to standard error during the conversion process, which can be useful for debugging or understanding the file structure of the Zeiss input.

DESCRIPTION

The zeisstopnm command is a utility within the Netpbm image processing suite, specifically designed to convert images from the Zeiss confocal microscope file format (LSM) into the Netpbm family of image formats.

It serves as a crucial bridge for scientists and researchers, enabling them to process their Zeiss microscopy data using a wide array of standard Unix/Linux image manipulation tools that are compatible with the PNM (Portable Anymap) format. The command handles both 8-bit grayscale Zeiss images, converting them to PGM (Portable Graymap) format, and 24-bit color images, converting them to PPM (Portable Pixmap) format.

Input can be provided either from a specified file or through standard input. The output PNM image is written to standard output. A notable feature is its ability to correctly handle multi-frame Zeiss files, such as time series or Z-stacks. When processing such files, zeisstopnm generates multiple output PNM files, automatically appending a sequential frame number to the base output filename.

CAVEATS

This utility is specifically tailored for the Zeiss LSM (Laser Scanning Microscope) file format. It may not support other proprietary Zeiss image formats or variations. The output is strictly in Netpbm format (PGM or PPM), requiring further conversion with other Netpbm tools (e.g., pnmtojpeg, pnmtops) if different output formats are desired. When processing multi-frame files, zeisstopnm outputs multiple files with appended numerical suffixes, which then need to be managed externally for tasks like creating animations or composite images.

INPUT/OUTPUT BEHAVIOR

By default, zeisstopnm reads its input from a specified zeiss_file. If no filename is provided, it reads from standard input. The resulting PNM image (PGM for grayscale, PPM for color) is written to standard output. When dealing with multi-frame Zeiss files (like time-lapses or Z-stacks), the command generates multiple PNM files, automatically appending a sequential frame number (e.g., output_001.pnm, output_002.pnm) to the base output filename.

SUPPORTED IMAGE TYPES

The command intelligently distinguishes between different bit depths of Zeiss input files. For 8-bit grayscale images, it produces a PGM (Portable Graymap) file. For 24-bit color images, it generates a PPM (Portable Pixmap) file. This ensures accurate representation of the original image data within the Netpbm framework.

HISTORY

zeisstopnm is a component of the comprehensive Netpbm project, a venerable suite of graphics utilities dating back to the early days of Unix. The Netpbm tools are renowned for their philosophy of converting various image formats into a common intermediate format (PNM) to facilitate chained processing. zeisstopnm was specifically developed and integrated into this suite to address the growing need for interoperability with image data produced by Zeiss confocal microscopes, a common instrument in biological and material sciences. Its inclusion reflects the Netpbm project's ongoing effort to support a wide array of scientific and proprietary image formats.

SEE ALSO

pnm(5), pgm(5), ppm(5), netpbm(1), anytopnm(1), pnmtojpeg(1)

Copied to clipboard