Skip to main content
Version: 2023.09.1

Classified Image

If Classified Image is selected as input, no further selections of input should be made. The calculations are based on the labels, and are all of a morphometric nature.

  • Calculate - Choose the morphometric feature to calculate.
  • Label - Specify one or all of the labels on which the calculation should be performed.
  • ROI - Specify one or all ROIs to limit the object. Only labeled pixels inside the ROI(s) are used in the calculation. It is also possible to choose not to use any ROIs to limit the objects.
  • Variable name - Specify a name for the variable. If the name is already used, the variable is not added to the list.
  • Limit calculations to the inside of the counting frame - Only available when a counting frame is added in the preproccesing steps.

Calculate

The following calculations can be performed on the classified image:

Count

Count calculates the total number of objects with the specified label/annotation.

Area

Area calculates the complete area for all obejcts with the specified label/annotation. By default a counting frame will be applied, which can be disabled by clicking the corresponding box. This should only be done when working on larger objects, which span multiple analysis tiles.

Eccentricity

Eccentricity calculates the mean eccentricity measure of the objects with the specified label/annotation. Eccentricity is calculated as the fit of an ellipse to the object. The fitted ellipse has the same second order central moments as the object, and is a circularity measure defined as:

e=1bae = \sqrt{1 - \frac{b}{a}}

where aa is the length of the major axis and bb is the length of the minor axis of the fitted ellipse. The eccentricity will equal 1 for a line and 0 for a circle.

Form Factor

Form Factor is a measure of the degree of circularity of the object. The Form Factor is defined as:

FormFactor=4πAreas(Perimeters)2Form Factor = \frac{4\pi \cdot Area_{s}}{\left(Perimeter_s\right)^2}

where the AreasArea_s is the area of the simplified object ss and PerimetersPerimeter_s is the perimeter of ss. The Form Factor is a value between 0 and 1, where a perfect circle has a form factor of 1, and is found as the mean of the Form Factors for the chosen objects.

As Visiopharm software works with raster images, where no label can be perfectly smooth, and due to the coastline paradox, most form factors are 1%-10% smaller than their theoretical counterparts. For more information refer to the section Form Factor in Post Processing.

Convexity

Convexity is the mean of the convexity of the specified label/annotation. The convexity is defined as:

Convexity=Perimeterc,sPerimetersConvexity = \frac{Perimeter_{c,s}}{Perimeter_{s}}

where Perimeterc,sPerimeter_{c,s} is the perimeter of the simplified object of the convex hull of an object, and PerimitercPerimiter_{c} is the perimeter of the simplified object. The resulting value will be between 0 and 1.

The dotted line represents the convex hull of the red object.
The dotted line represents the convex hull of the red object.

Solidity

Solidity is the mean of the soldity of the specified label/annotation, and is defined as:

Soldity=AreasAreac,sSoldity = \frac{Area_s}{Area_{c,s}}

where Areac,sArea_{c,s} is the area of the simplified object of the convex hull of an object, and AreasArea_s is the area of the simplified object. The resulting value will be between 0 and 1.

The dotted line represents the convex hull of the red object.
The dotted line represents the convex hull of the red object.

Ellipticalness

Ellipticalness is the mean of the ellipticalness of the specified label/annotation, and is defined as:

Ellipticalness=1AreaFAreasπMajorAxisMinorAxisEllipticalness = 1 - \frac{|Area_F-Area_s|}{\pi \cdot MajorAxis \cdot MinorAxis}

where AreaFArea_F is the area of an ellipse fitted to the object, AreasArea_s is the area of the simplified object, MajorAxisMajorAxis and MinorAxisMinorAxis are the axes of the ellipse fitted to the object. Ellipticalness is a value between 0 and 1 which represent how identical the object is to an ellipse, with 1 corresponding to an ellipse.

Perimeter

Perimeter is the total perimeter of all objects in the specified label/annotation.

Lesser Diameter and Largest Diameter

