The effects of despeckling filters on pore size measurements in collagen scaffold micro‐CT data

Micro‐CT is often used to assess the characteristics of porous structures such as tissue engineering scaffolds and trabecular bone. Prior to analysis, micro‐CT images can be thresholded and filtered to remove noise. Scaffold pore size affects mechanical properties and biological cell behaviour and is a frequently assessed parameter. This paper identifies and characterizes an artefact affecting a commonly used filter which erroneously increases mean pore size. The 3D sweep despeckling filter removes all but the largest object within a volume of interest, and therefore deletes any disconnected objects located at the periphery, increasing measured mean pore size. This artefact is characterized, and effective methods to mitigate its effects are devised, involving despeckling a sufficiently large volume of interest, then reducing the volume of interest in size to remove the error prior to analysis. Techniques to effectively apply this method to other data sets are described. This method eliminates the artefact but is time‐consuming and computationally expensive. Alternative, more economical filters which remove objects below a specified size are also assessed but are shown to be affected by the same artefact. These results will help to guide the implementation of future studies investigating the effects of pore size.


INTRODUCTION
Following micro-CT data reconstruction, images can be thresholded to binarize them, filtered and analysed. Filters can act to remove noise and artefacts, improve contrast and detect edges. A variety of artefacts can affect micro-CT data, including noise, ring artefacts and beam hardening effects. 1 Filters can be categorized into two types. Linear filters apply a linear mathematical function to all kernels in an image. In non-linear filters there is no linear relationship between the input and output -the filter is not applied evenly across the entire image, rather, it attempts to act on the intended pixels only. Linear filters, such as Gaussian and mean filters, perform well with large quantities of low-intensity noise. However, they preserve edges poorly, and can distort image morphology. Non-linear filters perform better with low quantities of high-intensity noise and preserve edges well. 2 A range of non-linear filters are commonly used to improve the image quality of micro-CT data, including median filters, anisotropic diffusion, sieve and sweep filters and morphological operations. These can be applied either before or after thresholding, with sieve filters, sweep filters and morphological operations in particular performing well on binary data. F I G U R E 1 Showing a 3D rendered reconstruction of a micro-CT scan of a 1 × 1 × 1 mm section of a collagen scaffold Ice templating can produce porous, highly interconnected, tailorable scaffolds, from proteins, polymers and ceramics. [3][4][5] Collagen scaffolds produced by ice templating exhibit biocompatibility, stimulate cell proliferation, migration and differentiation in vitro, 6 and tissue integration in vivo, 7 and can be designed to suit a particular application. 8 Collagen is biodegradable, with no toxic breakdown products, and is minimally immunogenic. 9 Pore size is defined as being the diameter of each pore in a scaffold. 10,11 Pore size affects cellular adhesion and activity. [12][13][14] It can be increased by prolonging the time spent at equilibrium temperature during the freezing process, 15 and by reducing collagen solution concentration. 16 A range of mean pore sizes from 80 to 325 μm can readily be produced in collagen scaffolds. 12,13,15,17 Larger pore sizes result in scaffolds with a lower surface area, reducing cell adhesion, 13,18 whereas smaller pore sizes can limit nutrient and waste product diffusion and cell migration, resulting in a necrotic core to a scaffold. 13,19 Micro-CT is commonly used to assess collagen scaffold pore size. An example of a 3D rendered, reconstructed micro-CT scan of a collagen scaffold is shown in Figure 1, which demonstrates how the collagen forms sheets that join to produce interconnected pores.
Collagen scaffold and bone micro-CT data are often thresholded then filtered. An example of a workflow for processing collagen scaffold micro-CT data is shown in Figure 2.
As demonstrated in Figure 3, micro-CT images of collagen scaffolds often contain noise. This noise can arise from insufficient radiation reaching the detector, from beam hardening effects -especially if collagen is in combination with more radiodense materials, and from ring artefacts. For simplicity, in this paper, collagen scaffolds have been imaged alone without another material present. Image noise can be reduced through micro-CT acquisition settings, and by performing grey level filters such as a nonlocal means filter prior to thresholding, 20 however this paper focusses on the filters applied after thresholding, as these are commonly used when processing collagen scaffold data.
The collagen sheets in scaffolds are often in the region of 1-5 μm thick, thus are generally one or two voxels thick. Once thresholded, the noise demonstrated in Figure 3 has an average volume of 5 voxels, with standard deviation of 14.4 voxels. It is always the same colour as the solid domain, in this case white. Morphological filters such as opening filters therefore remove desired architecture, as demonstrated in Figure 4. The result of median and Gaussian filters depends on radius of the applied filter -1 voxel radius results in retention of speckles, 2 voxels radius causes distortion of the desired architecture. Commonly used postthresholding operations therefore include a sweep filter to remove all but the largest object, [21][22][23][24][25][26] and a sieve filter to remove objects below a prescribed size. [27][28][29][30][31] These filters can be applied in 2D or 3D, and are included in CTAn (Bruker-microCT, Kontich, Belgium) software. An advantage of these filters over other non-linear filters is their ability to remove large, intense noise, while preserving fine trabecular type detail, as the morphological properties of these samples are often of interest. A disadvantage is that image artefacts connected to the main solid domain will be preserved, producing an apparently bumpy solid domain surface, affecting subsequent analysis. Furthermore, the sweep filter relies upon the premise that collagen scaffold data consist of a single connected solid component. This seems a logical assumption -if more than one solid component were present, the scaffold would fall apart, although it is possible that disconnected domains exist, bounded by the main scaffold component. The outcome of any filter applied after segmentation is subject to the thresholding method used. For example, if thresholding were to erroneously remove desired material, this could result in a collagen scaffold being divided into more than one solid domain. Measured pore characteristics are affected by the image processing used. 17,32,33 Image processing artefacats may occur uniformly throughout the sample, or they can be localized to the periphery. 34 This paper investigates an artefact caused by 3D sweep despeckling, which causes an erroneous increase in peripheral pore size measurements.
Rather than analyse the entire scanned sample, a smaller volume of interest is often analysed to reduce required computing power and avoid physical artefacts such as bubbles. This is a section of the sample which is F I G U R E 2 An example of a workflow for processing collagen scaffold micro-CT data. All images are 1 × 1 mm. The raw data in image (A) are reconstructed to produce a stack of grey level images representing a 3D structure, such as image (B), where cross sections of white collagen sheets can be seen forming pores in black void. Image (B) is then thresholded to produce the binary image (C). Image (C) is then filtered to produce image (D), which is used for analysis F I G U R E 3 An unthresholded, undespeckled 1 × 1 mm section of a micro-CT image of a collagen scaffold, demonstrating the noise which can be present in this type of data. Image (A) shows collagen in white, with the noise manually removed. Black represents void. Image (B) shows the isolated noise, seen as light grey specks manually selected before thresholding, filtering and analysis. Pore size can then be measured in 2D by calculating the hydraulic diameter or by using an equation based on collagen surface area and volume. [35][36][37] It can be measured in 3D using a sphere fitting algorithm, or by measuring pore volume. 10,11,36 To perform 2D measurements, scaffold structure must be modelled as a series of either parallel plates, spheres or rods. 36,37 These measurement methods and assumptions chosen can provide significantly different results. 10,11,35 The aim of this study is to evaluate the effects of commonly used filters and analysis techniques on measured pore size. An artefact arising from the use of 3D sweep filtering is identified, characterized and recommendations are made on how to improve pore size mea-surements when choosing filters and analysis techniques. Several definitions employed to improve the clarity of this report are defined in Table 1.

