Skip to main content
v2026.11,858 entries · CC-BY 4.0
LAC HealthMedical & Research SuppliesReagents, PPE & instruments — chain-of-custody documented.Fast, traceable sourcing built for regulated research environments, from bench consumables to instrumentation.Shop lac.us CodeCASRAIlac.us

Z-Stack in Microscopy: What It Is, Step Size and Flattening in ImageJ

Z-stack in microscopy: what it is, how to choose z-step size for deconvolution, and how to flatten a stack with ImageJ Z Project.

Written and maintained by CASRAI Editorial Board

Last updated

Scope: this page covers z-stacks in light microscopy and image analysis. It does not cover the dietary supplement sold under the name Z-Stack, and it contains no health or purchasing content.

Short answer

A z-stack is a series of images of the same field taken at successive focal depths along the optical (z) axis, so a thick specimen is recorded as a 3D volume. Set the step between slices to about 2.3 times smaller than the objective’s z-resolution; to “flatten” a stack in ImageJ, use Image > Stacks > Z Project.

Definition and scope

Each slice in a z-stack is an ordinary 2D image; the stack is the ordered set of slices. Stacks are most often collected on confocal microscopes, where each slice is an optical section, but widefield systems can also record focal series. The same idea underlies whole-slide imaging in digital pathology, and 3D reconstruction in super-resolution microscopy.

How a z-stack is acquired

The operator sets a top and bottom position (or a centre and range) and a step size, and the instrument records one image per position. Three values interact: the number of slices, the step size, and the total depth. Halving the step size doubles the slice count over the same depth, which lengthens acquisition and increases light exposure, so the trade-off matters for living or bleaching-prone samples (see photobleaching and phototoxicity in live-cell imaging).

Choosing the step size

The University of Queensland Institute for Molecular Bioscience advises setting the z-step to 2.3 times smaller than the z-resolution of the objective. Axial resolution depends on the objective’s numerical aperture, the wavelength of light and the refractive index of the sample, so the right step differs between objectives and dyes. The same source notes that vendors often default to 2x oversampling, whereas image deconvolution requires 2.3x to 3x, so a step somewhat smaller than the vendor default is advised when stacks will be deconvolved.

Oversampling relative to z-resolution Source statement
2x Typical vendor default (UQ IMB)
2.3x Recommended step size setting (UQ IMB)
2.3x to 3x Required for image deconvolution (UQ IMB)

How to flatten a z-stack in ImageJ

ImageJ’s documentation uses “flatten” informally for collapsing a 3D stack to a single 2D image. The tool is Image > Stacks > Z Project…, which asks for a start and stop slice (defaulting to the first and last) and a projection type:

Projection type Listed in ImageJ Z-functions
Average intensity Yes
Maximum intensity Yes
Minimum intensity Yes
Sum slices Yes
Standard deviation Yes
Median Yes; gives the clearest rendering but filters out more of the image

To project in blocks rather than the whole stack, use Image > Stacks > Tools > Grouped Z Project… (maximum, average or sum). The group size must be a factor of the total number of slices, and the output is a new stack.

Common misunderstandings

  • A projection is not a measurement substrate. Projecting discards axial information, so quantification should be done on the stack, with projections used for display.
  • More slices is not automatically better. Slices below the sampling the optics can resolve add exposure without adding information; the step guidance above is the reference point.

FAQ

What is the z stack?

In imaging, it is the set of images captured at different focal depths of one specimen, forming a 3D volume. A search for the bare phrase “Z Stack” can also return a dietary supplement; this page concerns microscopy only.

What is z-stacking in imaging?

Z-stacking is recording that series of focal planes and, optionally, combining them into one 2D image (a projection) or a 3D reconstruction.

How to flatten a z stack in ImageJ?

Open the stack, choose Image > Stacks > Z Project…, set the start and stop slices and pick a projection type such as maximum intensity. The result is a single 2D image.

Where can I buy Z Stack?

This page covers imaging z-stacks only and gives no supplement, purchasing or health information.

Sources

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about Z-Stack in Microscopy: What It Is, Step Size and Flattening in ImageJ

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →