Stack Acquisition

To configure a stack, first click the Enable Stack check box in the Main Controls Window to open the Stack Controls Window.


Slice Configuration

../_images/StackControlsUniform.png ../_images/StackControlsBounded.png ../_images/StackControlsArbitrary.png

Next, the slices need to be configured. There are three tabs for three ways that a stack slices can be defined - Uniform, Bounded, and Arbitrary. Each tab shares the Frames per Slice, Number of Slices, and Number of Volumes; each of these can also be configured from the Main Controls window. The way in which they differ is how the locations of the slices are defined. For this tutorial, a uniform stack of the following parameters are defined:

Number of Slices


Step Size


Centered Stack

Leave unchecked

See below for a description of each of the three slice definition tabs.

  • Uniform Stacks are configured by the Number of Slices and the Step Size. The stack starts from the current imaging plane, unless the Centered Stack checkbox is ticked, in which case the stack is centered around the current imaging plane. Note: The Step Size can be positive (stack points into the sample) or negative (stack points out of the sample).

  • Bounded Stacks allow to define the top and bottom bounds of the stack. While in a FOCUS acquisition, use the Motor Controls to go to the top of the stack and select ‘Set Start’. Next use the motor controls to go to the bottom of the stack and select ‘Set End’. The step size will automatically be calculated to reflect the chosen number of slices. The Use start end powers checkbox refers to whether or not to use the start and end powers used when selecting slice locations. If left unchecked, ScanImage® will use the Power/Depth Adjust method as configured from the Power Controls window.

  • Arbitrary Stacks are configured by entering slice depths into a vector in the Arbitrary Zs [um] field. If an ROI group is loaded from the ROI Group Editor, the Copy from ROI group button can be clicked to retrieve all z planes of previously drawn ROIs.

Stack Type

ScanImage supports two types of stack:

Slow Stack

After a slice is acquired, the acquisition stops, the motor moves the focal point to the next slice and the acquisition is restarted. This mode can utilize a motorized stage, or a FastZ device.

Fast Stack

The motor moves the focal point continuously in Z, while the acquisition keeps running. This mode requires a FastZ actuator that is controlled via an analog command signal. (e.g. Piezo objective positioner, electrically tunable lens, voice coil for remote focusing)

To learn about the distinction between Slow Stacks and Fast Stacks, visit the Volume Imaging concept page.

Slow Stack

Configure a slow stack by

  1. selecting an actuator (Motor or FastZ)

  2. decide whether the actuator should return to the start (home) position after the stack acquisition is completed

  3. decide whether to lose Shutter btwn Slices*

Fast Stack

Configure the fast stack by

  1. selecting a Waveform shape,

  2. indicating whether to Return Home after the stack,

  3. and optimizing the waveform by - clicking the Test Waveform button, - determining Flyback Time (ms) and Actuator Lag (ms), - and entering them in from the Stack Controls Window


Waveform shape to drive the FastZ actuator. Options:

  1. sawtooth (unavailable for arbitrary zs stacks OR if Frames per Slice > 1)

  2. step (ensure the fastZ actuator can settle in time)

Return Home

Return to initial position after the stack acquisition is completed

Flyback Time (ms)

Time allocated for flying-back the the Z actuator at the end of the stack


the flyback time is rounded up to a multiple of the frame duration to determine the number of discarded frames

#Discard Frames

(not settable) number of flyback frames, calculated based on flyback time

Actuator Lag (ms)

Lead time applied to FastZ drive waveform to compensate for actuator lag

Volume Rate

Volume Rate [Hz]

Test Waveform

Show the FastZ Tuning Window

Starting the Acquisition

Clicking the Grab button in the Main Controls window will acquire the stack.

Render as Volume


New in SI2021.1.x!

If you wish to view your stack as a 3D volume instead of the default 3D channel view, the context menu option “Render as Volume” will render your stack as a 3D volume in a separately maneuverable window powered by the VTK renderer.


The stack will be rendered using the maximum intensity projection strategy. Other methods are not supported at this time.

The Volume Renderer currently only allows for adjusting the volume’s color balancing via independent lookup table sliders as well as a z-scale slider for adjusting the model’s height.


The black and white sliders can be used to adjust the color balance independently from ScanImage®’s own lookup table settings. On window creation, these sliders will match ScanImage®’s lookup table settings.

The Z-Scale slider allows the user to adjust the scale of the 3-D model view in Z. The default scaling is calculated based on ScanImage®’s objective and motor control settings. The units of Z indicates a multiple of the default scale (a value of 10 indicates 10x default scale).

The current 3d manipulation controls are the same as the default VTK viewer controls:

  • Holding down the left mouse button will rotate the volume in the direction of the mouse about the volume’s center.

  • Scrolling using the mouse’s scroll wheel will zoom as one would expect when viewing ScanImage® windows.

  • Holding down the right mouse button will also zoom based on the location of the mouse: inwards if the mouse is near the top of the window and outwards when near the bottom.


Holding down the middle mouse button will start to pan the camera in the direction of the mouse’s position. This is usually not desirable for users and will be suppressed in future releases.

Current Limitations

  • Live volume viewing is currently not supported.

  • Only rectangular MROIs are supported with this viewer.

  • Be careful when using frame averaging with this volume. While rendering these frames are supported, organizing the averaged frames to be shown in the window may take longer than expected.

  • This feature is only present on MATLAB versions R2018a and later.