METHODS (GENERAL)
Scaffolds for analysis were prepared as follows: 1 wt.% collagen slurry was prepared from 1 g of type 1 bovine dermal collagen flakes (Devro plc, Chryston, UK) and 100 ml 0.05 M acetic acid. Three cylindrical collagen scaffolds of diameter 15 mm and height between 7 and 11 mm were produced by ice templating, using a freezing protocol designed to produce isotropic scaffolds with pore size in the region of 100-150 μm, shown in Figure 5. These scaffolds were analysed by micro-CT (Skyscan 1272, Bruker-microCT), with the settings: source voltage 25 kV, source current 135 μA, exposure 3350 ms, rotation step 0.2 • , frame averaging over two frames, 4 μm pixel size, no filter used. The micro-CT data were reconstructed with NRecon (Bruker-microCT), and imported into CTAn for processing and analysis. A VOI containing representative pores without bubbles, measuring 6 3 mm was taken from each sample as shown in Figure 6A, and thresholded by two-dimensional Otsu method in a 3D space with a radius of 1 pixel. All further filtering and analysis were of VOIs taken from within these three larger cubes. All further thresholding was performed using the two-dimensional Otsu method. Pore size was measured in 3D using a sphere fitting algorithm, whereby pore size was defined as the largest diameter of a sphere which could be bounded by a pore, and in 2D using a parallel plate model and the relationship between surface area to volume ratio. All confidence bands are 95% intervals calculated using two-tailed values. Pore size error was calculated as the difference between measured pore size for a control VOI and the primary VOI being assessed. Pore size error in this paper is specific to the filter being investigated -no ground truth is available for pore size in these scaffolds. The aim of this F I G U R E 4 Demonstrating the effects of morphological filters on thresholded collagen scaffold micro-CT data. All images represent a 1 × 1 mm cross section of a scaffold. Image (A) shows a raw, unthresholded image. Image (B) shows the same image following two-dimensional Otsu thresholding in a 3D space. Image (C) shows the thresholded image processed by conventional 3D sweep, without a control VOI. Image (D) shows the image processed by an opening morphological filter, with radius of 1 voxel, in a 3D space, and demonstrates the loss of collagen from the image when this filter is applied, due to the low thickness of collagen sheets

