Stack register tool MLx Home | MLx menu | MLx buttons | Widgets | Index | What's New | Stacks

This tool is built into the stack windows as a series of buttons on the title bars. The tool is useful for registering images that are offset by a translation. RGB images can be registered. Scaling and rotation are not corrected with this tool, but are with the registration widget.


When a stack window is first made, these buttons will appear in the title bar of the plot window (when the window is in front - they disappear when another window is in the front).

 Standard stack buttons. They are there all of the time.

<- -> Move green line to left or right. Show prev or next slice.
Scl - change the scaling for the plot window.
R-on Activate registratioin mode. Add more buttons.

Registration mode adds more buttons to the plot window:
 - + Move the blue line (for the parent or fixed slice) to the left or right
Ofs Shows offset of blue line from green line. Click to set offset to zero.
Link "Link": The blue line follows the green line by a fixed offset when arrow buttons or arrow keys are pressed. "Free": the blue line (parent slice) stays fixed, and the offset changes accordingly.
R-off Turns registration mode off. Removes buttons.

Registration mode also addes buttons to the stack image window
Show current (fixed) slice - set with arrows
Show offset (movable) slice. Set slice with + - buttons. Jog image with arrow keys.
Sf Slow flicker
Ff Fast flicker
Ofs Offset menu. Show/save offsets. Register stack.

The stack image is moved in any of the four directions using the arrow keys:


  1. To register a stack 'from scratch':
    1. Load the stack widget (stacks.pfsl).
    2. Load the stack.
      1. Move Stack window so that the stack window and plot windows are both visible.
      2. Click on the stack image window to see a plot profile. Set scaling for profile with Scl button.
      3. Scale to 8 bit: Loading takes longer, but a) Response to clicks when changing slides is much faster, b) Data will be stored properly in raw format, rather than clipped from 0-255, c) Most other applications for viewing prefer 8 bit images.
      4. The pink bar has timing information. Loading can take place in the background. The loop monitor bar will disappear. Loading takes somewhat longer in the background.
    3. Click the R-on button to activiate the registration tool.
    4. Set the parent (fixed or reference) slice, the offset, and the 'Link' or 'Free' mode.
      1. To register a slice with the previous slice
        1. Click on second slice (index is 1) in the plot window, or otherwise move the green line to the second slice in the plot. (The index of the slice appears after the name in the title bar.)
        2. Click on the offset button to move the blue line to the same position (the Parent slice and the 'stack' slice are now the same.
        3. Click the blue '-' button to move the blue line one slice to the left (to the first or zero index slice. If the Free/Link button says 'Link', then the offset cannot be changed - temporarily set the button to 'Free', offset the blue line, and change back to 'Link', so that the blue line will follow the green line when the arrow keys are used.
      2. To register all slices with a fixed reference slice
        1. Click the Free/Link button so that it says 'Free'.
        2. Click on the desired slice in the plot window.
        3. Click the offset button so that the blue line goes there too.
        4. Leave the 'Free/Link' button as 'Free', so that the blue line will not move when the arrow keys are used.
    5. Turn on the fast or slow flicker.
    6. Navigate through the stack using the command-left and command-right arrow keys. If the offset is -1, start at the second slice, registering it with respect to the first slice (if you are registering in the fixed (or Linked) offset mode.
    7. Move the slice with the arrow keys, holding down the control key for large image movements.
      1. If the images have shifted, and succeeding slices remain in about the same position , use the 'Dupe down' menu in the Ofs button -- this in effect moves all following slices to the same offset as the current slice. It does NOT move previous slices.
      2. The fast flicker mode is quite sensitive to single pixel 'joggs' of the image, if the images are relatively sharp and not too different from each other. They will 'lock in' when the offset is just right.
      3. Most everything can be done (jogging, showing offsets, moving from slice to slice) with the flicker going. Click on the P or S buttons to stop the flicker.
      4. If you want to start over, use the Reset menu (in the Ofs button).
      5. The 'print offsets' menu shows in the Listener only those offsets that have been changed (that are not (0,0).
      6. The Save To Window menu will show ALL of the offsets in a text window. They may be edited here by hand, and saved to a file. Comments, date/time (F11), etc. can be inserted after the third item in any line. The 'Restore From Window' will read the offsets from the text window back into the stack.
      7. NOTE - after slices have been offset, the plot window is NOT correct. The plot window accesses the slice arrays, which at this point have not been changed. Only the displayed images are offset appropriately to appear as if they have been registered.
    8. When all of the offsets are set to your satisfaction (the Stack -> Movie menu is good for checking this. The move may be interrupted with command-.), invoke the 'Register Stack' menu.
      1. Use the 'save to window' option if you have not already saved your offsets. If something goes wrong, you might wish you had them.
      2. After the register operation, the plot window will be correct, and junk will appear in the borders of most images. The offsets will have been zeroed out. The rectangle (see the Rect... button) is set to the maximum size that has no junk border in any of the slices. The stack cannot be cropped in place - crop it by saving it to a raw format file, or a folder of TIFF files.
      3. Saved the registered stack with of the the Stack-> Tiff Files or Stack -> Raw File menues. Alternatively, just save the offset text file, and restore the registered stack as below:
  2. To register a stack using an offset file, or continue from previous work.
    1. Load the original stack.
    2. Open the text offset file.
    3. Making sure that the offsets file is the FRONT text window (click on it to make sure), invoke the 'Restore from Window' menu in the Ofs button to read in the offsets.

Miscl Notes