The Lesser Diameter calculates the maximum diameter across the lesser aspect of the object, while the Largest Diameter calculates the maximum diameter across the largest aspect of the object. Both of these are local measures, that take local variation in the object into account.

The aspects are found by calculating the maximum of the distance transformation of the object and placing finding an orthogonal vector from this point. The resulting variable will be the sum of all calculated diameters, for either the largest or smallest aspect.

If the button "Draw Outputs" is ticked, then the calculated diameter will be shown as an annotation in the image.

If the calculation should be done for all labels of a type, ensure that the Output Level is set to Object (eg. cells) and the correct label is selected.

Major Axis Length and Minor Axis Length

The Major Axis Length and Minor Axis Length are calculated as the length of the major and minor axis of an ellipse fitted to the object. The fitted ellipse will have the same second order central momest as the obejct. The resulting variable will be the sum of all calculated axis lengths, for either the major or minor axis.

If the button "Draw Outputs" is ticked, then the calculated axis will be shown as an annotation in the image.

Orientation

Orientation calculates the mean orientation of the specified label/annotation, relative to either horizontal, vertical, or a selected measure. The orientation is given in radians as the orientation of the major axis of an ellipse fitted to the object.

If the button "Draw Outputs" is ticked, then the major axis of the fitted ellipse will be shown as an annotation in the image.

If the Output Level is set to image, then the mean orientation of all objects is found, but if set to Object (eg. cells) the mean orientation of every single object is found.

Connectivity

Connectivity is a measure calculated on the size distribution of all specified label/annotation membrane fragments remainning after any (optional) post-processing steps. The size of each membrane fragment is defined as its area. The connectivity measure is most suited for applications where the membrane stain displays "chiken wire" like structures.

The connectivity is defined as the area under the curve in a graphic representation of ratio between Y and X:

X=AdynAminAmaxAminY=AxAX = \frac{A_{dyn} - A_{min}}{A_{max} - A_{min}} \hspace{50px} Y = \frac{\sum A_x}{\sum A}

where AminA_{min} is a cutoff value defining membrane fragments too small to be included in the estimated connectivity, and AmaxA_{max} is a cutoff value for membrane elements that are too large. AdynA_{dyn} is a dynamic dynamic cutoff varying between AminA_{min} and AmaxA_{max}. A\sum A is the total area of all membrane fragments, and Ax\sum A_x is the total area of membrane fragments larger than AdynA_{dyn}.

The value of AminA_{min} can be changed by entering a value for Object Size Cutoff. If the total area of detected membrane is less than this value, the connectivity calculation will result in 0. For an in-depth explanation of this approach, please refer to this paper Digital image analysis of membrane connectivity is a robust measure of HER2 immunostains.

Interface Length

Interface length calculates the total length of the interface (common border) between two labels, two ROIs or labels within a ROIs. Master refers to the object measured from and Reference to the object measured to.

  • Under Reference label and Reference ROI choose which label, and in what ROI, to use as reference.
  • Under Master label and Master ROI choose which label, and in what ROI, to use as a master. The interface length is then calculated by locating pixels of reference phase in contact with the master phase. If no pixels in the specified labels/ROIs are in cotact with eachother, the calculated interface length will be 0.

Object Distance

Object Distance is the mean of the shortest distances between the edge of a specified label/ROI and the edge of another object of the same type (label/ROI).

  • From Label or Region of Interest - Select the object type, from which the distance should be calculated from.

  • To Label or Region of Interest - Select the object type, to which the shortest distance should be calculated to.

Please note that you can only select one object type, meaning that if From Label is selected, then Region of Interest should be set to "Don't Use", and vice versa. Selecting multiple object types will result will prompt an error message to occur.

It is possible to choose the same label to measure from and to, which will find the mean distance between objects of this label.

Left, Right, Top, Bottom

Left, Right, Top, or Bottom calculates the position of the leftmost/rightmost/bottommost/topmost pixel for the specified label/annotation in relation to the centre of the image.

