Problem
Align by correlation (Ctrl+\) aligns the current section to the previously viewed section, but the shift it computes cannot be recorded and reapplied across a range of sections. Aligning a stack means repeating the correlation section by section.
Proposed
Let the correlation alignment record its computed shift and propagate it across a chosen range of sections, the same way a manual transform can be propagated.
Notes
corrAlign (in PyReconstruct/modules/gui/main/field_widget_4_data.py, bound to Ctrl+\) computes an FFT cross-correlation shift and applies it to the current section only, setting section.tform directly. A propagation mechanism already exists in the same file (setPropagationMode / stored_tform / propagateTo) that records a transform change and replays it across a range; routing the correlation shift through that recording path (via changeTform) would satisfy this.
Related correctness fix to make alongside this: corrAlign composes its shift as shift_tform * tform, but the field-space shift should be applied after the existing transform (tform * shift_tform). The current order produces incorrect alignment whenever the section transform already has rotation or scale; pure translations happen to commute, which is why it has gone unnoticed.
Problem
Align by correlation(Ctrl+\) aligns the current section to the previously viewed section, but the shift it computes cannot be recorded and reapplied across a range of sections. Aligning a stack means repeating the correlation section by section.Proposed
Let the correlation alignment record its computed shift and propagate it across a chosen range of sections, the same way a manual transform can be propagated.
Notes
corrAlign(inPyReconstruct/modules/gui/main/field_widget_4_data.py, bound toCtrl+\) computes an FFT cross-correlation shift and applies it to the current section only, settingsection.tformdirectly. A propagation mechanism already exists in the same file (setPropagationMode/stored_tform/propagateTo) that records a transform change and replays it across a range; routing the correlation shift through that recording path (viachangeTform) would satisfy this.Related correctness fix to make alongside this:
corrAligncomposes its shift asshift_tform * tform, but the field-space shift should be applied after the existing transform (tform * shift_tform). The current order produces incorrect alignment whenever the section transform already has rotation or scale; pure translations happen to commute, which is why it has gone unnoticed.