# Multi-Scale Cylinder Correlation

This module gives better results for fiber-tracing in the case of multiple fibers with differing or varying diameters in the same dataset.

**Background**

The fiber tracing in Amira/Avizo (using the extensions XFiber or XTracing) uses a template-matching approach, where a virtual reference cylinder with a specified radius and length has to be defined.

The results of a run of the *Cylinder Correlation* module are two datasets: One is the correlation map, storing the maximum correlation value of all tested orientations of the template cylinder at that location. The second data-set is the orientation field, which stores the cylinder orientation corresponding to the maximum correlation value at that location. Using then the module *Trace Correlation Lines* the information from both datasets is combined to trace the individual fibers.

But if data contains fibrous structures of differing or varying thickness, it is not possible to trace all fibers using the same parameters. You will miss certain fibers or you will get false detections.

**Description**

The Python script-object *Multi-Scale Cylinder Correlation* combines the results of up to six runs of the *Cylinder Correlation* module. You can specify the parameters of the cylinder template for each run separately. The results will be a correlation map and an orientation field, which you can use as input for the *Trace Correlation Lines* module. As a third result, a dataset is created which stores the information in which of all the separate runs the maximum value occurred, this is the maximum index map.

The combination of all the partial results is done as follows: At each voxel position, the maximum of all the intermediate correlation map values is written to the resulting correlation map. Likewise all the voxel values of the resulting orientation map are respectively taken from the intermediate orientation map corresponding to the correlation value picked for each voxel.

Besides, this module was used to study polyester fibers and their tensile deformations.

It is introduced in this paper: https://www.frontiersin.org/articles/10.3389/fmats.2017.00043/full

The corresponding dataset is provided within this Xtra along with the module.

__Note__: In the module *Trace Correlation Lines* there is the parameter "Minimum Distance", controlling the minimum allowed distance between two traced fiber centerlines. Its default is set to the diameter of the template cylinder used in *Cylinder Correlation*, i.e. it is assumed that fibers can be touching but not overlapping.

The module *Trace Correlation Lines* does not support multiple, i.e. adapted, values for "Minimum Distance", to allow traced centerlines being closer together if the assumed fibers are thinner, and forcing the centerlines to be more distant for assumed thicker fibers.

So, depending on the value you choose for "Minimum Distance", you might miss some fibers, or you might get too densely packed center-lines, even if the input correlation-field ("maxCorrelation") looked good.

**Usage**

Right-click on a scalar-field dataset, select *"Xtra->Fiber Tracing->Multi-Scale Cylinder Correlation"* and click on *"+Create"*.

**Settings**

The first port is * Number of Cylinder templates* that determines how many different cylinder templates must be used to match potential cylinders within the input volume.

Most of the other available ports are a subset of those available in the module Cylinder Correlation. These ports have as many entry fields as the number of cylinder templates previously set, thus allowing different settings for the separate runs (2 up to 6) of Cylinder Correlation:

**Length****Angular Sampling****Mask Radius****Outer Radius****Inner Radius**

The last port * Contrast* controls for all runs whether the structures to be traced are bright on dark or vice versa.

*Courtesy of Jekaterina Maksimcuka and Gowsihan Poologasundarampillai, University of Manchester
J. Maksimcuka et al, X-ray Tomographic Imaging of Tensile Deformation Modes of Electrospun Biodegradable Polyester Fibers, Frontiers in Materials, vol. 4, 201*