VOI -volume of interest
Base VOII which is not despeckled Primary VOI -a base VOI which is despeckled then analysed without being reduced in size Secondary VOI -a VOI which is cut from the centre of a despeckled base VOI then analysed Control VOI -a secondary VOI which is taken from a sufficiently large base VOI to eliminate the error being investigated 2D/3D sweep -a despeckling filter which removes all but the largest object in a 2D/3D space 2D/3D sieve -a despeckling filter which removes all objects below a prescribed area/volume in a 2D/3D space 2D/3D sieve -the area/volume threshold below which a sieve filter is applied 3 mmVOI -a VOI measuring × × mm paper is to investigate and optimize the use of the commonly used sweep and sieve filters, rather than to achieve data with no absolutely no error. Five experiments were performed. The first experiment was designed to demonstrate the existence of the error. The F I G U R E 5 The freezing protocol used to produce the scaffolds second aimed to ascertain the size difference between a base and secondary VOI required to eliminate the error, permitting production of a control VOI. The objective of the next experiment was to characterize the distribution of error throughout a VOI by comparing the results of control VOIs to VOIs exhibiting the error. The next experiment aimed to confirm the cause of the artefact, and further quantify the depth of penetration of error. The final experiment aimed to assess the efficacy of alternative filtering techniques. These experiments are sequentially documented in full, as the aims and hypothesis of each experiment are reliant upon the results of the preceding experiment.

Methods
The aim of this experiment was to demonstrate the existence of error. It was hypothesized that using 3D sweep despeckling would result in erroneously high pore sizes at the periphery of VOIs. A single 6 × 1 × 1 mm base VOI, with mean pore size 117 μm was taken from one of the The production of VOIs for 'Demonstration of Error' experiment. The upper workflow is a schematic diagram of the process. The lower workflow shows 3D rendered reconstructions of micro-CT VOIs undergoing the same process. In Image (A), a 6 3 mm VOI was taken from the scaffold and thresholded. In Image (B), a single 6 × 1 × 1 mm base VOI was taken from this (C (i)), then in Image (D) C (i) was despeckled to produce (E (i)) which was assessed by 2D pore size analysis. In Image (C), shorter base VOIs (C (ii)) were taken from the centre of C (i). They were despeckled in Image (D) (D (ii)), and 2D pore size analysis was performed in Image (E) (E (ii)) three 6 3 mm samples, as illustrated in Figure 6C(i). It was despeckled using the 3D sweep setting, as shown in Figures 6D(i) and E (i). Two-dimensional pore size analysis was performed along the longitudinal axis, thus providing a result for each 1 mm square image in a stack 6 mm deep. This process was repeated on shorter base VOIs taken from the centre of (i), as represented by Figures 6C (ii), D (ii) and E (ii). These (ii) VOIs had long edge length between 1 and 5 mm. The mean pore size results of the (i) VOI were subtracted from the results of the (ii) VOIs to highlight the differences between them. If no error were present, there would be no difference in mean pore size between these VOIs. If peripheral error were present, there would be a mean pore size difference in the peripheral slices.

Results
Following 3D sweep despeckling, measured pore size at the edge of the analysed VOI was erroneously high. The results of the longer (i) VOI were subtracted from the results of the shorter (ii) VOIs to highlight the differences between them, as shown in Figure 7. Each data point represents the mean pore size difference for the corresponding 1 × 1 mm cross-sectional image. The mean pore size of the 6 × 1 × 1 mm VOI was 117 μm. If a particular slice was analysed at F I G U R E 7 Results of 2D mean pore size analysis across a cuboidal primary VOI. The difference between the results of the 6 × 1 × 1 mm VOI, and the results of shorter VOIs are plotted to highlight the differences between them. Each data point represents the pore size difference for a single micro-CT image slice the periphery of a sample, it resulted in a larger pore size being measured than if that same slice were assessed in the centre of a sample.

