5 Oct 2020

# Relative Area Fraction for Amira-Avizo2D

This Xtra provides a module to help compute the area fraction of a label over the area of another label in Amira-Avizo2D.

This Xtra provides a Python module, Label to Area. When combined with a custom measure Area/Maximum (that we'll name CustomAreaFraction), the Xtra allows you to compute the area fraction of a label over the area of another label.

Definitions

• Native measure Area Fraction of A, using Image as the Intensity Image input, will compute:
area of A / area of Image.

• Custom measure CustomAreaFraction, using the result of Label to Area on B as the Intensity Image input, will compute:
area of A / area of B.

Note: if A is completely included in B, then the measure is equivalent to the relative area fraction of A to B.

Example

A 2D data (grains.png) as well as a recipe (recipe.hxisp) are provided to illustrate the combined use of these two tools to compute the custom area fraction through a comprehensive use case.
The 2D data represents several grains of highly variable brightness.
The recipe generates two segmentations from this image:

• One segmentation contains only bright grains (grayscale value is greater than 127).
• One segmentation contains all the grains (grayscale value is greater than 2).

The label image with all the grains is then converted into a grayscale image by the Label to Area module.

Finally, by applying the CustomAreaFraction measure to both the label image of the bright grains (Data) and the grayscale image of all grains (Intensity Image), you can compute the area fraction of bright grains relative to all grains.

You can generalize this technique to compute any area fraction relative to any binary image.

The Label to Area Python module has no specific port; it is just a single push button conversion module.

You must create the Area/Maximum custom measure (CustomAreaFraction) manually.

A tutorial explaining how to run the recipe and set the custom measure is provided with the Xtra, from the Download button.