If working with an image that is 320 µm wide and 240 µm tall, the leftmost pixel in the image would have a value of -160, the rightmost pixel would have a value of 160, the topmost pixel would have a value of 120, and the bottommost pixel would have a value of -120.

If the Output Level is set to Image, only one value will be found, and if Object (eg. cells) is chosen, a data set of pixel positions for each object will be calculated.

Center X and Center Y

Center X or Center Y will calculate the x- or y-coordinate for the center of mass for the specified label/annotation. The values relate to the centre of the image and are given in µm as when using Left, Right, Top, or Bottom.

If the Output Level is set to Image, the mean value will be calculated, and if Object (eg. cells) is chosen, a data set of pixel positions for each object will be calculated.

Region of Interest

The Region of Interest will calculated the boundary of the specified label/annotation. The boundary of the outlining box is given in mm and is in relation to the centre of the image, where left and down from the centre are negative values, and right or up from the centre are postive values. If the Output Level is set to Image, the outlining box will include all relevant objects, and if Object (eg. cells) is chosen, an outlining box will be calculated for each object.

H-Score

H-score is a quantative measure for evaluating immunohistochemistry results. Instead of only classifying nuclei as negative or positive, the H-score uses three sub-classifications for positive nuclei based on the staining intensity. The classifications are named 0 (or negative), 1+, 2+, and 3+ with increasing stain intensity. In contrast to other variables, the input will always be the entire image, where it will calculate the h-score for all labels.

The H-score is based on the total number of classified cells, and not the area of each classification. It is calculated using the following formula:

H-score=0(%negativecells)+1(%1+cells)+2(%2+cells)+3(%3+cells)H{\text -}score = 0 \cdot (\% \hspace{2px} negative \hspace{2px} cells) + 1 \cdot (\% \hspace{2px} 1^+ \hspace{2px} cells) + 2 \cdot (\% \hspace{2px} 2^+ \hspace{2px} cells) + 3 \cdot (\% \hspace{2px} 3^+ \hspace{2px} cells)

Using this formula, more intensely stained nuclei are weighted more than weakly stained nuclei. The H-score ranges between 0 and 300, with 0 corresponding to only negative cells, and 300 corresponding to only 3+ cells.

When H-score is selected, it must be setup, which can be done in the setup menu that automatically opens, or by clicking the options button. In this menu, you need to specify which labels correpsond to which cell classification. The type 0 should be set as the label containing negative nuclei. Types 1+, 2+, and 3+ should be set as labels containing positive nuclei based on their intensity.

Object Info

Object Info is an output variable that will save the Label type, Label name, ROI type, ROI name and Envelope for a specified label in a ROI.
Each data point (often a cell) has these five outputs. Label type will be 1 if it is the first label, 2 if the second label and so forth, Label name will be the name of the label, ROI type and name will be denoted in the same way. Envelope is the coordinates for the outlining box around the label, given as the upper left and bottom right corners of the box. The Envelopes are listed in descending order by y-value, and then by x-value for the upper left corner of the box containing the label.

The Source Label will be the label for which object info will be saved. Please note that if All is selected as the Source Label any labels touching eachother will be treated as one object, even if the labels are of different types.

It is necessary to have Object Info as an Output Variable to employ the Explore/QC Results and Phenoplex tools.

To use these tools, ensure that dimensions are the same for Object Info and any other Data Sets saved to the image. To examine the dimensions, ensure that the Output Variables are saved to the image, and then double-click the Data Set in the Database. This will open a Result-file Viewer, where the first line contains the number of datapoints, the number of variables, and the number 1. The number of variables will be 5 for Object Info (Label type, Label name, ROI type, ROI name and Envelope) and 1 for most other Output Variables, but only the number of datapoints need to match. To ensure the same dimensions, if "Object (eg. cells) defined as" is chosen as the Output Level for an Output Variable, it should be chosen for all Output Variables.