Skip to main content
Designer and manufacturer of advanced imaging equipment
Thursday, 15 October 2026

Article

Branching in the ALTRON graph: saving, averaging and displaying at the same time

rahni

Suppose you have a sample under the camera for several hours. You want to see a clean, low-noise image on the monitor, save all the raw data for later analysis, and, separately from these, take a snapshot every few seconds for a report. Three demands from one camera. In ALTRON this is done with branching in the graph.

Splitting the data path into several branches in the ALTRON flow graph editor
Splitting the data path into several branches in the ALTRON flow graph editor

What does branching mean?

Every ALTRON graph is made of nodes connected by wires. The camera is at the head of the chain. Processing comes next, and storage and display nodes come at the end. A node's output doesn't have to go to just one node. You can draw several wires from one node's output, and each wire creates a separate branch.

The branch itself does not copy the data, and all branches receive the same data. So an extra display or saving branch does not change the data in the other branches.

Where should the branch point go?

This is the most important decision. Each branch receives exactly the data that flows at the branch point:

  • Split off the saving-for-analysis branch after the physical sensor corrections, such as black level and dark and white correction, but before cosmetic changes such as gamma.
  • Put smoothing and sharpening that are only for the eye in the display branch, so the saved data stays untouched.
  • If your own program needs to pick up data from the middle of the path, connect a Data Holder node right there. This node doesn't change the data; it only makes it available to external code.

An example: saving, averaging and displaying at the same time

Build this structure in Tools › Flow Graph Editor:

  1. First place the camera, then the basic corrections, for example the FlatFieldCorrection node for dark and white correction.
  2. From the output of the last correction, drag the first wire to a raw data saving node (RawData). This branch saves everything in full.
  3. Run the second wire to a Smoothing node with the Continuous Average stage, and feed its output to a display. This branch shows the smooth, averaged image.
  4. Connect the third wire directly to another display so you can also see the live, unaveraged data.
  5. Save the graph and press Recreate All in the main program. The change does not take effect until the chain is rebuilt.

A branch that saves only every few seconds

For periodic snapshots, put an ImagingInterval node at the start of the branch and connect the saving node after it. It has three modes:

  • Every T seconds: one frame or line passes every T seconds. The default is 5 seconds, which suits time-lapse recording.
  • Every N items: one out of every N frames or lines passes. For example, you take one sample out of every ten parts.
  • Max rate (per second): At most this many pass per second, evenly spaced. This mode is for lightening processing and display.

Be sure to check the Apply to saving too option. If it's ticked, the savers after this node record only the samples that pass, and you get a time-lapse recording. If it isn't ticked, decimation only lightens processing and display. In that case, while a saver from this same camera is recording, the node passes all the data so that nothing is missing from the recording.

Among ALTRON's default graphs there is also a ready-made example named Default_AreaScan_Color_Usb3+ImagingIntervalForDataSaving that you can start from.

Common mistakes

  • Putting gamma or sharpening before the saving branch point, then wondering why the saved data doesn't match the measurements.
  • forgetting Recreate All after changing the graph.
  • a heavy display branch slows down the entire chain. In the Performance tab, see which node takes the largest share of the CPU, and put an ImagingInterval in Max rate mode in front of it.

A good habit

Before a long recording, run the graph for a few minutes and compare each node's input and output data rates in the Internal Info tab. If a node's output is suddenly lower than its input and that isn't intentional on your part, data is being dropped exactly at that node.

For a more general explanation of processing pipelines, see Wikipedia (English).

We have collected common questions about graphs and recording in our FAQ. If your graph needs a special structure, write to us via contact page and we'll design it together.

Where our equipment is used

Organizations, universities, industries and companies that have used our products

  • Hedayat Hooshmand Nozhan Sepehr