ImageJ and 3D Slicer: open source 2/3D 1 morphometric software 2

In a world where an increasing number of resources are hidden behind paywalls and monthly subscriptions, it is becoming crucial for the scientific community to invest energy into freely available, community-maintained systems. Open-source software projects offer a solution, with freely available code which users can utilise and modify, under an open source licence. In addition to software accessibility and methodological repeatability, this also enables and encourages the development of new tools.
 As palaeontology moves towards data driven methodologies, it is becoming more important to acquire and provide high quality data through reproducible systematic procedures. Within the field of morphometrics, it is vital to adopt digital methods that help mitigate human bias from data collection. In addition, mathematically founded approaches can reduce subjective decisions which plague classical data. This can be further developed through automation, which increases the efficiency of data collection and analysis.
 With these concepts in mind, we introduce two open-source shape analysis software, that arose from projects within the medical imaging field. These are ImageJ, an image processing program with batch processing features, and 3D Slicer which focuses on 3D informatics and visualisation. They are easily extensible using common programming languages, with 3D Slicer containing an internal python interactor, and ImageJ allowing the incorporation of several programming languages within its interface alongside its own simplified macro language. Additional features created by other users are readily available, on GitHub or through the software itself.
 In the examples presented, an ImageJ plugin “FossilJ” has been developed which provides semi-automated morphometric bivalve data collection. 3D Slicer is used with the extension SPHARM-PDM, applied to synchrotron scans of coniform conodonts for comparative morphometrics, for which small assistant tools have been created in Python.

freely available code which users can utilise and modify, under an open source licence. In 23 addition to software accessibility and methodological repeatability, this also enables and 24 encourages the development of new tools. All software requires some element of maintenance, 25 and with open-source software this often requires voluntary time investment from the users 26 and/or original developers. However, such work encourages collaboration and learning across 27 disciplines, and enables fields to move beyond their original borders to become more 28 interdisciplinary.

30
As palaeontology moves towards data driven methodologies, it is becoming more important to 31 acquire and provide high quality data through reproducible systematic procedures. Within the 32 field of morphometrics, it is vital to adopt digital methods that help mitigate human bias from 33 data collection. In addition, mathematically founded approaches can reduce subjective decisions 34 which plague classical data. This can be further developed through automation, which increases 35 the efficiency of data collection and analysis, enabling researchers and students with little 36 funding to make greater progress.

38
With these concepts in mind, we introduce two open-source shape analysis software, that arose 39 from projects within the medical imaging field with funding from the National Institute of Health 40 (NIH), which operate under permissive free software licences. These are ImageJ, an image 41 processing software with batch processing features which processes primarily 2D data, but also 42 contains 3D utilities. 3DSlicer which focuses on 3D informatics and visualisation. Both are 43 designed and utilised for digital data collection and have online guides alongside active support 44 forums. They are easily extensible using common programming languages and additional 45 features created by other users are readily available, on GitHub or through the software itself.

47
ImageJ. Applied here is FIJI (Fiji Is Just ImageJ), which describes itself as a "batteries 48 included" distribution of ImageJ, bundling many useful plugins for scientific image analysis.

49
ImageJ is Java based and also allows the incorporation of several programming languages (such 50 as R and Python) within its coding interface. This is alongside its own simplified macro language 51 which can be easily accessed using the macro recorder. The macro utility provides users with 52 easy access to highly repeatable, potentially automated, methods without the coding literacy requirement. A semi-automated plugin, FossilJ has been developed for the digital collection of 54 morphometric data from images, which can be batch processed. In the current pre-release version 55 (v0.2.1, available on GitHub), FossilJ is optimised for bivalve shells (with or without predatory 56 drillholes) in addition to a separate line measurement tool. Some steps are fully automated, and 57 others require user inputs to ensure data quality. Each image is calibrated independently to 58 enable the efficient batch processing of objects with magnitudes of size difference.  The data collected is width (posterior-anterior), length (dorsal-ventral) (Fig. 1A), broken, 67 drillhole counts (Fig. 1D, size and location (edge or internal), valve chirality (left or right valve) 68 (Fig. 1C). Verification experiments show FossilJ to be 2.27 times faster than manual caliper 69 measurement ( Table 1). The data produced by FossilJ is equivalent to classical manual caliper 70 data, with R 2 values around 0.97 for length and width measurements (Fig. 2).   Image stacks were imported and resolution downsampled using the Resample Scalar Volume 90 module to improve processing speeds. The resampled stacks were then segmented using the 91 Segment Editor and the specimen axis was generated using the Curve Maker module. All 92 specimens were cut to 90% of their original length perpendicular to the axis, to remove noise 93 around the basal cavity end of the segmentation eye (Fig. 3). This end cutting was undertaken by 94 generating the plane perpendicular to the axis, using a specifically written script which is placed 95 into the python interactor within 3D Slicer. The python interactor provides a valuable tool in this 96 way for users to create repeatable steps, or to achieve accuracies which are unachievable by eye.