F I G U R E 8
The production of secondary VOIs for 'Production of Control VOIs' experiment. In Image (A), a 3 3 mm VOI was taken from a thresholded 6 3 mm VOI. In Image (B), a 1 3 mm base VOI (B (ii)) was taken from the centre of B (i). In Image (C), this VOI (C (ii)) was despeckled. In Image (E), it was analysed. Then, in Image (B), a 1.05 3 -3 3 mm VOI was taken from B (i), producing C (iii). In Image (C), this (iii) VOI was despeckled producing D (iii). In Image (D), this VOI was reduced to 1 3 mm to produce a secondary VOI (D (iv)). In Image (E), this VOI was analysed. The results of E (ii) and E (iv) were compared

Discussion
The central image slices of all VOIs were identical. For example, the central 1 × 1 mm image slice of the 6 × 1 × 1 exhibited exactly the same pore size as the central ×1 mm image slice of the 5 × 1 × 1 mm. However, if a particular image slice was located at the end surface of a VOI, it exhibited a higher pore size than if the same image slice was located at the centre of a VOI. For example, an image slice 1 mm deep into the 6 × 1 × 1 mm VOI possessed a lower pore size than the same slice, when located at the end of the 4 × 1 × 1 mm VOI. This is illustrated in Figure 7. This experiment demonstrated that using a 3D sweep filter resulted in an artefact affecting pore size measurements at the periphery of VOIs. It did not confirm whether this error was present on all surfaces, or just the two end surfaces which were being analysed. This error always increased mean pore size -there were no incidences of it decreasing measured pore size.

Methods
The aim of this experiment was to ascertain at what point a further increase in size difference between a base and secondary VOI resulted in no further change in pore size error. It was hypothesized that if a sufficiently large base VOI were taken, no error would be present in the resulting secondary VOI. Scaffolds with mean pore size of 125-137 μm were used. Each original thresholded 6 3 mm VOI was divided into base VOIs measuring 3 3 mm, as shown in Figures 8A and B (i). A 1 3 mm VOI (C (ii)) was taken from the centre of each 3 3 mm VOI, and was 3D sweep despeckled, producing a primary VOI (E (ii)) which exhibited the artefact. Then, a range of sizes of VOI measuring between 1.05 3 mm and 3 3 mm (C (iii)) was taken from each of the B (i) base VOIs. These C (iii) VOIs were 3D sweep despeckled, then reduced to 1 3 mm producing secondary VOIs (E (iv)). Two-and three-dimensional analysis were performed on both E (ii) and E (iv), and the results compared. Three samples were used for each analysis. Unlike in Figure 6, in Figure 8 the 1 3 mm base VOIs were taken from the centre of the 3 3 mm base VOIs, therefore the error was expected to affect all surfaces, rather than just the two end surfaces.

Results
As the artefact demonstrated in experiment 'Demonstration of Error' affected the periphery of the sample, it was hypothesized that if a sufficiently large base VOI could be despeckled, and a smaller secondary VOI of interest were taken from the centre of the base VOI, this secondary VOI may not exhibit the pore size error being investigated and a control VOI could be produced. The aim of this experiment was to ascertain the size difference required between the large and small VOIs to eliminate the error. Figure 9 shows the effects of increasing base VOI size on magnitude of pore size error using 3D sweep and 2D and 3D analysis, on 1 3 mm secondary VOIs. The results were as follows: 1. A greater magnitude of mean error was found using 2D pore size analysis compared with 3D pore size analysis, in 1 3 mm (0.00884) primary and secondary VOIs with a paired one-sided test. 2. The same difference between base and secondary VOI size was required using 2D and 3D pore size analysis, in 1 3 mm VOIs using a paired two-sided test. 3. In 1 3 mm VOIs, enlarging the base VOI to more than 1.2 3 mm resulted in no further change in pore size in any sample.
F I G U R E 9 Reduction in error from despeckling a larger base VOI then reducing VOI size for analysis

