Virtual characterisation of porcupine quills using X-ray micro-CT

ABSTRACT
 Morphological properties and structures of the porcupine quills of different sizes can be explored in detail using micro-CT scans. Information including the porosity, volume thickness, number and lengths of stiffeners within quills are extracted via two modalities, using commercially available software and custom-developed scripts. Three segmentation methods, including the Otsu global thresholding, histographic segmentation and deep learning segmentation, are applied to identify the porosity variation based on different segmentation methods. Over segmentation is found when applying Otsu global thresholding, yielded the highest porosity. Histographic segmentation performed better than Otsu thresholding in segmenting CT slices, however speckles are observed in foam areas with lower intensity. Among all methods, deep learning segmentation resulted in the most reliable segmentation, and showed a consistent porosity across different quill sizes. Obtained results provide essential information for biomimicry research with an aim towards designing stronger and lighter structures for various engineering applications. GRAPHICAL ABSTRACT


Introduction
Nature's design is often the focus of biomimetic research, for instance, lightweight and hierarchical structures.In an effort to produce high-efficiency and lowcost structures, researchers look into various plants and animals for inspiration, aiming to extract features feasible for various applications (Tran et al. 2017;Tran, Ngo, and Mendis 2014;Ghazlan et al. 2021;du Plessis et al. 2021;du Plessis et al. 2019).Lightweight architecture is favourable in engineering applications, especially in the automobile, aircraft and construction industries.Studies in the field of biomimicry have offered several potentially lightweight structural design elements that can be found in nature including suture, cellular, tubular, layered and more (Wang, Naleway, and Wang 2020).Despite the complexity of these natural materials, they are often the subject of biomimicry, aiming to produce bio-inspired structures (du Plessis et al. 2019).One key to producing light weight structures is by introducing porosity within the cavity of a structure.In nature, this has been widely demonstrated by introducing cellular structures, open-cells, closed-cells, gradient design and more (Karam and Gibson 1995;Karam and Gibson 1994;Gibson and Ashby 2014).
In order to have a complete understanding of natural architecture, both external and internal structures of biomaterials need to be revealed.Standard sample preparation methods such as cutting or slicing may damage the rare and valuable samples.Under such circumstances, computer tomography technology comes in handy.Micro-computed tomography, commonly known as micro-CT (µCT), is a non-invasive tool that provides 3D images of a structure through X-ray scanning (Vásárhelyi et al. 2020).This technique is widely used in the fields of geology and palaeontology (Hipsley et al. 2020;Jyoti and Haese 2021); biology, from botanical to zoological studies (Wang et al. 2021;Bae and Kim 2020;Keklikoglou et al. 2019), and in many more applications.
Recently there has been a growing trend in using µCT in the biomimicry field (du Plessis and Broeckhoven 2019).In contrast to detachable lightweight spines and quills, the spines of porcupine fish are non-detachable, made up of graded structures.The tip is denser with higher mineral content (Su et al. 2017).The attached spine structures found on bees, lionfish and stingrays are constructed based on varied functional gradients.Sea urchin spines have been thoroughly explored, revealing the hierarchical porous structure (Lauer et al. 2018).Another interesting lightweight structure is the porcupine quill.The study of the porcupine quill has existed for decades, mainly focusing on mechanical performance and morphological analysis (Karam and Gibson 1995;Tee, Leary, and Tran 2021;Tee et al. 2021;Torres et al. 2014;Yang and McKittrick 2013;Yang, Chao, and McKittrick 2013).A quill consists of a thick outer shell, stiffeners and foam, which is a ubiquitous design strategy of a lightweight structure found in nature.According to Gooden and Augee, a long quill is more prone to buckling than a short quill (Gooden and Augee 2014), with long quills primarily serving as a threat display to deter smaller predators.Porcupine quills, come in various lengths and diameters.However, the porosity across different quill lengths has not been studied.
Determining the porosity of biological material can be difficult due to its morphological complexity.While µCT provides an excellent tool for quantifying structural morphology, materials with low contrast, such as keratin, remain challenging to quantify.While setting up a scan µCT, the parameters used, including energy and voxel size, vary depending on the type of materials and density (Irie et al. 2022;Cantatore and Müller 2011;Nair et al. 2020;Jaques et al. 2021).The range of parameters used varies according to the sample being scanned and different instruments.Variation in scanning parameters can make the comparisons difficult.Quantifying porosity may yield different outcomes depending on the segmentation technique used, and it is well known that filtering and segmentation operations in image processing can be highly user-specific and biased (Jackson et al. 2021).
In this work, we present a method for the quantification of porcupine quill features.Firstly, we collected µCT scans of porcupine quills of different lengths to identify the porosity and pore size.Next, we analysed the porosity percentage of the foam-filled structure using three segmentation methods and studied the geometrical variation within the quill's cross-section.Stiffeners are quantified using custom-developed scripts, followed by observing the stiffeners' deformation under the µCT during an in-situ transverse compression test.

