Skip to content

3. Relevance mask

Afonso Mendes edited this page Sep 16, 2024 · 8 revisions

Introduction

SReD uses a relevance mask to filter out areas lacking significant structural information. This improves the computational efficiency and the analysis' outcome.

The rationale is that structural elements present themselves as regional image textures with non-zero variance. Therefore, areas devoid of structure will exhibit minimal texture. Determining the threshold for "minimal" texture is challenging due to the presence of ubiquitous image noise. Rather than choosing an arbitrary value close to zero, SReD estimates the average noise variance of the input image using a robust estimator Liu, et al. 2011. The relevance threshold is established by multiplying the estimated average noise variance by an adjustable constant, with the default set at 0. This produces a binary mask outlining areas with sufficient structural content.

Relevance range optimisation

The relevance constant can be used to control the strength of the filter. However, its value is arbitrary and can change significantly with the data characteristics (e.g., signal-to-noise ratio). SReD provides a streamlined approach to find an adequate value for the relevance constant.

As an example, we use an image containing a cell with labeled EB3 comets. We optimise the relevance constant using the function "Plugins>SReD>Relevance mask>Optimise relevance Constant (2D)". A window appears where the user can define the block's dimensions. Here, we will use 9x9, which roughly corresponds to the size of an EB3 comet. We can also define the relevance constant step - smaller steps result in more calculations and higher resolution. We suggest starting with a step of 1 and repeating the optimisation with smaller constants if needed.

Select the "Optimise relevance constant (2D) plugin Choose block dimensions and relevance constant step
image image

The ImageJ/Fiji log window shows the outcome of the optimisation in the form of a range (here, [0.0, 44.0]). This is the range of relevance constants where SReD detects variations in the relevance masks calculated. In other words, Relevance masks calculated with constants below the lower limit of this range always result in the inclusion of all image pixels, whereas those calculated with constants above the upper limit always result in complete exclusion.

Once finished calculating, the log window shows the optimised relevance range
image

Relevance range visualisation

The relevance maps calculated with different constants can be visually analysed using the function "Plugins>SReD>Relevance mask>Calculate Relevance Mask stack (2D)". A window appears, which allows the user to specify the block's dimensions, the optimised relevance range's lower and upper limits and the relevance constant's step. Here, we choose an interval of [0.0, 1.0] and a step of 0.0001 to explore the very beginning of the range.

Select "Calculate Relevance Mask stack (2D)" Choose block dimensions, relevance range and constant step
image image

The output is an image stack where each slice comprises a relevance mask calculated with a different relevance constant within the specified range. The relevance constant used to calculate any specific mask is displayed in the slice's label. The image stack contains 2 channels - channel 1 (in grayscale) contains the input image and channel 2 (in magenta) contains the relevance masks.

The output is an image stack Each slice is a relevance mask Slice labels show the relevance constants
image image image

The relevance constant is now optimised and ready for subsequent analyses!