Discussion
It was hypothesized that the artefact was likely to be arising from sweep despeckling resulting in retention of the largest object, and removing all others, meaning that at the periphery of the VOI, any part of the main object which exits the VOI then reenters without contacting the main object again was removed, thus deleting a part of the main object rather than noise, as illustrated in Figure 10. This would be less likely to happen in the centre of the VOI, where no part of the main object was likely to exit the VOI and return. This theory would explain the increased error at the periphery of samples. This experiment confirmed that in the 1 3 mm VOIs, enlarging the base VOI to more than 1.2 3 mm resulted in no further change in measured mean pore size. This permitted production of a control VOI which exhibited none of the error being studied. This method was applied to homogenous samples in this case, but the same principle would apply to heterogenous samples, and those composed of different materials. While control VOIs do not exhibit the error being investigated, they are still not a perfect representation of the original scaffold, for two main reasons. First, the sweep filter works on the premise that the collagen scaffold is fully interconnected, thus removing all but the largest object retains only desired data and removes the rest. It is possible that thin walls of collagen were partially removed during thresholding, or were absent in the original sample, leaving "floating" collagen fragments, which the sweep filter removed. Ideally, these fragments would have contributed to pore size measurements, and removing them results in a larger measured pore size. Secondly, the filter removes all noise disconnected from the main object, but any speckles connected to the main object are retained, thus artificially reducing the pore size. Nonetheless, the control VOIs did isolate the error being investigated. Other errors were either eliminated or constant, for example thresholding was performed on the original larger VOI before being reduced in size, thus thresholding was identical for both sample types. Furthermore, pore analysis can be prone to an edge artefact, whereby pore characteristics at the VOI surface are miscalculated, due to them being either open to infinity or closed off by a box around the VOI. 38 While this error may have been present, it was consistent between analysed samples, and it would not cause a pore size difference. Two main conclusions can be drawn from the results of this experiment: 1. Using a base VOI of appropriate size can eliminate the error being investigated. 2. 3D analysis results in a smaller magnitude, but similar depth of penetration of error compared with 2D analysis.
F I G U R E 1 0 Schematic diagram, illustrating the proposed underlying mechanism of the investigated error. Black represents collagen scaffold, white is void. Black dots represent noise. Part (A) shows the effect of despeckling on a primary VOI, with the resultant loss of data at the periphery of the image. Part (B) shows how this can be avoided by producing a secondary VOI F I G U R E 1 1 The production of VOIs for 'Distribution of Error' and 'Comparison of Despeckling Methods' experiments. In Image (A), a 3 3 mm base VOI was taken from a despeckled 6 3 mm VOI. In Image (C), these base VOIs were despeckled to produce D (i). In 'D', a smaller secondary 1 3 mm VOI (D (iii)) was taken from the centre of D (i) to produce a control VOI. In Image (E), this (iii) control VOI was analysed.
In Image (B), a smaller secondary 1 3 mm VOI was taken from the centre of B (i) to produce a primary VOI. In Image (C), this (ii) VOI was despeckled. The results of analysing these primary (ii) VOIs were compared with the results of the control (iii) VOIs

Methods
The aim of this experiment was to compare the results of 2D pore size analysis on primary and control VOIs, to ascertain the distribution of error throughout a VOI. It was hypothesized that all VOI surfaces would contribute to the error. Scaffolds of mean pore size 118-128 μm were used. Eight discrete 3 3 mm base VOIs were taken from a single thresholded 6 3 mm base VOI ( Figures 11A, B (i) and C (i)). A 1 3 mm base VOI was taken from the centre of each 3 3 mm base VOI (Figures 11B (ii) and C (ii)). C (i) was then 3D sweep despeckled, and a secondary 1 3 mm VOI taken from the centre -D (iii). 3D sweep was applied to the C (ii) base VOIs. 2D pore size analysis was then performed on the primary (ii) and secondary (iii) samples ( Figure 11E).

Results
The 'Production of Control VOIs' experiment ascertained that taking a base VOI >0.2 mm larger than the secondary VOI eliminated the error being investigated, when using a 1 3 mm secondary VOI. Therefore, the results of control 1 3 mm control VOIs derived from 3 3 mm base VOIs were compared with the results of 1 3 mm primary VOIs using 3D sweep despeckling and 2D pore size analysis. The scaffolds used had overall mean pore size between 118-128 μm. Figure 12 shows the mean pore size error when measured in 2D across a 1-mm scaffold. The mean error at the top and bottom image was 18 ±5.9 μm and 15 ± 7.3 μm. An error of 0.80 ± 0.3 μm persisted in the central image slices.

F I G U R E 1 2
Mean pore size error from 2D analysis of 3D sweep despeckling across a 1 3 mm VOI. The error from all six surfaces of the VOI affected mean pore size error in this graph, hence the persistence of error in the central image slices, compared with Figure 7 where only error from the top and bottom surfaces contributed to the mean pore size error, resulting in no error detection in the central image slices

Discussion
The mean error at the top and bottom images in Figure 12 was 18.0±5.9 μm and 15.3 ± 7.3 μm. The scaffolds used had an overall mean pore size of 123 μm, therefore this represented a mean 15% error at the top image. It was hypothesized that the artefact affected all VOI surfaces, so while the effects were most prominent when only measuring pores near the surface, such as at image slices 0 and 1 mm across the VOI, the other four surfaces of the cubic VOI contributed to the error in the image slices taken from the centre of the VOI, for example at an image slice 0.5 mm across the VOI.