Sample preparation
African porcupine quill samples with four different lengths and diameters were investigated (Figure S1).Samples were cleaned with isopropyl alcohol and inspected for defects.The length, diameter and perimeter were manually measured, as shown in Table 1.The perimeter_m is the manual measurement of the broadest perimeter of the quill measured using a thread and ruler.This value is compared with the perimeter calculated using the circle's circumference (peri-meter_f), with an assumption that the quill has a circular cross-section, and Matlab bwperim function (perimeter_m) in Section 3.4.

Micro-CT scanning
Phoenix Nanotom M (Waygate Technologies) was used to collect µCT scans of quill samples operated using xs control and phoenix datos|x acquisition software (Waygate Technologies).A molybdenum source was used, with a 0.1 mm thick aluminium filter and beam energy of 50 kV and 275 µA collecting 1199 projections through a 360°rotation of the sample.Voxel resolutions were optimised to quill width and varied from 4.4 to 4.7 µm (with 2 × 2 detector binning).One end of the quill was fitted onto a thin hollow tube and secured with adhesive tape, exposing the thick middle section for scanning.This process ensured the sample is centred vertically along the detector and not moving during the 360°rotation scanning process.Reconstruction was performed using the Phoenix datos|x software (Waygate Technologies), followed by 3D volume rendering and analysis using Dragonfly software Version 2022.1 (Object Research Systems (ORS) Inc) (Object Research Systems 2022).

Micro-CT in situ compression experiment
A Deben microtest in-situ compression stage with a 500 N load cell was used to conduct transverse compression of the porcupine quill samples (see Figure 9(a) in Section 3.5).Samples were sandwiched between a pair of plastic cuboid spacers with dimensions of 3 mm in height and 6 mm in width and length.The spacers were attached to the compression platens to reduce artefacts created from the denser metal platens in µCT images (Du Plessis et al. 2017).Compression of the porcupine quill was conducted at a constant rate of 1 mm per minute.µCT scans were collected before and after compression (see Section 2.2, with beam energy being increased to 65 kV and 260 µA) and analysis of morphological changes were compared.

Image stacks analytical methods
Porosity analysis, thickness analysis and pore size diameter were investigated.Each data set consisted of a stack of 700.tiff images, which were imported into the Dragonfly software for analysis.Image filtering was applied to all image stacks prior to segmentation in the following sequence: global-domain fusion, histogram balancing, median filter and Noise2Noise regression deep learning denoising model according to the protocol proposed in the literature (Reedy and Reedy 2022).A comparison between the CT slices before and after image filtering is shown in Figure S2.
Three segmentation techniques were conducted to compare the thresholding effectiveness in estimating the porosity of the porcupine quills.The first method was using the Otsu global thresholding.This is the simplest and most widely used image segmentation algorithm (Otsu 1979).The Otsu algorithm separates images into two classes, the foreground and background.The region of interest (ROI) was generated based on the upper and lower Otsu thresholding values.
Next, the built-in histographic segmentation method within the Dragonfly software was employed.This option is suitable for multiple phase segmentation with reference to the Sobel edge detection filtering (Sobel and Feldman 1968).In the present work, segmentation is conducted based on two clustering phases.Bright regions are indicative of the quill sample, while dark regions are indicative of background.The segmentation accuracy of the biomaterial depends on the selection of a threshold for phase differentiation based on the histogram.A watershed algorithm was applied after identifying the foreground and background phases.
The third segmentation method was applied via the deep learning tool of Dragonfly.The U-net convolutional neural network was chosen for semantic segmentation.U-net is a convolutional network architecture for fast and precise segmentation of images which was first introduced in 2015 for biomedical image segmentation (Ronneberger, Fischer, and Brox 2015).The built-in deep learning tool within the ORS Dragonfly software deep learning segmentation with Segmentation Wizard is used to train and predict the quill and air phase.Five images were initially selected from the CT slices for Otsu thresholding, followed by manual editing the results before using them as a training set.U-net with semantic segmentation was selected to train the data based on manually segmented image slices (Makovetsky, Piche, and Marsh 2018;Tung et al. 2022).The model architecture used was U-net with a depth level of 4 layers.The model was trained with 100 epochs with a batch size of 16, stride ratio of 1.0 with an initial learning rate of 1.0 with the Adadelta optimisation algorithm.The deep learning segmentation was performed in Dragonfly software.
All three segmentation methods were compared to understand the robustness and efficiency in porosity evaluation.A volume thickness map is generated to illustrate the thickness variation of the quills.

