Focus stack (global)

Extract a Z-substack from an input stack based on either manually-selected slices, or an automatically-calculated best-focus slice.

Description

Extract a Z-substack from an input stack based on either manually-selected slices, or an automatically-calculated best-focus slice. For automated methods, best focus is determined using intensity statistics (e.g. largest variance) of all pixels in each slice. When in manual mode, only the best focus slice for the first and last timepoints need be specified (all others will be estimated using polynomial spline interpolation); however, more frames can be specified if preferred.

Irrespective of the calculation method (manual or automatic), it's possible to extract a fixed number of slices above and below the determined best-focus slice.

Parameters

ParameterDescription
Input imageImage to extract substack from.
Output modeControls whether the best focus positions are calculated and applied (creating a new image) or simply calculated. In both cases, statistics for the best focus position (mean, median, minimum, maximum and standard deviation of slices) are stored as measurements associated with the input image.
Output imageSubstack image to be added to the current workspace.
Best-focus calculationMethod for determining the best-focus slice.
  • "Manual" Displays a control window, allowing the user to specify reference slices. These slices should be at the same true z-plane. Once complete, a substack will be extracted a specific number of slices above and below the reference plane (defined by "Relative start slice" and "Relative end slice". If references aren't specific for all timepoints, the missing frames will be estimated using polynomial spline interpolation.
  • "Smallest mean intensity" The reference slice is taken as the slice with the minimum mean intensity.
  • "Largest mean intensity" The reference slice is taken as the slice with the maximum mean intensity.
  • "Smallest standard deviation" The reference slice is taken as the slice with the minimum intensity standard deviation.
  • "Largest standard deviation" The reference slice is taken as the slice with the maximum intensity standard deviation.
Relative start sliceIndex of start slice relative to determined best-focus slice (i.e. -5 is 5 slices below the best-focus).
Relative end sliceIndex of end slice relative to determined best-focus slice (i.e. 5 is 5 slices above the best-focus).
Reference imageIf using manual selection of best focus slices, this is the image that will be shown to the user. While it doesn't need to be the input image (the one the output substack will be generated from), it must have the same number of slices and timepoints as the input.
Calculation sourceWhen using automatic best focus slice determination this controls the image source:
  • "External" The image for which intensity statistics are calculated is different to the image that the final substack will be created from. For example, this could be an filtered version of the input image to enhance structures when in focus.
  • "Internal" The same image will be used for determination of the best slice and generation of the output substack.
External sourceIf using a separate image to determine the best focus slice ("Calculation source" set to "External"), this is the image that will be used for that calculation.
Channel modeHow many channels to use when calculating the best-focus slice. "Use all channels" will use all channels, whereas "Use single channel" will base the calculation on a single, user-defined channel.
ChannelChannel to base the best-focus calculation on.
Smooth timeseriesApply median filter to best focus slice index over time. This should smooth the transitions over time (prevent large jumps between frames).
Smoothing range (odd numbers)Number of frames over which to calculate the median. If the specified number is even it will be increased by 1.