METAPAPER DSCImageCalc – Software for Determining Similarity Coefficients for the Analysis of Image Segmentations

DSCImageCalc is free software for calculating similarity coefficients on segmented images. It is written in Visual BASIC .NET and is available at: https://doi.org/10.6084/m9.figshare.894428. It presently calculates Sørensen-Dice Coefficient, Jaccard Coefficient, Proportional Agreement, Cohen’s Kappa, Goodman & Kruskal’s Gamma, and Rogot-Goldberg Agreement. It also calculates segment centroids and the distance between them. Whilst it was originally designed for calculating Dice coefficients on segmentations of ultrasound images, it has potential for re-use in any field where similarity of image segments is to be analysed; predominantly medical radiology and ecology.


Introduction
Image segmentation analysis is the process of analysing shapes and areas in images; specifically their boundaries.It has applications in medical imaging [1,2], machine vision [3], and ecological studies [4] amongst others.
This software is designed to calculate similarity coefficients for different segmentations of the same image, to analyse the performance of segmentation algorithms or human raters.Six different coefficient types can be calculated, as described later, along with segment centroids and the distances between them.
The software was originally produced to calculate similarity coefficients in a study [5] of human rater segmentation of the cross section of the brachial plexus on an ultrasound image (Figure 1).Segments are denoted by the application of colour; the use of different colours allows multiple segments to be defined in each image.
The software provides a GUI for the selection of files, coefficient type, and segment colour, and for the display of results.A 'fuzziness' option allows the software to consider segments where the colours do not match exactly, although this must be used with caution as it can result in unwanted parts of the image being included in the segment analysed.Diagnostic information is given in the form of a segment pixel count and percentage of the image; also the original images are converted to twocolour representations where everything not included in the segment analysed is blanked out.
It is used by selecting files (with the "Select Files" button), and choosing the colour which represents the segment to be analysed by clicking within the image.Then select the similarity coefficient to be used from the drop-down, and click "Calculate".The results are displayed (Figure 2) on the right along with the centroid distance, and can be copied and pasted into a spreadsheet for further analysis.Diagnostic information is displayed on the left side including the number of pixels considered to be part of the segment in each image, and the location of the segment centroid.

Implementation and architecture
The software was implemented in Visual BASIC .NET 10.0.The algorithms for similarity coefficient calculation were taken from Fleiss' "Statistical methods for rates and proportions" [6].The coefficients calculated are: A unit test of the algorithms using the examples given by Fleiss [6] is built into the code and runs on startup -if there is any disagreement with Fleiss' results then this is reported with the name of the test which has failed.This is only intended to prevent any accidental altering of the algorithms during source code editing.
For each image analysed, the number of pixels included within the segment, the percentage of the total image, and the position of the calculated centroid, is displayed to help assure the user that the software has analysed the correct segment.After an analysis run, the images are updated to show which parts the software has analysed as part of the segment which the user can check to ensure analysis has proceeded as expected.
Simple example images are also included so that users can test the software's output for themselves.Functional testing using these images, and a set of segmented ultrasound images, was conducted on Windows 7 (SP1) using .NET v4.0.

Operating system
Windows XP SP3 and above.
Linux/OSX: The Mono migration analyser finds no issues but there is a report that Mono 3.0.6 on Linux (Debian Jessie) was unable to run the software.

Additional system requirements
None beyond requirements of operating system and dependencies.

List of contributors
Author only.It can use as input any image file understood by .NET 4.0, and gives results in a form which can be easily copied to a spreadsheet for further analysis.Reuse potential of the compiled software is therefore high.
Reuse of the source code is likely limited to the implementation of the similarity coefficient calculations (in the 'CalculateMaths' function).

Goldberg Agreement Quality control
[4]o report whether algorithms and human operators agree on an image analysis (such as which parts of the image constitute a bone or other anatomical structure); in ecology they have been used to compare animal and plant habitats[4]by considering each habitat as a segment on a picture map.