Methods
The aim of this experiment was to further characterize the depth of penetration of error, and to confirm the cause and distribution of the artefact. It was hypothesized that the collagen pieces contributing to the error would vary in size. Longer pieces of collagen would be more likely to cause greater depth of error penetration, and would occur less frequently. Larger VOIs with a higher surface area would be more likely to possess a range of collagen piece sizes representative of the population, and therefore would be more likely to exhibit a higher depth of penetration. Smaller VOIs with a lower surface area would be less likely to possess the large, infrequent collagen pieces, and would therefore exhibit a higher standard deviation of depth of penetration, and on average, a lower depth of error penetration. Base VOIs measuring between 0.2 3 and 5 3 mm were taken from the centre of three thresholded 6 3 mm base VOIs in a similar fashion to 'Production of Control VOIs' experiment (Figure 8), resulting in three base VOIs of each size, which were despeckled to produce primary VOIs. Counterpart control VOIs were produced by despeckling the 6 3 mm VOIs before taking VOIs measuring between 0.2 3 and 5 3 mm from the centre of these despeckled VOIs. The difference between each primary and counterpart control VOI was produced by subtracting the primary VOI image stack -possessing disconnected pieces of collagen -from the control VOI image stack -without disconnected collagen pieces -using ImageJ. 39,40 The only pieces of collagen remaining were therefore those which contributed to the artefact. These collagen pieces were visualized using CTvox (Bruker-microCT). The exact depth of penetration was then calculated. The outermost layer of pixels was removed from each cubic VOI in ImageJ, and the VOI was assessed for the presence of collagen. This process was repeated, with sequential layers of pixels removed until the VOI contained no collagen. The edge length difference between the original VOI and the reduced VOI represented twice the maximal depth of penetration. Depth of penetration was then compared over the range of VOI sizes (0.2-5 3 mm). Major diameter is a measure of the longest axis of an object. The major diameter of each piece of collagen in the 5 3 mm VOIs was calculated in CTAn, and a histogram produced. Distribution fit testing was performed on the histograms using OriginPro 2020 (OriginLab Corporation, F I G U R E 1 3 A histogram of the frequency of major diameter of collagen pieces in the three 5 3 mm VOIs. Small pieces of collagen occur frequently, but large pieces of collagen occur infrequently Northampton, MA, USA). The mean pore size of the 5 3 mm VOIs was calculated using 3D analysis in CTAn. Furthermore, it was hypothesized that using a VOI with a closed surface boundary for 3D sweep despeckling, then removing this boundary for analysis, may remove the error. The method implemented in ImageJ and CTvox to visualize erroneous collagen pieces, was repeated on a VOI processed with a closed boundary condition. The control VOI was subtracted from the VOI which previously had a boundary, to highlight the differences.

Results
The three 5 3 mm VOIs had a mean pore size of 135.5-141.7 μm. A histogram of erroneous collagen piece major diameter from these VOIs is shown in Figure 13. Distribution fit testing found that no model fitted the histogram at a significant level. The relationship between VOI size and depth of error penetration, and depth of error penetration standard deviation is displayed in Figure 14. An outlier data point (VOI edge length 3.6 mm, depth of penetration 408 μm, Sample 2) was excluded from this graph, as the collagen piece responsible for this data point was present within a large abnormal air bubble, rather than the standard isotropic porous structure.

Discussion
It was shown to be possible to isolate the erroneous pieces of collagen responsible for the artefact being investigated, supporting the hypothesis for the cause of the F I G U R E 1 4 The relationship between VOI size and depth of error penetration. A moving average over 1 mm VOI edge length of the depth of error penetration and standard deviation is shown. Larger VOIs exhibited a greater depth of error penetration and a reduced depth of error penetration standard deviation artefact as illustrated in Figure 10. Figure 15A shows a VOI with these pieces highlighted in red, with the unaffected scaffold in grey. Figure 15B shows the same VOI cut in half, to demonstrate the absence of error in the VOI centre. Larger VOIs were found to exhibit a greater depth of error penetration. Depth of error penetration plateaued in larger VOIs, and standard deviation of depth of error penetration decreased, as shown in Figure 14. A histogram of collagen piece major diameter demonstrated that large pieces of collagen occurred less frequently than smaller pieces. VOIs with a larger surface area possess-ing a greater number of collagen pieces would therefore be predicted to exhibit a distribution of collagen piece major diameter more representative of the population, perhaps explaining the greater depth of error penetration and reduced standard deviation in larger VOIs. Smaller VOIs have a lower probability of possessing large, disconnected pieces of collagen, and therefore exhibit a more stochastic depth of error penetration. When ascertaining the required VOI size difference to produce control VOIs, it is therefore advisable to use as large a VOI as possible.
VOIs with a solid surface boundary were despeckled, and the boundary subsequently removed for analysis. This resulted in retention of speckles in contact with the surface boundary, as shown in Figure 16. These speckles would be expected to erroneously reduce peripheral pore size.
Several factors might be predicted to influence collagen piece major diameter and frequency, and therefore depth of penetration and mean pore size error. These factors are likely to include collagen scaffold production protocol, micro-CT analysis settings and image processing techniques. The main aim of this experiment was to further characterize the depth of penetration of the artefact to enable consistent production of control VOIs. While the principles of producing control VOIs have been demonstrated, the confounding factors listed above prevent accurate prediction of the required base VOI size for other data sets and scaffold materials. Instead, it may be most efficient to manually calculate the depth of penetration for individual data sets, either using the methods of this experiment, or those of the 'Depth of Penetration of Error' experiment.
F I G U R E 1 5 Image (A) shows a 3D rendered 1 3 mm VOI produced using CTvox. Image (B) shows the same VOI bisected, to demonstrate the absence of artefacts in the VOI centre. Grey represents collagen present in both control and primary VOIs. Red represents collagen pieces which are removed by the artefact being investigated F I G U R E 1 6 A 3D rendered 1 3 mm VOI produced using CTvox. Grey represents collagen present in both control and primary VOIs. Red represents collagen pieces which are retained by using a closed boundary condition

