Stacker
Detailed documentation of the ALS Stack module
Categories:
Overview
The Stacker module handles the alignment and stacking of calibrated subs.
Configuration
Source | Data type | Required | Default value | |
---|---|---|---|---|
Alignment ON/OFF | Interface: Stacking controls | ON/OFF | ∅ | ON |
Stacking mode | Interface: Stacking controls | choices: - mean - sum |
YES | mean |
Detection threshold | Interface: Stacking controls | integer | YES | 25 |
Control
The Stack module is launched in the background at ALS startup
Source | Type | Response |
---|---|---|
sub(s) in queue | Event | trigger processing |
Input
Data | Type |
---|---|
sub at queue front | Image |
session alignment reference | Image |
Behavior
flowchart LR Start([START]) FirstSub{{First sub of the session?}} SetAlignReference[Set sub as alignment reference] CheckShape{{Sub same dimensions as previous result?}} CheckAlign{{Alignment ON?}} AlignImage[Align sub] StackImage[Add sub to Stack] ComputeStacking[Compute stacking] PublishReference[Return alignment reference] PublishResult[Return generated image] End([END]) Start --> FirstSub FirstSub -- YES --> SetAlignReference SetAlignReference --> PublishReference FirstSub -- NO --> CheckShape CheckShape -- YES --> CheckAlign CheckAlign -- YES --> AlignImage AlignImage --> StackImage CheckAlign -- NO --> StackImage StackImage --> ComputeStacking ComputeStacking --> PublishResult CheckShape -- NO --> End PublishReference --> End PublishResult --> End classDef bounds fill: #333, stroke: #666, stroke-width: 2px, color: #BBB, font-family: 'Poppins', sans-serif classDef step fill: #444, stroke: #622, stroke-width:2px, color: #c6c6c6, font-family: 'Poppins',sans-serif classDef test fill: #444, stroke: #226, stroke-width: 2px, color: #c6c6c6, font-family: 'Poppins', sans-serif class Start,End bounds class SetAlignReference,AlignImage,StackImage,PublishResult,ComputeStacking,PublishReference step class CheckShape,CheckAlign,FirstSub test
Alignment
If alignment is ON
-
Search for similarities between the calibrated sub and the session alignment reference.
If the calibrated sub has similarities count below the configured detection threshold, it is discarded and the Stack module resumes listening to its queue. -
Compute required transformations for the calibrated sub to align with the reference:
- translations
- rotation
- resizing
-
Apply the transformations to the calibrated sub.
Stacking
- Add the aligned (if requested) sub to the stack.
- Generate a new image containing the stacking result according to the configured mode.
Output
The generated image is broadcast