Porcupine quill stiffeners quantification
To further understand the features of porcupine quill, stiffeners were quantified using Matlab's 3D volumetric image processing command.Matlab scripts were created to convert µCT images to binary images with different levels of thresholding (Kivovics et al. 2020), followed by the extraction of stiffeners that were numerical and colour-coded according to descending length (see Figure 1).

Porosity percentages
The porosity of the middle sub-regions of porcupine quills was calculated by comparing the volume of segmented background (air) within the quill to the segmented sample.Figure 2 shows the porosity percentages of each quill sample according to different thresholding methods.The Otsu global thresholding recorded the highest porosity.The porosity for Q1 and Q2 is approximately 85%, Q3 with 82% and Q4 with 79%.The single value thresholding method is unable to effectively distinguish the foreground (quill sample) and background (air) as shown in Figure 3(i).This issue is commonly reported in the literature (Hipsley et al. 2020;Nair et al. 2020).
Due to the limitation found in the previous method, histographic segmentation is applied (Qin et al. 2011).By applying histographic segmentation, the porosity decreases with increasing quill size, ranging from 71% for Q1 to 55% for Q4.While most of the foreground was identified, some smaller regions were not captured.In addition, some regions did not expand the watershed algorithm, resulting in speckling of the ROI (Figure 3(ii)).
In the third attempt to analyse the porosity of porcupine quill, the deep learning segmentation via the builtin plugin Segmentation Wizard of Dragonfly is conducted (Figure 3(iii)).This method yields porosity within the range of 50% and 60%.Upon observing the region of interest, the U-net deep learning architecture can accurately capture most foam structures.It is worth noting that despite the earlier mentioned methods showing the relationship between porosity and size of the quill, this trend is no longer evident in the porosity analysis using the deep learning segmentation.Image segmentation of porcupine quill Q1, Q2 and Q3 is shown in Figure S3.
Different segmentation methods have significant impact on the resulting porosity.Based on all three segmentation methods, Otsu global thresholding and histographic segmentation showed the influence of quill size on the resulting porosity.The longer and wider the quill, the lower the porosity.Conversely, deep learning segmentation presented a consistent porosity percentage regardless of the size.

Cross-section geometrical variation
A volume thickness map is generated using an algorithm in Dragonfly on a single slice of data to understand the local geometrical variation across the samples.The thickest region appears at the junctions of the shell and stiffeners indicated in the red zones in Figure 4.The thickness gradually decreases as the stiffeners elongate towards the centre in the radial direction.The volume thickness map has the same trend for all quills.The graphs show a peak at approximately 0.03-0.05mm, representing the foam's thickness.The second peak occurs at different thicknesses for different quills (0.08-0.12 mm for Q1 and Q2, 0.17-0.21mm for Q3 and Q4), representing the thickness of the shell.Stiffeners' thickness lies between the first and second peaks, whereas the end of the curves represents the thickness of the shells.Regardless of the quill's size, the foam makes up the majority of the cross-section of a given quill with thin cell walls, followed by the shell and stiffeners.