Methods
The aim of this experiment was to compare the effects of 2D sieve, 3D sieve and 3D sweep despeckling and 2D and 3D pore size analysis, on mean pore size error. Production of a control VOI is computationally expensive and time-consuming. It was hypothesized that sieve despeckling may be able to achieve similar results for less expense. 3D pore size analysis was predicted to result in a less error than 2D pore size analysis. Eight discrete 3 3 mm base VOIs were taken from a single thresholded 6 3 mm base VOI ( Figures 11A, B (i) and C (i)). A 1 3 mm base VOI was taken from the centre of each 3 3 mm base VOI ( Figures 11B (ii) and C (ii)). Three different despeckling methods were tested on the primary C (ii) VOIs -2D and 3D sieve, using a range of sieve areas/volumes, and 3D sweep. C (i) was then 3D sweep despeckled, and a secondary 1 3 mm VOI taken from the centre, D (iii), which was to act as a control VOI. Two-and three-dimensional pore size analysis were then performed on the primary E (ii) and secondary E (iii) samples ( Figure 11E). The process was then repeated with 2 3 mm (ii) and (iii) VOIs (not shown in Figure 11 for clarity), but only 3D sweep despeck-TA B L E 2 Optimal sieve area/volume for 2D and 3D pore size analysis for this data set

2D analysis 3D analysis
Optimal 2D sieve area 77 μm 2 219 μm 2 Optimal 3D sieve volume 12,400 m 3 63,100 μm 3 ling was performed. Two-and three-dimensional pore size analysis were performed on both the 2 3 mm and 1 3 mm VOIs, and the results compared. Eight samples were used for each analysis. Furthermore, it was hypothesized that the sieve filter would also result in excessive removal of peripheral collagen. Erroneous collagen pieces, produced by applying the 3D sieve filter to a VOI were highlighted by repeating the process described in 'Depth of Penetration of Error' used to produce Figure 15. A 6 3 mm VOI was segmented and sieved at a sieve threshold of 12,400 μm 3 . The VOI was then reduced to a central 1 3 mm VOI to produce a control type VOI. The central 1 3 mm of the unsieved VOI was then sieved alone at a sieve threshold of 12,400 μm 3 . The VOIs were subtracted from each other in ImageJ, and the results imported into CTvox for 3D rendering. This was repeated on the other 6 3 mm VOIs, and 3D pore size analysis was performed on the resulting 1 3 mm VOIs. The results of pore size analysis in the control type VOIs and those predicted to exhibit the error, were compared with a unilateral paired t-test to assess whether the control VOIs exhibited a lower pore size than the primary VOIs.

