Microscopy File Formats

How to Open & Batch Convert Zeiss CZI and Nikon ND2 Files Without Losing Scale

Proprietary microscope containers—Zeiss .czi, Nikon .nd2, Leica .lif, and Olympus .vsi—store raw 12-bit/16-bit detector counts, multi-channel wavelengths, Z-stacks, and exact µm-per-pixel calibration. Exporting them as 8-bit JPEG compresses intensities and destroys physical scale.

Segmented overlay for Fluorescence Cell Counting & Positive Rate
Raw micrograph for Fluorescence Cell Counting & Positive Rate
RawQuantified
Reference output for this workflowDrag the divider to compare the unmodified micrograph with automated quantification for Fluorescence Cell Counting & Positive Rate.View Fluorescence Cell Counting & Positive Rate specs

Format comparison: what breaks when you export wrong

Keep raw vendor files as your archive master. If you must convert for external software, convert strictly to lossless OME-TIFF:

FormatBit depthPixel scale (µm/px)Safe for intensity / CTCF?
.czi / .nd2 / .lif (raw)12-bit or 16-bitEmbedded in metadataYes (preferred source)
.ome.tif (lossless)16-bit preservedPreserved in OME-XMLYes (standard interchange)
.png (8-bit RGB)8-bit only (0–255)DroppedCounts/area only if scale known
.jpg (compressed)8-bit lossy blocksDroppedNo — compression corrupts intensity

Batch conversion in Fiji (Bio-Formats) vs. Python bioio

In Fiji, open Plugins Bio-Formats Bio-Formats Importer with Color mode set to Default and Autoscale unchecked. For folders of 50–500 files, Python bioio avoids Fiji memory crashes and extracts exposure times directly into a QC table:

Extract raw channels + physical pixel scale in Python
from pathlib import Path
from bioio import BioImage
import tifffile

for path in sorted(Path("raw_czi").glob("*.czi")):
    img = BioImage(path)
    arr = img.get_image_data("CYX", T=0, Z=0)  # lossless 16-bit array
    um_x = img.physical_pixel_sizes.X
    tifffile.imwrite(f"out/{path.stem}.tif", arr, metadata={"um_per_px": um_x})

Skip conversion entirely when you want final counts and figures

MicroQuant ingests raw .czi, .nd2, .lif, .ome.tif, and .svs files directly in the batch pipeline—preserving 16-bit bit depth, reading pixel calibration automatically, and flagging any accidental exposure-time mismatch between experimental groups.