Custom-developed Matlab script for stiffeners analysis
Grayscale µCT images were converted into binary images before undergoing image processing using custom-developed Matlab scripts.Five modes of locally adaptive thresholding methods as shown in Figure 5. From the original slice (Figure 5(i)), the image is  processed with a coarse threshold using the Matlab global thresholding mode, as shown in Figure 5(ii).A coarse adaptive with the sensitivity value of 0.3 is used to produce Figure 5(iii).The central region of the image remained.Fine adaptive and sensitivity value of 0.05 is used for Figure 5(iv), with an average for Figure 5(v) and mode for Figure 5(vi).The ideal scenario of this method is to extract only the stiffeners for the following quantification procedures.
Among the five methods, images from the fine adaptive mode resulted in the optimum outcome.Stiffeners are retained, with most of the fine features removed.For stiffeners quantification, one slice of the fine adaptive binary image is chosen for each quill.Matlab image processing tool is used to conduct the stiffener quantification.Noise (small spots) is removed in an initial filtering stage (Analyst 2022).The shell region is removed from the largest blob (consisting of both shell and stiffeners) using a subtraction operation, imsubtract Matlab function to obtain stiffeners-only binary image.Upon extracting the stiffeners-only image, the number and length are quantified.For illustration purposes, each stiffener is ranked and colour-coded according to the longest and shortest length.The complete workflow is shown in Figure 1.

Porcupine quill measurement and quantification
The perimeter of the manually measured, circumferential formula and Matlab computed values are compared.The manually measured perimeter has the highest value due to the lack of precision when measuring using a thread and ruler (Table 2).While the perimeter of the quill is not perfectly circular, the circumferential estimate (Perimeter_f, Table 2) appears to correlate well with the measured value (Perimeter_m, Table 1).The Matlab function bwperim is used to compute the object's perimeter in the binary image.It is worth noting that the computed value represents the length in pixels.Upon extracting the perimeter in pixel value, conversion is made to obtain the perimeter in millimetres using ImageJ.The properties obtained through Matlab are tabulated in Table 2 and offer a better correlation to measured values (Perimeter_m, Table 1).
Quill stiffeners are analysed using a Matlab script described in Section 3.3.In Figure 6, it can be observed that the number of stiffeners increases with increasing quill size.Quills Q1, Q2, Q3 and Q4 have 20, 23, 28 and 37 stiffeners, respectively (Figure 6).It is also observed that small quills have stiffeners arranged sparsely from one another, whereas stiffeners are arranged more closely to each other in larger quills.Each stiffener within a quill is unique as it varies in length and shape, but are arranged in alternating lengths from longshort-long-etc (Figure 6).The arrangement of stiffeners suggests that stiffeners complement each other around the shell, preventing total damage when subjected to mechanical loading.Apart from the number of stiffeners, the quill's size can be recognised by observing the spacing between the stiffeners.The large gap between the stiffeners indicates a short quill, and conversely, narrow gaps suggest the sample is a long quill.
Q1 stiffeners' length varies between 0.08 and 1.45 mm, whereas the rest of the quills have stifferners' length ranging 0.05-2.50mm (Figure 7(a)).Figure 7(b) shows the frequency of stiffener length of different quills in five bins with an interval of 0.5 mm each.Q1 has most of the stiffeners within the range of 0.6-1.0mm.For Q2, the majority of the stiffeners have length between 1.0 and 2.0 mm.In contrast, Q3 and Q4 have a high number of stiffeners within the lower range (less than 0.5 mm) and upper range (between 2.1 and 2.5 mm).The quill perimeter increases with number of stiffeners and reaches a plateau from 28   stiffeners (Figure 7(c)).The relationship between perimeter and number of stiffeners may require further experimentations, particularly with further increase in quill size.Generally, the diameter to length ratio ranges from 0.03-0.04.The longer the quill, the diameter is proportionally larger (McKittrick et al. 2012).Similarly, the thickness of the shell increases with increasing quill length, from 0.066 mm for Q1 to 0.174 mm for Q4 (Table 2).