Results
Two-and three-dimensional sieve and sweep filters with a range of sieve areas/volumes were applied to the same control VOIs as the 'Distribution of Error' experiment. Two-and three-dimensional pore size analysis were used. The aim was to assess the effect of different despeckling methods on measured pore size. Table 2 shows the sieve area/volume required for the sieve filter to obtain the same mean pore size as the control VOIs. Below this sieve area/volume, the mean pore size was underestimated, and above this value the mean pore size was overestimated. The corresponding data are shown in Figure 17. Two-and three-dimensional analysis were compared on 3D sweep despeckled samples. Three-dimensional analysis resulted in less mean pore size error than 2D analysis ( = 0.0001) on a paired one-sided test as illustrated in Figure 18. Mean pore size error was also compared between 3D sweep despeckled 1 3 and 2 3 mm primary VOIs using 2D and 3D analysis. 1 3 mm VOIs experienced more error than 2 3 mm VOIs on a two-sample one-sided F I G U R E 1 7 (A) Mean pore size error from 2D sieve despeckling and 2D/3D analysis and (B) Mean pore size error from 3D sieve despeckling and 2D/3D analysis. Note the logarithmic axis in (B) F I G U R E 1 8 Demonstrating the error expected if each despeckling method were performed optimally on a 1 3 mm primary VOI test using both 2D ( = 0.00064) and 3D ( = 0.00187) analysis. Figure 19 shows the 3D rendering of a sieve despeckled VOI, with the error arising from despeckling a primary VOI highlighted in red. The sieve despeckled control type VOIs, which were despeckled as 6 3 mm VOIs then reduced to 1 3 mm VOIs, were found to have a significantly lower pore size than the VOIs which were despeckled as 1 3 mm VOIs ( = 0.0446). F I G U R E 1 9 A 3D rendered 1 3 mm VOI produced using CTvox. Grey represents collagen present in both control and primary VOIs. Red represents collagen pieces which are removed if a 1 3 mm VOI is sieve despeckled, compared with when a 6 3 mm VOI is despeckled then reduced to 1 3 mm

Discussion
Producing control VOIs from base and secondary VOIs is time-consuming and computationally demanding. Other filters were assessed as alternative methods of obtaining similar results to the control VOI. The results of these analysis are summarized in Figure 18. With regards to reducing the error being investigated, there are two main advantages of 3D over 2D sieve despeckling. First, it results in narrower confidence intervals, thus the resulting mean pore size is likely to be closer to the control mean pore size. Secondly, it is rarely possible to specify the exact desired area or volume below which to remove speckles, as speckles are removed by a defined value of pixel or voxel, which may be as low as 4 or 5 pixels, thus a single pixel could represent 25% of the desired mean, and the chosen despeckling threshold could be as much as 12.5% different to the desired value. This accuracy is dependent on pixel/voxel size -smaller sizes permit greater accuracy. With 3D analysis and 3D sieve filtering, it is more likely to be possible to achieve a despeckling threshold close to the desired value, as a larger volume is being removed, therefore a single voxel constitutes a smaller percentage of the overall volume to be removed than for 2D analysis and 2D despeckling. Figure 17 also demonstrates a disadvantage of sieve despeckling -the results of analysis are heavily dependent on the chosen sieve threshold. 1 3 mm VOIs experienced significantly greater overall mean error than 2 3 mm VOIs. This was hypothesized to be due to a lower proportion of the scaffold being affected, as a result of the 2 3 mm VOIs possessing a smaller surface area to volume ratio. While optimal sieve thresholds were ascertained for this data set, these values would need to be calculated for other data sets using different scaffold types, micro-CT settings and processing parameters.
Sieve despeckling demonstrated the same error as sweep despeckling, as shown in Figure 19. This suggests that all the methods and results characterized for sweep despeckling in this paper are likely to apply to sieve despeckling as well. Both filters are affected by a surface artefact, for the same reason -small pieces of disconnected collagen are produced at the periphery of a VOI, by cropping the VOI. These pieces are removed by the filter, which then results in erroneously large pore size measurements at the VOI boundary.

FINAL DISCUSSION
This artefact would be expected to affect analysis of all porous materials with a degree of internal disconnectivity, including collagen scaffolds and trabecular bone. The magnitude of the effect is likely dependent on micro-CT image acquisition and processing techniques, as well as scaffold morphology. Therefore, parameters for production of control VOIs must be ascertained for individual data sets. A series of experiments demonstrating how to obtain these parameters have been described.

CONCLUSIONS
An artefact arising from 3D sweep despeckling collagen scaffolds, which affects pore size measurements in the periphery of VOIs was identified and characterized. The artefact was caused by the 3D sweep filter acting to remove all but the largest object within a VOI, thereby erroneously removing smaller peripheral objects. The effect of the artefact on mean pore size was significantly reduced when using larger VOIs, which exhibit a lower surface area to volume ratio, although larger VOIs exhibited a greater depth of error penetration. The effects of the artefact on pore size were more pronounced with 2D analysis than with 3D analysis. The error could be eliminated completely by despeckling a sufficiently large VOI, then taking a smaller VOI to be analysed from the centre of the larger VOI. Techniques for determining the size of VOI required to eliminate the error in any data set were demonstrated. This VOI reduction method was the most successful at eliminating the error, but was computationally demanding and time-intensive, so alternative filters were assessed. The method which obtained the most similar results to the samples without the artefact was 3D sieve despeckling, although this filter was shown to be afflicted by the same artefact as sweep despeckling. Methods for calculating the required sieve threshold for this filter were demonstrated.