Align_slices in stack utilized the template matching function cvMatch_Template to do slice registration(alignment) based on a selected landmark.
This function will try to find the landmark or the most similar image pattern in every slice and translate each slice so that the landmark pattern will be the same position throughout the whole stack. It could be used to fix the drift of a time-lapse image stacks.
Source code: link
Input data: image stack
output data: image stack