In-situ compression of porcupine quill
The volume rendered images of porcupine quill before and after compression are shown in Figure 8.In Figure 8 (c), the sample is sandwiched with a top and bottom spacer (green section) fabricated using a polymeric 3D printer and secured with an adhesive tape (blue section).This is to avoid artefact caused by the metal platens of the compression stage during the scanning process.
Transverse compression of porcupine quill permanently deformed the sample.The foam appears to be the crack initiation site within samples due to their smaller wall thickness.Cracks extended vertically along the length of the quill, leaving a cavity as illustrated in Figure 8(e).The top and bottom of the shell are permanently deformed, however, no visible crack is found.
Figure 9(b) shows the force vs displacement curve during the transverse compression test.The sample exhibited a linear elastic response until the peak force is reached.The shell sustained most of the force before it fractures, which is observed by the force dipping.Meanwhile, the internal structure is rearranged until the force elevated, indicating the densification of the internal structures.
Figure 9c (i) and d (i) illustrate the µCT image of the sample before and after compression respectively.According to the setup, the load is transmitted from the bottom platen.Upon compression, the top and bottom of the shell curved inwards while the sides are undamaged Figure 9d (i).Due to the porous morphology of the sample, the foam and stiffeners rearranged themselves under the exertion of the external force.While most of the stiffeners remained intact to the shell, some are broken into shorter sections or bent.

Conclusions
In this work, we have demonstrated the analysis of porcupine quill based on two perspectives, bulk porosity and feature quantification.The analysis was conducted based on two approaches.The first part was explored via commercially available software, and the second was carried out using a custom-developed script.The major findings of this study are outlines below.
Porosity within quills was quantified using three segmentation methods as built-in tools available within the Dragonfly software.According to the results, the Otsu thresholding method yielded the highest porosity, followed by the histographic segmentation and deep learning segmentation method.The Otsu method and histographic segmentation indicated the porosity is size dependent, where a small quill has high porosity, and a large quill has low porosity.In contrast, the porosity obtained from the deep learning method falls between 50 and 60%, regardless of size.
Quill thickness was evaluated using volume thickness maps, which showed the imposition of a geometrical gradient strategy on the cross-section of the natural material.The thickest region was located at the junctions of the shell and stiffeners.The thickness of the stiffener reduced radially towards the core and eventually merged with the surrounding foam.This explains the large deformation at the tip of the stiffeners under the transverse compression test but negligible distortion closer to the shell.
Stiffeners are unique to the foam structure in a porcupine quill.Customised Matlab scripts were developed to quantify this feature of the quill precisely.Initiated with the import of grayscale images, stiffeners were extracted, numerically labelled and colour-coded according to descending order of stiffeners' length.
Our finding revealed that the number of stiffeners increases with the quill's perimeter and reaches a plateau from 28 stiffeners.The stiffeners were designed in various sizes and alternate length arrangements.
Q1 and Q2 have a high number of mid-length stiffeners in terms of the individual stiffener's length.In contrast, Q3 and Q4 are dominated by short and long stiffeners and a lower number of mid-length stiffeners.These findings can be attributed to lightweight design strategies with reinforcement.

Figure 1 .
Figure 1.Flow chart of stiffeners quantification via Matlab image processing.

Figure 2 .
Figure 2. Porosity comparison between different segmentation methods.Otsu global thresholding, histographic segmentation and deep learning segmentation.

Figure 4 .
Figure 4. Volume thickness map of porcupine quill samples and the respective frequency graph: (a) Q1, (b) Q2, (c) Q3 and (d) Q4 (Colour legend above x-axis represents the thickness of the porcupine quill in the respective inset).

Figure 8 .
Figure 8. (a,b) Porcupine quill before compression.(c) Compression setup with top and bottom spacer fixed with adhesive tape to secure the sample during testing.(d,e) Porcupine quill after compression.

Figure 9 .
Figure 9. (a) µCT compression stage setup.(b) Force-displacement curve of the transverse compression of porcupine quill.µCT grayscale image, binarised image and stiffeners extraction (c) before and (d) after compression.

Table 1 .
Porcupine quill dimensions via manual measurement.

Table 2 .
Porcupine quill dimensions via Matlab image processing analysis.