  Different combinations of input parameters to filament identification
algorithms, such as Disperse and FilFinder, produce numerous different output
skeletons. The skeletons are a one pixel wide representation of the filamentary
structure in the original input image. However, these output skeletons may not
necessarily be a good representation of that structure. Furthermore, a given
skeleton may not be as good a representation as another. Previously there has
been no mathematical `goodness-of-fit' measure to compare output skeletons to
the input image. Thus far this has been assessed visually, introducing visual
bias. We propose the application of the mean structural similarity index
(MSSIM) as a mathematical goodness-of-fit measure. We describe the use of the
MSSIM to find the output skeletons most mathematically similar to the original
input image (the optimum, or `best', skeletons) for a given algorithm, and
independently of the algorithm. This measure makes possible systematic
parameter studies, aimed at finding the subset of input parameter values
returning optimum skeletons. It can also be applied to the output of
non-skeleton based filament identification algorithms, such as the Hessian
matrix method. The MSSIM removes the need to visually examine thousands of
output skeletons, and eliminates the visual bias, subjectivity, and limited
reproducibility inherent in that process, representing a major improvement on
existing techniques. Importantly, it also allows further automation in the
post-processing of output skeletons, which is crucial in this era of `big
data'.
