https://imagej.net/api.php?action=feedcontributions&user=Mdoube&feedformat=atomImageJ - User contributions [en]2020-02-25T13:30:58ZUser contributionsMediaWiki 1.28.0https://imagej.net/index.php?title=BoneJ2&diff=40007BoneJ22019-05-29T01:36:33Z<p>Mdoube: /* Parameters */</p>
<hr />
<div>{{Infobox<br />
| name = BoneJ2<br />
| software = ImageJ<br />
| logo = [[File:Bonej-icon.png|96px]]<br />
| author = {{Person|Michaeldoube}}, {{Person|Rdom}}, {{Person|Alessandrofelder}}<br />
| maintainer = {{Person|Michaeldoube}}, {{Person|Alessandrofelder}}<br />
| source = {{GitHub|org=bonej-org|repo=BoneJ2}}, [https://doi.org/10.5281/zenodo.1427262 doi:10.5281/zenodo.1427262]<br />
| released = Dec 11<sup>th</sup>, 2017<br />
| latest version = Apr 18<sup>th</sup>, 2019<br />
| status = Active, Experimental<br />
}}<br />
BoneJ is a collection of skeletal biology plug-ins for ImageJ.<br />
This is the new experimental, modernized version of the software available through the ImageJ [http://imagej.net/Updater updater]. Its update site is called [http://sites.imagej.net/BoneJ BoneJ experimental]. For the old ImageJ1 version, see [[BoneJ]].<br />
<br />
This version works with the latest Fiji, and complies with the modern ImageJ [[architecture]]. Most plug-ins also now support hyperstacks, i.e. images with multiple channels or time frames.<br />
<br />
As the code is still experimental, it's still likely to change a lot. This means any scripts using the code might break, results can change, and plug-ins gain and lose parameters. Tools marked with ''WIP'' (work in progress), are more likely to undergo large changes. <br />
<br />
Below is the documentation for the plug-ins included in BoneJ experimental.<br />
<br />
== Installation ==<br />
[[File:Install-bonej.png|400 px|Installation steps]]<br />
# [http://imagej.net/Downloads Download] the latest version of Fiji for your operating system<br />
# Launch Fiji<br />
# Select in the menu ''Help'' &gt; ''Update...''<br />
# Click ''Manage update sites''<br />
# Check ''BoneJ experimental''<br />
# Click ''Close''<br />
# Click ''Apply changes''<br />
After the downloads have finished, close and restart Fiji.<br />
<br />
== Analyse skeleton ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyse skeleton''.<br />
<br />
This plug-in simply includes [[AnalyzeSkeleton]] in BoneJ. It adds some additional validation to check that your image suits the tool. It also skeletonizes your image by calling [[Skeletonize3D]] if needed.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[AnalyzeSkeleton]].<br />
<br />
== Anisotropy ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Anisotropy''.<br />
<br />
Anisotropy is used to quantify the directionality of trabecular bone. It tells whether the trabeculae have a certain orientation, or if they're randomly aligned. The method to measure anisotropy is fairly complex and consists of multiple steps:<br />
<br />
# Find mean intercept length (MIL) vectors from <math>n</math> directions<br />
# Plot MIL vectors into a point cloud<br />
# Solve the equation of an ellipsoid that best fits the point cloud<br />
# Calculate the degree of anisotropy from the radii of the ellipsoid<br />
<br />
It's important to note that algorithm is stochastic and does not guarantee exact results. Thus it's recommended to run it several times to establish the degree of anisotropy in your image.<br />
<br />
[[File:PhaseChanges.png|left|150 px|The red dots mark phase changes]]<br />
<br />
In the first step the algorithm draws parallel lines over the input image in direction <math>\mathbf{v}</math>. The direction is chosen randomly. Each line segment in the image stack is sampled to find points where it changes from background to foreground, i.e. where the line enters an object. The points are called ''phase changes'', in the adjacent figure they're marked with red dots. After the sampling is complete, the algorithm forms a ''MIL vector'', whose length is the total length of the line segments divided by the total number of phase changes found. The MIL vector has the same direction as <math>\mathbf{v}</math>. Drawing and sampling the lines is repeated for <math>n</math> directions, and the method creates <math>n</math> MIL vectors.<br />
<br />
After the MIL vectors have been calculated, they are added to a point cloud (a collection of points) around the origin. Then the method tries solve the equation of an ellipsoid that would fit the cloud. There may be no solution, especially if there are few points. That is, the fitting may fail at which point the plug-in stops. The radii of this ellipsoid determine the degree of anisotropy (see [http://imagej.net/index.php?title=BoneJ_experimental&action=submit#Results results]).<br />
<br />
[[File:MilCube.png|right|200 px|Projecting lines from a plane]]<br />
<br />
In more detail, the lines in the first step are projected from a <math>d * d</math> plane with normal <math>\mathbf{v}</math> (see the adjacent figure). The size <math>d = \sqrt{w^{2} + h^{2} + d^{2}}</math>, where <math>w, h, d</math> are the dimensions of the image stack. Each of the lines originates from a random point <math>\mathbf{o}</math> on the plane. The plane is divided into <math>m * m</math> same-sized sections, where <math>m</math> is a number selected by the user (i.e. ''Lines per dimension''). One origin <math>\mathbf{o}</math> is randomly selected from within each section. The lines are projected until they intercept the stack edges at points <math>\mathbf{o} + t_{min}\mathbf{v}</math>,<math>\mathbf{o} + t_{max}\mathbf{v}</math> (the algorithm solves for <math>t_{min}</math>, <math>t_{max}</math>). These line segments within the stack are then sampled for phase changes. In this drawing method some lines may miss the image stack completely, but conversely there aren't any areas in the stack that don't have an equal chance of being sampled.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
The plug-in is intended to analyse the "texture" of an object thus it suits samples of a larger whole, e.g. a trabecular cube that fills the whole stack. The results for whole objects such as the pre-packaged ''Bat Cochlea Volume'' ImageJ sample image are not really meaningful.<br />
<br />
==== Parameters ====<br />
* '''Directions''': number of times sampling is performed from different directions. The minimum is <math>9</math>, because that's how many independent variables the algorithm needs to solve the "shape" of the orientation in the image.<br />
* '''Lines per dimension''': controls how many parallel lines are drawn per each direction. For example, if ''lines per dimension'' is <math>2</math> then ''Anisotropy'' draws <math>4</math> lines. In this case, the origin points of the lines are randomly selected from within the <math>4</math> equal sections of the sampling plane (see above detailed explanation). The number is squared, because the location of the origins can vary in two dimensions.<br />
<br />
then the plane is divided into <math>4</math> equal sections, and a line is drawn from each. The origin point of each line is randomly located within their section.<br />
* '''Sampling increment''': controls how often each line is sampled. The default is <math>1.0</math>, which means that after each step a unit vector (a <math>1\_px</math> long line) is added to the position along a sampling line. The number of samples taken per line depends on the length of the line segment within the image stack.<br />
* '''Recommended minimum''': if checked, then the above three parameters are set to the recommended minimum values. In our tests we found that with these values the results are quite stable, and fitting unlikely to fail. However, these minimums are not guaranteed to be the best settings for your image.<br />
* '''Show radii''': if checked, then the radii of the fitted ellipsoid are shown in the results table.<br />
<br />
==== Results ====<br />
* '''Degree of anisotropy''': how much orientation there is in the structure. <math>0.0</math> means the image is completely isotropic, the sample has no directionality whatsoever. <math>1.0</math> means there is very strong orientation in the structure of the image. Note that these are theoretical minimum and maximum values. Due the stochastic nature of the algorithm, even an empty stack will have non-zero degree of anisotropy.<br />
* '''Radii of fitted ellipsoid''' (optional): the lengths of the radii <math>a \leq b \leq c</math> of the ellipsoid fitted on the MIL points. Degree of anisotropy <math>= 1.0 - a/c</math>.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* The results of this Anisotropy do not stabilize, so it's not repeated automatically like in BoneJ1. However, the results vary less between runs.<br />
* MIL vectors are drawn differently. In BoneJ1 they're drawn in sphere-shapes around random seed points. Here parallel lines from different directions are drawn through the whole stack. We think this method produces more uniform sampling, i.e. there's less chance of a directional bias.<br />
<br />
==== Related publications ====<br />
* Odgaard A (1997), ''Three-dimensional methods for quantification of cancellous bone architecture'', Bone, 20, 315-328, [http://dx.doi.org/10.1016/S8756-3282(97)00007-0 doi:10.1016/S8756-3282(97)00007-0]<br />
* Harrigan TP, Mann RW (1984), ''Characterization of microstructural anisotropy in orthotropic materials using a second rank tensor'', J Mater Sci, 19, 761-767, [http://dx.doi.org/10.1007/BF00540446 doi:10.1007/BF00540446]<br />
<br />
== Area/Volume fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Area/Volume fraction''<br />
<br />
''Area/Volume fraction'' calculates the fraction of bone in an image by it to the whole image. It counts all the foreground voxels, which it assumes represent bone, and compares them to the total number of voxels in the image. More formally defined, the plug-in calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''. In case of a 2D image, it calculates the fraction ''BA/TA'', which is the area of bone per unit area of the sample.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the bone voxels.<br />
* '''Total volume''': volume of the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 2D/3D subspace in the image, i.e. for each channel and time frame. Results will be for ''area'' if image is 2D.<br />
<br />
==== Differences to BoneJ1 ====<br />
* In BoneJ1 the plug-in was called ''Volume fraction''<br />
* Can process 2D images<br />
* Supports hyperstacks <br />
<br />
== Calibrate SCANCO (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyze &gt; Calibrate SCANCO''<br />
<br />
Applies the ''mg HA/ccm'' pixel value calibration, i.e. ''HU'' or Hounfield unit calibration stored in the .isq format metadata to the image.<br />
<br />
==== Suitable images ====<br />
An .isq format image generated by Scanco X-ray microtomography scanners.<br />
<br />
== Check voxel depth (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Check Voxel Depth''<br />
<br />
Checks whether slice spacing has been calibrated correctly. Some DICOM images contain slice thickness data in the header information, but thickness is not necessarily the same as the physical distance between consecutive slices' positions.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Connectivity ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Connectivity''.<br />
<br />
The Connectivity plug-in is designed to estimate the number of connected structures i.e. trabeculae in a trabecular network. This ''connectivity'' measure is related to a topological number <math>\chi</math> known as ''Euler characteristic'', ''Euler number'' or ''Euler-Poincaré characteristic''. Mathematically defined connectivity is <math>= 1 - (\chi + \Delta\chi)</math>. Roughly speaking, <math>\chi</math> describes the shape or structure of a topological space. It can also be expressed as <math>\chi = objects - handles + cavities</math>, where a handle is a hole that goes through an object (e.g the hole in a doughnut, or the ear of a coffee mug), and a cavity is enclosed inside one. When measuring trabecular cubes, you need to add <math>\Delta\chi</math> to <math>\chi</math> to get a more accurate estimate of the connectivity of the whole network. The term <math>\Delta\chi</math> corrects for the change in the topology of an object, when it's cut to pieces. <br />
<br />
NB some other Euler characteristic implementations report <math>\chi + \Delta\chi</math> as <math>\chi</math>, i.e. in them the correction <math>\Delta\chi</math> is implicit.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary. The plug-in assumes that there is only one particle in the foreground; to achieve this, run ''Purify''. Having more than one object often leads to negative connectivity.<br />
<br />
==== Results ====<br />
* '''Euler characteristic (χ)''': describes the shape of the object(s) in the image, <math>\chi = objects - handles + cavities</math>.<br />
* '''Corrected Euler (χ + Δχ)''': the Euler characteristic of the part corrected for edge effects to fit the whole.<br />
* '''Connectivity''': gives an estimate of the number of connected trabeculae in the image. Equal to <math>1 - (\chi + \Delta\chi)</math>.<br />
* '''Conn. density''': connectivity divided by unit volume. <br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* The old version reported ''Corrected Euler (χ + Δχ)'' incorrectly as ''Δχ''<br />
<br />
==== Related publications ====<br />
* Odgaard A, Gundersen HJG (1993), ''Quantification of connectivity in cancellous bone, with special emphasis on 3-D reconstructions'', Bone 14: 173-182, [http://dx.doi.org/10.1016/8756-3282(93)90245-6 doi:10.1016/8756-3282(93)90245-6.]<br />
* Toriwaki J, Yonekura T (2002), ''Euler number and connectivity indexes of a three dimensional digital picture'', [http://www.scipress.org/journals/forma/abstract/1703/17030183.html Forma 17: 183-209]<br />
<br />
== Delete slice range (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Delete slice range''<br />
<br />
Removes a range of slices from a stack, so that cropping in the Z direction is practical.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Ellipsoid factor (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Ellipsoid factor''.<br />
<br />
Ellipsoid Factor is a new method for measuring rod/plate geometry. It uses the axis lengths from prolate, oblate and intermediate elipsoids to determine how prolate or oblate the trabecular space is at a particular point. Highly prolate (javelin-shaped, rod-like) ellipsoids have a single long axis (<math>c</math>) and two short axes (<math>a, b</math>) such that <math>a < b \ll c</math> , whereas highly oblate (discus-shaped, plate-like) ellipsoids have two longer axes (<math>b, c</math>) and one much shorter axis (<math>a</math>) so that <math>a \ll b < c</math>. Calculating <math>EF</math> as the difference in ratios, <math>EF = a/b - b/c</math> leads to a useful scale ranging from <math>-1</math> (oblate, <math>a/b \approx 0, b/c \approx 1</math>) to <math>+1</math> (prolate, <math>a/b \approx 1, b/c \approx 0</math>). <math>EF</math> of <math>0</math> indicates an intermediate ellipsoid where <math>a/b = b/c</math>, which is the case for spheres (<math>a = b = c</math>) and other ellipsoids with axis ratios <math>a:qa:q^{2}a</math>. Ellipsoid Factor runs [[Skeletonize3D]] to get the medial axis of the trabeculae, which is used as the seed for sampling. Ellipsoids are seeded from each voxel on the medial axis. A combination of dilation, contraction, rotation and a small amount of translation is run iteratively until the ellipsoid increases no further in volume.<br />
<br />
The EF at a point in the structure is determined as the EF of the most voluminous ellipsoid which contains that point.<br />
<br />
If you use Ellipsoid Factor in your work, please cite:<br />
Doube M (2015), ''The Ellipsoid Factor for quantification of rods, plates and intermediate forms in 3D geometries'', Frontiers in Endocrinology, 6:15, [http://journal.frontiersin.org/Journal/10.3389/fendo.2015.00015/abstract doi: 10.3389/fendo.2015.00015]<br />
<br />
==== Suitable images ====<br />
A binary 3D image.<br />
<br />
==== Parameters ====<br />
* '''Sampling increment''': distance between sample points on each vector; should be less than the pixel spacing.<br />
* '''Vectors''': number of vectors to sample at each seed point.<br />
* '''Skeleton points per ellipsoid''': allows dense or sparse sampling, a value of <math>1</math> means that an ellipsoid is sampled at every seed point.<br />
* '''Contact sensitivity''': how many vectors must touch the background before dilation stops.<br />
* '''Maximum iterations''': how hard to try to find larger ellipsoids - fitting will stop if no improvement has been made after this number of iterations..<br />
* '''Maximum drift''': how far the centroid may be displaced from its seed point.<br />
* '''EF image''': stack containing EF values for each point contained by at least one ellipsoid and NaN elsewhere.<br />
* '''Ellipsoid ID image''': stack containing the ID of the biggest ellipsoid at each point, ranked in descending order (<math>0</math> is the largest ellipsoid).<br />
* '''Volume image''': image showing the volume of the largest ellipsoid containing that point.<br />
* '''Axis ratio images''': images showing <math>a/b</math> and <math>b/c</math> ratios foreach point containing at least one ellipsoid and NaN elsewhere.<br />
* '''Flinn peak plot''': plot of <math>a/b</math> vs <math>b/c</math> weighted by volume, so bright pixels indicate relatively more of the structure has that axis ratio.<br />
* '''Gaussian sigma:''' amount to blur the Flinn peak plot - set to <math>0</math> for a precise but less 'beautiful' result.<br />
* '''Flinn plot''': unweighted Flinn plot - every ellipsoid is represented by the same sized point regardless of ellipsoid size.<br />
<br />
==== Results ====<br />
* '''EF image''': stack containing EF values. NaN (not a number) values are used in the background. Summary statistics can be obtained by running Analyze > Histogram<br />
* '''Short-Mid image''': stack containing the <math>a/b</math> ratios<br />
* '''Mid-Long image''': stack contining the <math>b/c</math> ratios<br />
* '''Volume image''': stack containing ellipsoid volumes<br />
* '''Max id image''': stack containing the ID of the largest ellipsoid at each point; IDs relate to the sort order based on volume, so ID = 0 is the largest ellipsoid. <math>-1</math> is foreground and background is labelled with a large negative number.<br />
* '''Flinn diagram''': plot of <math>a/b</math> versus <math>b/c</math> values present in the volume<br />
* '''Weighted Flinn plot''': Flinn diagram with peaks of intensity proportional to volume occupied by each (<math>a/b</math>, <math>b/c</math>) ratio<br />
<br />
==== Related publications ====<br />
Salmon PL, Ohlsson C, Shefelbine SJ, Doube M (2015), ''Structure model index does not measure rods and plates in trabecular bone'', Frontiers in Endocrinology, 6:162, [http://dx.doi.org/10.3389/fendo.2015.00162 doi:10.3389/fendo.2015.00162].<br />
<br />
== Fit ellipsoid ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit ellipsoid''.<br />
<br />
Finds the ellipsoid that best fits a set of point or multi-point ROIs in the ROI Manager. ''Fit ellipsoid'' may fail to fit an ellipsoid. The more points you add, the more likely it is to succeed. Points are scaled to the spatial calibration (voxel widht, height &amp; depth) of the input image.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': ROIs with at least nine points in the ROI Manager.<br />
<br />
==== Results ====<br />
* '''Radii''': the radii ''a'', ''b'' and ''c'' of the fitted ellipsoid. Radius ''a'' is the shortest and ''c'' the longest.<br />
* '''Centroid''': ''x'', ''y'' and ''z'' coordinates of the ellipsoid centre point.<br />
<br />
==== Differences from BoneJ1 ====<br />
* Supports multi-point ROIs.<br />
* Plug-in cancels if an ellipsoid can't be found, instead of reporting invalid results.<br />
<br />
== Fit sphere (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit sphere''.<br />
<br />
Finds the sphere that best fits a set of point ROIs, and optionally displays the image data bounded by the sphere in a new image window. Place a set of point ROIs on structures of interest, hitting [T] to add each point to the ROI Manager. Fit Sphere takes the coordinates of the points from the ROI Manager and applies a least-squares optimisation.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': populated with at least 5 point ROI's<br />
* '''Copy Sphere''': Create a new stack containing image data from within the best-fit sphere.<br />
* '''Padding''': Number of black pixels to put between the sphere and the sides of the image<br />
* '''Inner Cube''': Create a new stack containing image data from the cube that just fits inside the best-fit sphere.<br />
* '''Outer Cube''': Create a new stack containing image data from the cube that the best-fit sphere just fits inside.<br />
* '''Crop Factor''': Radius used for generating new images is multiplied by crop factor so that a bigger or smaller volume can be produced.<br />
* '''Add to ROI Manager''': Add the sphere to the ROI Manager as a set of circular ROIs<br />
* '''Clear ROI Manager''': Clear any existing ROIs in the Manager prior to adding circles<br />
<br />
==== Results ====<br />
* '''X Centroid''': x-coordinate of sphere's centroid<br />
* '''Y Centroid''': y-coordinate of sphere's centroid<br />
* '''Z Centroid''': z-coordinate of sphere's centroid<br />
* '''Radius''': length of radius<br />
* '''Images (optional)''': images containing a copy of the original data within the sphere, or within cubes bounding or bounded by the sphere.<br />
<br />
== Fractal dimension ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fractal dimension''.<br />
<br />
This plug-in estimates the fractal dimension of an image by applying the box-counting algorithm. In this algorithm grids of diminishing size are scanned over the image, and the number of boxes containing at least one foreground voxel is counted. As the box size decreases and the grid becomes finer, the proportion of foreground boxes increases in a fractal structure. See [https://en.wikipedia.org/wiki/Box_counting Wikipedia] for further details. BoneJ uses a fixed-grid scan, with an option to try to find the optimal covering.<br />
<br />
The box counting algorithm produces a pair of <math>(log(n), -log(m))</math> values for each iteration it runs. Here n = number of boxes with foreground, and m = box size. These pairs are passed to a curve-fitting algorithm, which returns the slope of the linear function which describes them ([https://en.wikipedia.org/wiki/Linear_regression regression fit]). The coefficient of this slope is the fractal dimension.<br />
<br />
Fractal dimension is markedly influenced by the parameters selected for the box counting algorithm, so it's worth running it several times with different values to find an accurate measure for your image.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* ''Starting box size (px)'': the size (sides) in pixels of a box in the sampling grid in the first iteration of the algorithm.<br />
* ''Smallest box size (px)'': the minimum size in pixels of a box in the grid. When box size becomes smaller than this limit, the algorithm iterates one more time, and then stops.<br />
* ''Box scaling factor'': the term used to divide the box size after iteration. For example, a scaling factor of <math>2.0</math> halves the size at each step.<br />
* ''Grid translations'': how many times at each iteration the grid is moved to try to the find the optimal covering. The optimal covering covers the objects in the image with the least amount of boxes. The larger the parameter the more likely it is that optimal covering is found. However, this slows down the plug-in considerably.<br />
* ''Automatic parameters'': if checked, then the plug-in runs with default parameters.<br />
* ''Show points'': if checked, then the plug-in displays the <math>(log(n), -log(m))</math> values it calculated. <br />
<br />
==== Results ====<br />
* ''Fractal dimension'': the [https://en.wikipedia.org/wiki/Fractal_dimension fractal dimension] of the image. For example, the Koch snow flake has a fractal dimension of 1.262.<br />
* ''R²'': the [https://en.wikipedia.org/wiki/Coefficient_of_determination coefficient of determination] of the line fitted to the <math>(log(n), -log(m))</math> points.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* Algorithm parameters can be changed by the user.<br />
<br />
==== Related publications ====<br />
Fazzalari NL, Parkinson IH (1996), ''Fractal dimension and architecture of trabecular bone'', J Pathol, 178: 100-5, [http://dx.doi.org/10.1002/(SICI)1096-9896(199601)178:1%3C100::AID-PATH429%3E3.0.CO;2-K doi:10.1002/(SICI)1096-9896(199601)178:1<100::AID-PATH429>3.0.CO;2-K].<br />
<br />
== Inter-trabecular angles ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Inter-trabecular Angles''.<br />
<br />
The plug-in was designed to analyse the angles between trabeculae of cancellous bone. First it calls [[Skeletonize3D]] to thin the input image (if necessary). Then it calls [[AnalyzeSkeleton]], which creates a graph of the largest skeleton (by number of nodes) in the thinned image. The graph consists of nodes and the edges that connect them. Nodes are also known as vertices, and edges as branches. Roughly speaking the edges correspond to trabeculae and the nodes to the junction points, where trabeuculae meet.<br />
<br />
The graph is often not a perfect representation of the trabecular network in the input image. ''Inter-trabecular angles'' offers many options to adjust the graph's topology and filter out artefacts that may obfuscate or skew the results. First it allows you to filter out nodes with too many or too few edges. Secondly it can be used to prune very short edges, which often do not represent actual trabeculae. <br />
<br />
[[File:Ita_types.png|left|150 px|Types of edges in pruning]]<br />
Pruning works differently for different types of edges. There are four kinds: outer, dead-end, inner and short. An outer edge doesn't interconnect different parts of a graph. In other words, one (and only one) of its endpoints connects to only one branch, i.e. the edge itself. In the figure the outer edge is colored black. A dead-end (blue) is an outer edge whose length is less than the minimum set by the user, i.e. it's a short, outer edge. An inner edge (green) connects to end points with more than one branch. A short edge is an inner edge, whose length is less than the set minimum. When a dead-end is pruned, it with its "lonely" end-point are removed from the graph. When a short edge is pruned, it and it's endpoints are removed, and a new node is placed at the midpoint of the former. This new node connects to all the branches the previous nodes connected to.<br />
<br />
''Inter-trabecular angles'' offers two further options to control pruning: ''iteration'' and ''clustering''. Iteration repeats pruning until no new short edges are found. Sometimes pruning can create new short edges, and thus the graph may still have them after one iteration. However, iteration can alter the structure of the graph too dramatically. Clustering searches for all nodes connected by short edges, before removing any. In the figure, clustering pruning would remove the four nodes and the red edges between them in one go. It would create a new node at the center of the previous four, and connect it to the blue and green edges. When pruning is not clustering, it removes edges one-by-one. This changes the end result depending on the order the edges are traversed. Clustering creates the same result each time. <br />
<br />
Pruning also removes loops and redundant parallel edges. The former connects to the same node on both ends, and the latter connects two nodes that are already connected by another edge. <br />
<br />
The pruning and filtering features were added so that we can replicate and continue from the research of [https://doi.org/10.1016/j.actbio.2016.08.040 Reznikov et al.]<br />
<br />
==== Suitable images ====<br />
An 8-bit, binary 2D or 3D image. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
*'''Minimum valence''': minimum number of branches for a node to be included in the analysis.<br />
*'''Maximum valence''': maximum number of branches for a node to be included in the analysis.<br />
*'''Minimum trabecular length (px)''': minimum length for a branch to be preserved in the pruning. Length is calculated as the distance between the endpoints of a branch.<br />
** This length is also displayed in the units of the image calibration<br />
*'''Margin (px)''': minimum distance of a node from image stack edges to be included in the analysis. Having nodes too close to the edges can make the results less accurate, because you get more branches that do not terminate to a node at the other end.<br />
*'''Iterate pruning''': repeat pruning until no more new short branches are discovered. When true, the topology of the graph is likely to change more in the pruning.<br />
*'''Use clusters''': if true then the pruning result is independent of the order in which the graph is traversed. False corresponds with methodology in Reznikov's article. See above for more details.<br />
*'''Print centroids''': Print the centroids (center coordinates) of the node pairs at the ends of each edge.<br />
*'''Print % culled edges''': Print statistics of different types of edges pruned.<br />
<br />
==== Results ====<br />
*'''Inter-trabecular angles''': angles between each branch of each node included in the analysis. Sorted into columns according to the number of branches per node. For example, column ''"3"'' shows the angles between branches of nodes with three branches.<br />
*'''Centroids''' (optional): A table of the center coordinates of the node pairs at the ends of each edge.<br />
*'''Culled edge percentages''' (optional): A table showing the percentages of different kinds of edges pruned, compared to the total number of edges in the analysed graph.<br />
*'''Skeleton''' (optional): if the plug-in had to skeletonise the input image, it displays the result of the thinning.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Inter-trabecular angles generalizes the idea of ''Triple point angles'' for any types of points. It also provides more tools for adjusting the graph for analysis.<br />
<br />
==== Related publications ====<br />
Reznikov, N et al. (2016), ''Inter-trabecular angle: A parameter of trabecular bone architecture in the human proximal femur that reveals underlying topological motifs'', Acta Biomaterialia, 44: 65--72, [https://doi.org/10.1016/j.actbio.2016.08.040 doi:j.actbio.2016.08.040].<br />
<br />
== Thickness ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Thickness''.<br />
<br />
This plug-in includes [[Local_Thickness]] in BoneJ, and provides some additional options &amp; results. Local thickness measures ''the diameter of the largest sphere that fits inside the object and contains the point'' for each point i.e. foreground voxel in an image. The plug-in calculates mean and standard deviation of the trabecular thickness (Tb.Th) or trabecular spacing (Tb.Sp) directly from pixel values in the resulting thickness map. Foreground voxels are considered trabeculae, and background voxels are the spacing. Processing time is heavily dependent on feature size (in pixels); large features can take a very long time to process.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
* '''Calculate''': chooses which thickness maps to calculate - trabecular thickness, trabecular spacing, or both. In order to calculate trabecular spacing, the image voxels are inverted.<br />
* '''Show thickness maps''': display the calculated thickness maps or not.<br />
* '''Mask thickness maps''': remove artifacts from the thickness maps. Artifacts are foreground voxels not present in the original image. Resets to true for each run, because unmasked pixels bias the result.<br />
<br />
==== Results ====<br />
* The mean and standard deviation for each thickness map calculated.<br />
* Displays thickness map images if ''Show thickness maps'' was selected. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Calls the latest version of [[Local_Thickness]].<br />
<br />
==== Related publications ====<br />
* Dougherty R, Kunzelmann K (2007), ''Computing local thickness of 3D structures with ImageJ'', Microsc. Microanal., 13: 1678-1679, [http://dx.doi.org/10.1017/S1431927607074430 doi:10.1017/S1431927607074430]<br />
* Hildebrand T, Rüegsegger P (1997), ''A new method for the model-independent assessment of thickness in three-dimensional images'', J. Microsc., 185: 67-75, [http://dx.doi.org/10.1046/j.1365-2818.1997.1340694.x doi:10.1046/j.1365-2818.1997.1340694.x]<br />
<br />
== Moments of inertia (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Moments of Inertia''<br />
<br />
Calculates the three orthogonal principal axes and moments of inertia around those axes. It includes pixels with values between upper and lower limits, which can be defined in terms of unitless grey values or Hounsfield units (HU). It optionally creates a new stack with the image centred and rotated so that the principal axes are parallel to the image stack's x, y and z axes. Calculations are limited to a rectangular ROI if one is drawn. The plugin will guess whether the image is HU calibrated, and if so, apply HU limits of bone (0-4000 HU), otherwise it will calculate auto-thresholds based on the stack's histogram. If a calibration curve is known, the coefficients can be added to get weighted calculations. Aligning a bone with Moments of Inertia may be a useful step prior to Slice Geometry if bones are not aligned with the image z axis.<br />
<br />
==== Suitable images ====<br />
An 8-bit or 16-bit image.<br />
<br />
==== Parameters ====<br />
* '''Start slice''': First slice to include in calculations<br />
* '''End slice''': Last slice to include in calculations<br />
* '''HU Calibrated''': Plugin will guess whether the image is HU calibrated. If image is HU calibrated, make sure the box is checked and enter HU calibrated numeric values in the following fields<br />
* '''Bone Min''': Lower threshold, in either uncalibrated greys or HU<br />
* '''Bone Max''': Upper threshold, in either uncalibrated greys or HU<br />
* '''Slope''': m where physical density = m × pixel value + c<br />
* '''Y Intercept''': c where physical density = m × pixel value + c<br />
* '''Align result''': Draw a new stack with the principal axes parallel to the image axes<br />
* '''Show axes (2D)''': Draw the axes in white on the aligned image<br />
* '''Show axes (3D)''': Display the stack and its principal axes in a 3D Viewer window<br />
<br />
==== Results ====<br />
* '''Image (optional)''': a copy of the input image centered and aligned with the principal axes<br />
* '''Xc''': Centroid x-coordinate (mass-weighted by calibrated density)<br />
* '''Yc''': Centroid y-coordinate<br />
* '''Zc''': Centroid z-coordinate<br />
* '''Vol''': Total volume of thresholded voxels<br />
* '''Mass''': Mass of bone, from pixel values and density calibration coefficients<br />
* '''Icxx''': Moment around x axis passing through centroid<br />
* '''Icyy''': Moment around y axis passing through centroid<br />
* '''Iczz''': Moment around z axis passing through centroid<br />
* '''Icxy''': Off-axis term for constructing inertia tensor<br />
* '''Icxz''': Off-axis term for constructing inertia tensor<br />
* '''Icyz''': Off-axis term for constructing inertia tensor<br />
* '''I1''': Moment around the shortest principal axis<br />
* '''I2''': Moment around the middle principal axis<br />
* '''I3''': Moment around the longest principal axis<br />
* '''Verbose output in Log window'''<br />
** '''Eigenvalues''': Result of of eigenvalue decomposition. Moments of inertia<br />
** '''Eigenvectors of principal axes''': orientation of input image<br />
** '''Inverse eigenvector matrix''': used to map voxel positions in the aligned image back to voxel positions in the original image<br />
* Optional 3D display of principal axes<br />
<br />
== Optimise threshold (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Optimise Threshold''<br />
<br />
Several histogram-based methods exist for automatic determination of threshold for binary segmentation, but in ImageJ these are currently limited to pixel values in a single slice. The result can be excluding high values in a stack that are higher than the highest value in the current slice. This plugin uses all the pixels in a stack to construct a histogram and uses ImageJ's built-in isodata algorithm to determine the threshold. It optionally tests values either side of the initial auto-threshold for connectivity, because connectivity is very sensitive to image noise. The plugin attempts to find the threshold that results in minimal connectivity. Purification, erosion and dilation can improve the connectivity estimate, so Purify is always called, and erosion and dilation are applied as part of a sequence: purify, erode, purify, dilate.<br />
<br />
==== Suitable images ====<br />
An 8-bit of 16-bit image<br />
<br />
==== Parameters ====<br />
* '''Threshold Only''': Determine the threshold from the stack histogram only<br />
* '''Apply Threshold''': Replace the input image with a thresholded version<br />
* '''Show Plot''': Display a graph showing connectivity versus threshold<br />
* '''Tests''': Number of different thresholds to test for connectivity<br />
* '''Range''': Proportion of the initial threshold to test above and below initial thresholds<br />
* '''Subvolume Size''': Size of the volume to test for connectivity. Set small for a faster run and large to test the whole stack<br />
* '''Erosion Cycles''': Number of times to erode the stack after initial purification<br />
* '''Dilation Cycles''': Number of times to dilate the stack after secondary purification<br />
<br />
==== Results ====<br />
* '''Thresholded stack (optional)'''<br />
* '''Plot of connectivity versus threshold (optional)'''<br />
* '''Log of optimal threshold value'''<br />
<br />
== Orientation (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Orientation''<br />
<br />
Sets the direction in a 2D image, without rotating the image or changing it in any way. ''Slice Geometry'' (see below) uses ''Orientation'' to calculate diameter, second moments of area and section moduli around anatomic axes set by the user.<br />
<br />
==== Suitable images ====<br />
A 2D image.<br />
<br />
==== Parameters ====<br />
* '''Orientation''': input field displays current orientation (clockwise from 12 o'clock) and takes keyboard input<br />
* '''deg / rad''': display and set orientation in degrees or radians<br />
* '''Principal direction''': the main direction, the head of which is displayed in red<br />
* '''Secondary direction''': the orthogonal direction<br />
* '''Reflect''': swap the labels on this axis<br />
<br />
==== Results ====<br />
* '''Orientation axes''': draws the axes of the orientation on the image.<br />
<br />
== Purify (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Purify''<br />
<br />
Purify locates all particles in 3D and removes all but the largest foreground and background particles.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary.<br />
<br />
==== Parameters ====<br />
* '''Labelling algorithm''':<br />
** '''Mapped''': Non-recursive, memory efficient and fast.<br />
** '''Multithreaded''': use multiple cores and job chunking to reduce recursion. Fast on small stacks and if you have many CPU cores.<br />
** '''Linear''': Non-recursive but heavy on RAM and single-threaded. Fast on big stacks, but only if you have the memory.<br />
* '''Chunk Size''': number of slices to use in each particle labelling thread. If images are large, set this to 2<br />
* '''Performance Log''': Show verbose performance information to help tune your system<br />
* '''Make copy''': If checked, shows the result in a new window; if unchecked the result replaces the original image.<br />
<br />
==== Results ====<br />
* '''Performance metrics (optional)'''<br />
** '''Threads''': Number of CPU cores used<br />
** '''Slices''': Number of slices in the input image stack<br />
** '''Chunks''': Number of chunks of slices, each chunk is processed independently<br />
** '''Chunk size''': Number of slices per chunk<br />
** '''Last chunk size''': size of the last chunk (the remainder chunk)<br />
** '''Duration''': time in seconds to complete purification<br />
* '''Purified image''': optionally in a new image window.<br />
<br />
== Skeletonise ==<br />
Menu path ''Plugins &gt; BoneJ &gt;Skeletonise''.<br />
<br />
This plug-in simply includes [[Skeletonize3D]] in BoneJ. It adds some additional validation to check that your image suits the tool.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[Skeletonize3D]].<br />
<br />
== Slice geometry (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Slice Geometry''<br />
<br />
Slice Geometry calculates cross-sectional geometric properties of shapes: cross-sectional area, centroid, mean density, second moment of area, section modulus, Feret diameter and local thickness (2D and 3D). Measurements can be limited to a rectangular ROI. If your bone is not well aligned with the image axes, you may find it useful to align the bone to its principal axes using Moments of Inertia or by exporting a transformed volume from the ImageJ 3D Viewer. Importantly, no assumption of geometry is made for any of the measurements.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Bone''': Slice Geometry will guess from your image title the bone it is working on. If it is wrong, correct it. If your bone of interest isn't listed, email me.<br />
* '''2D Thickness''': Run Thickness on a per-slice basis; this fits circles rather than spheres<br />
* '''3D Thickness''': Run Thickness on the whole stack, fitting spheres, then report results per slice<br />
* '''Draw Axes''': Draw axes on an annotated copy of the stack<br />
* '''Draw Centroids''': Draw centroids on an annotated copy of the stack<br />
* '''Annotated Copy (2D)''': Create a new stack showing the centroids and principal axes<br />
* '''3D Annotation''': Display the stack, principal axes and centroids in the 3D viewer<br />
* '''Process Stack''': Calculate parameters for all slices in the stack<br />
* '''Clear Results''': Remove all data in the results table without saving, prior to calculating parameters<br />
* '''Use Orientation''': Also calculate parameters based on directions defined in Orientation<br />
* '''HU Calibrated''': Allows you to enter your thresholds in Hounsfield units (HU) or uncalibrated units<br />
* '''Bone Min''': minimum pixel value to use in calculations<br />
* '''Bone Max''': maximum pixel value to use in calculations<br />
* '''Slope''': <math>m</math> where physical density <math>= m * pixel value + c</math><br />
* '''Y Intercept''': <math>c</math> where physical density <math>= m * pixel value + c</math><br />
* '''Note''': density-weighted calculations are only applied to centroid determination at present<br />
* '''Partial volume compensation''': Use model that assumes Gaussian blur of imaging modality and linear transform between pixel value and sample 'density' to correct for blurred and pixelated images (e.g. small bone in clinical CT)<br />
* '''Background''': pixel value that corresponds to zero bone density (could be the 'fat', 'air' or 'muscle' pixel value)<br />
* '''Foreground''': pixel value that corresponds to 100% bone density<br />
* '''A rectangular ROI (optional)''': if there's a ROI, calculations are limited to its area.<br />
<br />
==== Results ====<br />
* '''Images (optional)''': displays the result images selected in the parameters<br />
* '''Bone code''': Unique numeric identifier for the anatomic name of each bone. Further bone codes can be added to BoneJ on request<br />
* '''Slice''': slice number indicating which slice contributed image data for this row of the results<br />
* '''CSA''': cross-sectional area<br />
* '''X cent.''': Centroid x-coordinate<br />
* '''Y cent.''': Centroid y-coordinate<br />
* '''Density''': mean physical density, calculated from pixel values and calibration coefficients<br />
* '''wX cent''': Density-weighted x-coordinate of centroid<br />
* '''wY cent''': Density-weighted y-coordinate of centroid<br />
* '''Theta''': angle of minor axis (axis for Imin, the long axis of your specimen's cross section) from the horizontal, ranging from <math>-\pi/2</math> to <math>\pi/2</math>, with positive as clockwise<br />
* '''R1''': maximum chord length from minor axis<br />
* '''R2''': maximum chord length from major axis<br />
* '''Imin''': Second moment of area around major axis<br />
* '''Imax''': Second moment of area around minor axis<br />
* '''Ipm''': Product moment of area (= 0 if no errors are present, e.g. due to pixelation)<br />
* '''Zmax''': Section modulus around major axis (Imax / R2)<br />
* '''Zmin''': Section modulus around minor axis (Imin / R1)<br />
* '''Zpol''': Polar section modulus<br />
* '''Feret Min''': Minimum caliper width<br />
* '''Feret Max''': Maximum caliper width<br />
* '''Feret Angle''': Orientation of maximum caliper width<br />
* '''Perimeter''': Distance around external surface<br />
* '''Max Thick 2D''': Maximum thickness determined by local thickness in 2D<br />
* '''Mean Thick 2D''': Mean thickness determined by local thickness in 2D<br />
* '''SD Thick 2D''': Standard deviation of the mean thickness determined by local thickness in 2D<br />
* '''Max Thick 3D''': Maximum thickness in this slice determined by local thickness in 3D<br />
* '''Mean Thick 3D''': Mean thickness in this slice determined by local thickness in 3D<br />
* '''SD Thick 3D''': Standard deviation of the mean thickness in this slice determined by local thickness in 3D Directional measurements, using Orientation directions, and the specimen's slice centroid<br />
* '''A (rad)''': Principal orientation (direction A)<br />
* '''B (rad)''': Secondary orientation (direction B)<br />
* '''IAa''': Second moment of area around Aa axis<br />
* '''IBb''': Second moment of area around Bb axis<br />
* '''ZAa''': Section modulus around Aa axis<br />
* '''ZBb''': Section modulus around Bb axis<br />
* '''RAa''': maximum chord length from Aa axis<br />
* '''RBb''': maximum chord length from Bb axis<br />
* '''DAa''': Calliper diameter in direction of Aa<br />
* '''DBb''': Calliper diameter in direction of Bb<br />
<br />
== Surface area ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Surface area''<br />
<br />
''Surface area'' creates a mesh from the bone in the image, and then calculates the area of the surface of the mesh. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Export STL file(s)''': if checked, then the meshes created from the image are saved as .stl-files. A dialog opens for you to select a folder for the files.<br />
<br />
==== Results ====<br />
* '''Surface area''': the surface area of the bone mesh<br />
* '''STL-file''': the mesh created from the bone image<br />
<br />
The surface area is reported and an .stl-file saved separately for each 3D subspace in the image. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Isosurface''<br />
<br />
== Surface fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Surface fraction''<br />
<br />
''Surface fraction'' calculates the fraction of bone volume in an image by comparing meshes created from bone particles and the whole image. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone. <br />
<br />
More formally defined, ''Surface fraction'' calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary.<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the mesh created from bone voxels.<br />
* '''Total volume''': volume of the mesh created from the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Volume fraction''<br />
<br />
== Results table ==<br />
The BoneJ plug-ins print their results into a shared result table. This is because we often need to calculate several measures for the same image, so it's handy to have them on one row. Repeated measures for the same image are reported on different rows. The results persist even if the table is closed. To clear the table run ''Plugins &gt; BoneJ &gt; Table &gt; Clear BoneJ results''.<br />
<br />
Note that some of the plug-ins (marked with ''WIP'') still use a ImageJ1 style results table that works slightly differently. As they are modernized they'll move to use the same new table as the others.<br />
<br />
== Usage reporting ==<br />
Menu path '' Edit &gt; Options &gt; BoneJ Usage (Modern | Legacy)''<br />
<br />
==== What is collected? ====<br />
<br />
BoneJ uses Google Analytics to report when a plugin's run() method completes successfully.<br />
<br />
<code><br />
ht<span>tp://</span>www.google-analytics.com/__utm.gif?utmwv=5.2.5&utms=0&utmn=1074354874&utmhn=bonej.org&utmt=event&utme=5(Plugin%20Usage*org.bonej.wrapperPlugins.wrapperUtils.UsageReporterOptions*0.5.1)&utmcs=UTF-8&utmsr=3840x1080&utmvp=3840x1080&utmsc=24-bit&utmul=en-gb&utmje=0&utmcn=1&utmdt=bonej.org%20Usage%20Statistics&utmhid=512699200&utmr=-&utmp=%2Fstats&utmac=UA-366405-8&utmcc=__utma%3D1589599318.1327557233.1538550102.1538550102.1538550102.2%3B%2B__utmz%3D1589599318.1538550102.79.42.utmcsr%3Dgoogle%7Cutmccn%3D(organic)%7Cutmcmd%3Dorganic%7Cutmctr%3DBoneJ%20Usage%20Reporter%3B<br />
</code><br />
<br />
A one-pixel GIF image is requested from Google, with a rather long set of parameters. Reported details are:<br />
<br />
* A unique ID which is stored in your ImageJ preferences between sessions<br />
* Your screen resolution<br />
* The name of the plugin's Java class<br />
* The version of BoneJ<br />
* The first time, last time and current time you ran a BoneJ plugin<br />
* Your system language and character map<br />
* Google also records your IP address as all webservers do in their logs<br />
* Some of these values are saved in your preferences<br />
* Your operating system and Java version are reported in the user agent ID<br />
<br />
==== What does the report look like? ====<br />
<br />
Data are collated with the Analytics report already used to track hits on bonej.org.<br />
<br />
==== For what is the data used? ====<br />
<br />
So far, BoneJ has been supported mainly by grants to scientists. We wish to create quantitative reports that detail how much BoneJ is being used in the community, so that decisions to fund further development can be made rationally.<br />
<br />
In addition, development resources are limited so it is useful to see which features are used heavily and can be consolidated, while little-used features can be abandoned or made more useful.<br />
<br />
==== That is noble but my work is top secret ====<br />
<br />
If you are uncomfortable with this level of data collection then please opt out, at the dialog which is prompted on first run, or by running '' Edit &gt; Options &gt; BoneJ Usage (Modern | Legacy) ''. Hitting Cancel (Legacy) or unchecking the box (Modern) will prevent any report from being gathered or sent and will also clear any values that were previously saved.<br />
<br />
You can opt back in by running '' Edit &gt; Options &gt; BoneJ Usage (Modern | Legacy)'', checking the box (Modern only) and hitting OK.<br />
<br />
==== Can I see the report? ====<br />
<br />
At the moment the report is kept private. If there is a strong will from the user community, who created the data in the first place, the report could be made more open. Please feel free to discuss on the user forum.<br />
<br />
==== How is it implemented? ====<br />
<br />
You can read the code on Github and in every copy of BoneJ. If you turn on ImageJ's debug mode (in '' Edit &gt; Options &gt; Misc. '') the URL and the GIF response will be logged to ImageJ's log window.<br />
<br />
== Where is my favourite plug-in? ==<br />
We have removed some plug-ins from BoneJ. ''Neck shaft angle'', ''Plateness'' and ''Structure model index'' have been discontinued. ''Interpolate ROIs'', [http://imagej.net/3D_Binary_Filters ''Dilate 3D'' and ''Erode 3D''] come pre-packaged with ImageJ, so they are no longer included in BoneJ2.<br />
<br />
Support for ''Kontron IMG'', ''Scanco ISQ'' and ''Stratec pQCT'' file formats has been moved to [[SCIFIO]]. Just run ''Edit &gt; Options &gt; ImageJ2'', and check ''Use SCIFIO when opening files''. When the option is enabled, these kinds of files can be opened from ''File > Open'' or dragging &amp; dropping them like any other format. <br />
<br />
''Distribution analysis'' and other pQCT related tools can now be downloaded independently from the [[PQCT]] update site.<br />
<br />
== Licence ==<br />
BoneJ2 is free, open-source software. You can redistribute it and/or modify it under the terms of the [https://github.com/bonej-org/BoneJ2/blob/master/LICENCE.md BSD 2-clause licence]. The software is provided "as is" and any warranties are disclaimed. In no event shall the copyright holder or contributors be liable.<br />
<br />
== Citation ==<br />
If you'd like to cite the software, we will soon publish a paper about BoneJ experimental. You can read the draft (and send us your feedback) as we're writing it [https://v1.overleaf.com/read/yxdkwpcdkjzj for Wellcome Open Research on Overleaf]. We recommend you cite the specific release used in your research.<br />
<br />
== Funding ==<br />
The redesign and porting effort to create BoneJ2 was supported by a [https://wellcome.ac.uk/what-we-do/directories/biomedical-resource-technology-development-grants-people-funded Wellcome Trust Biomedical Resource and Technology Development Grant]. Interaction with [[SciView]] was assisted by a [https://royalsociety.org/grants-schemes-awards/grants/international-exchanges/ Royal Society International Exchange grant].</div>Mdoubehttps://imagej.net/index.php?title=ROIs&diff=39033ROIs2019-01-30T02:22:25Z<p>Mdoube: </p>
<hr />
<div>{{WIP}}<br />
In [[wikipedia:Image processing|image processing]], two of the most often needed yet complex operations are [[wikipedia:Segmentation (image processing)|segmentation]] and [[wikipedia:Image registration|registration]]. Regions of interest (ROIs) are an effective way of expressing and visualizing the results of a segmentation. For the current implementation of ROIs in ImageJ, see the [https://github.com/imglib/imglib2-roi imglib2-roi] repository.<br />
<br />
= Introduction =<br />
<br />
The base interface for all ROIs is '''MaskPredicate'''. '''MaskPredicate''' extends Java's '''Predicate''' whose <code>test(...)</code> method is used to determine if a given point is inside or outside a ROI. <br />
<br />
ROIs are further separated into discrete and continuous space ROIs, which can be bounded or unbounded. '''Mask''' is the base interface for all discrete space ROIs, and '''MaskInterval''' is the base interface for all bounded discrete space ROIs. Similarly, '''RealMask''' is the base interface for all continuous space ROIs, and '''RealMaskRealInterval''' is the base interface for all bounded continuous space ROIs.<br />
<br />
Concrete implementations of geometric ROIs (i.e. ellipsoids, polylines, etc.) can be retrieve from '''GeomMasks'''. The below example creates a 3D sphere centered at (12.5, 6, 93.25) with a radius of 0.5.<br />
<br />
<source lang="java"><br />
final double[] center = new double[] { 12.5, 6, 93.25 };<br />
final double radius = 0.5;<br />
final Sphere sphere = GeomMasks.closedWritableSphere( center, radius );<br />
</source><br />
<br />
== Naming ==<br />
<br />
All n-dimensional geometric ROIs should be named with the name of their 3D counterpart. For example, an n-dimensional hyper-ellipsoid would just be named 'ellipsoid'. If a ROI implementation is not n-dimensional, its dimensionality should be stated in the name. For example, '''Polygon2D''' which is a 2D polygon.<br />
<br />
Additionally, ROIs prefixed with "Writable" are mutable. ROIs without this prefix are assumed to be immutable.<br />
<br />
== BoundaryType ==<br />
<br />
The boundary behavior of a ROI is given by its '''BoundaryType''' enum which has three values.<br />
* '''CLOSED''' - all points on the boundary are considered inside<br />
* '''OPEN''' - all points on the boundary are considered outside<br />
* '''UNSPECIFIED''' - some points on the boundary may be inside while others are outside<br />
<br />
== KnownConstant ==<br />
<br />
The '''KnownConstant''' enum is used for determining if a ROI returns <code>false</code> for all locations, or <code>true</code> for all locations. This is useful for determining if the result of an operation between ROIs results in "empty" space or "all" space.<br />
* '''ALL_FALSE''' - ROI is known to return <code>false</code> for all locations<br />
* '''ALL_TRUE''' - ROI is known to return <code>true</code> for all locations<br />
* '''UNKNOWN''' - it is undetermined what the ROI returns for all locations, most ROIs have this<br />
<br />
= Combining ROIs =<br />
<br />
ROIs can be combined via a number of operations, namely: <code>and</code>, <code>or</code>, <code>negate</code>, <code>minus</code>, and <code>xor</code>. '''RealMask'''s also have a <code>transform</code> operation. Combined ROIs are '''CompositeMaskPredicate'''s, which preserves the provenance of the composite ROI. For each '''CompositeMaskPredicate''' it is possible to retrieve the operator and operands. This results in a "tree" of ROIs.<br />
<br />
The below example creates a composite ROI:<br />
<source lang="java><br />
final Sphere s1 = new ClosedWritableSphere( new double[] { 0, 0, 0 }, 3.5 );<br />
final Sphere s2 = new ClosedWritableSphere( new double[] { 1, 2, 0 }, 1.5 );<br />
final Sphere s3 = new ClosedWritableSphere( new double[] { 2, 2, 0 }, 1.5 );<br />
final RealMaskRealInterval composite = s1.and( s2.minus( s3 ) ).and( s3 ).or( s1.minus( s3.negate() ) );<br />
</source><br />
<br />
The resulting composite ROI has the resulting "tree":<br />
<pre><br />
leaf (net.imglib2.roi.geom.real.ClosedWritableSphere@a4)<br />
OR (net.imglib2.roi.composite.DefaultBinaryCompositeRealMaskRealInterval@5a050f05)<br />
+--AND (net.imglib2.roi.composite.DefaultBinaryCompositeRealMaskRealInterval@d5189b46)<br />
| +--AND (net.imglib2.roi.composite.DefaultBinaryCompositeRealMaskRealInterval@f1bb9aa6)<br />
| | +--leaf (net.imglib2.roi.geom.real.ClosedWritableSphere@a4)<br />
| | +--MINUS (net.imglib2.roi.composite.DefaultBinaryCompositeRealMaskRealInterval@516e3be)<br />
| | +--leaf (net.imglib2.roi.geom.real.ClosedWritableSphere@7d)<br />
| | +--leaf (net.imglib2.roi.geom.real.ClosedWritableSphere@8a)<br />
| +--leaf (net.imglib2.roi.geom.real.ClosedWritableSphere@8a)<br />
+--MINUS (net.imglib2.roi.composite.DefaultBinaryCompositeRealMaskRealInterval@fcc5e4e3)<br />
+--leaf (net.imglib2.roi.geom.real.ClosedWritableSphere@a4)<br />
+--NEGATE (net.imglib2.roi.composite.DefaultUnaryCompositeRealMask@c2ea3a1e)<br />
+--leaf (net.imglib2.roi.geom.real.ClosedWritableSphere@8a)<br />
</pre><br />
<br />
Note that the same ROI can be used in multiple operations within the same composite.<br />
<br />
== BoundaryType of Composites ==<br />
<br />
The boundary behavior of a ROI may change as a result of the operation. The below outlines the composite BoundaryType logic, used when composite ROIs are formed.<br />
<br />
=== Unary Operators ===<br />
<br />
{| class="wikitable"<br />
|+style="caption-side:bottom; text-align: left; font-size: 0.9em; font-weight: normal;"|<sup>1</sup> Transform is [[wikipedia:Continuous_function|continuous]] (preserves boundary behavior) and will preserve the interval bounds<br /><br />
<sup>2</sup> Transform is discontinuous or doesn't preserve bounds<br />
! Operation <br />
!colspan="3"|BoundaryType<br />
|-<br />
!<br />
! open<br />
! closed<br />
! unspecified<br />
|-<br />
! negate<br />
|closed<br />
|open<br />
|unspecified<br />
|-<br />
! transform<sup>1<sup><br />
|open<br />
|closed<br />
|unspecified<br />
|-<br />
! transform<sup>2<sup><br />
|unspecified<br />
|unspecified<br />
|unspecified<br />
|}<br />
<br />
=== Binary Operators === <br />
<br />
{| class="wikitable"<br />
!colspan="4"|And<br />
!colspan="4"|Minus<br />
|-<br />
!colspan="4"|Operand BoundaryType<br />
!colspan="4"|Operand BoundaryType<br />
|-<br />
! Left<br />
!colspan="3"|Right<br />
! Left<br />
!colspan="3"|Right<br />
|-<br />
!<br />
! open<br />
! closed<br />
! unspecified<br />
!<br />
! open<br />
! closed<br />
! unspecified<br />
!<br />
|-<br />
! open<br />
|open<br />
|unspecified<br />
|unspecified<br />
! open<br />
|unspecified<br />
|open<br />
|unspecified<br />
|-<br />
! closed<br />
|unspecified<br />
|closed<br />
|unspecified<br />
! closed<br />
|closed<br />
|unspecified<br />
|unspecified<br />
|-<br />
! unspecified<br />
|unspecified<br />
|unspecified<br />
|unspecified<br />
! unspecified<br />
|unspecified<br />
|unspecified<br />
|unspecified<br />
|}<br />
<br />
{| class="wikitable"<br />
!colspan="4"|Or<br />
!colspan="4"|Xor<br />
|-<br />
!colspan="4"|Operand BoundaryType<br />
!colspan="4"|Operand BoundaryType<br />
|-<br />
! Left<br />
!colspan="3"|Right<br />
! Left<br />
!colspan="3"|Right<br />
|-<br />
!<br />
! open<br />
! closed<br />
! unspecified<br />
!<br />
! open<br />
! closed<br />
! unspecified<br />
!<br />
|-<br />
! open<br />
|open<br />
|unspecified<br />
|unspecified<br />
! open<br />
|unspecified<br />
|unspecified<br />
|unspecified<br />
|-<br />
! closed<br />
|unspecified<br />
|closed<br />
|unspecified<br />
! closed<br />
|unspecified<br />
|unspecified<br />
|unspecified<br />
|-<br />
! unspecified<br />
|unspecified<br />
|unspecified<br />
|unspecified<br />
! unspecified<br />
|unspecified<br />
|unspecified<br />
|unspecified<br />
|}<br />
<br />
== Bounds of Composites ==<br />
<br />
The composite logic tries very hard to preserve the bounds of ROIs whenever possible. Additionally, the bounds will update when the composite's leaves are updated.<br />
<br />
In the below example, a '''CompositeMaskPredicate''' is generated by and-ing a '''Sphere''' and a '''Box'''. The below example shows that the bounds are sensitive to changes in the operands' bounds. It also demonstrates ROIs ability to detect if a composite is empty.<br />
<source lang="java"><br />
final WritableSphere s = GeomMasks.closedWritableSphere( new double[] { 7.5, 8 }, 5 );<br />
final WritableBox b = GeomMasks.closedWritableBox( new double[] { 3, 2 }, new double[] { 20, 9 } );<br />
final RealMaskRealInterval and = s.and( b );<br />
<br />
System.out.println( "Min Bounds: " + and.realMin( 0 ) + ", " + and.realMin( 1 ) );<br />
System.out.println( "Max Bounds: " + and.realMax( 0 ) + ", " + and.realMax( 1 ) );<br />
// Min Bounds: 3.0, 3.0<br />
// Max Bounds: 12.5, 9.0<br />
<br />
// Move the sphere's center to (11.5, 5.5)<br />
s.center().setPosition( new double[] { 11.5, 5.5 } );<br />
System.out.println( "Min Bounds: " + and.realMin( 0 ) + ", " + and.realMin( 1 ) );<br />
System.out.println( "Max Bounds: " + and.realMax( 0 ) + ", " + and.realMax( 1 ) );<br />
// Composite ROIs new bounds<br />
// Min Bounds: 6.5, 2.0<br />
// Max Bounds: 16.5, 9.0<br />
<br />
// Move the box's center to (100, 100), such that it no longer<br />
// intersects with the sphere<br />
b.center().setPosition( new double[] { 100, 100 } );<br />
System.out.println( "Is empty? " + and.isEmpty() );<br />
// Is empty? true<br />
// The two ROIs no longer intersect, so the composite is empty now<br />
</source><br />
=== Unary Operators ===<br />
<br />
{| class="wikitable"<br />
|+style="caption-side:bottom; text-align: left; font-size: 0.9em; font-weight: normal;"|<sup>1</sup> Transformation is affine<br /><br />
<sup>2</sup> Transformation is not affine<br />
!Operation<br />
!colspan="2"|Operand has bounds?<br />
|-<br />
!<br />
!yes<br />
!no<br />
|-<br />
!negate<br />
|unbounded<br />
|unbounded<br />
|-<br />
!transform<sup>1</sup><br />
|bounded<br />
|unbounded<br />
|-<br />
!transform<sup>2</sup><br />
|unbounded<br />
|unbounded<br />
|}<br />
<br />
=== Binary Operators ===<br />
<br />
{| class="wikitable"<br />
!colspan="3"|And<br />
!colspan="3"|Minus<br />
!colspan="3"|Or<br />
!colspan="3"|Xor<br />
|-<br />
!colspan="3"|Operand has bounds?<br />
!colspan="3"|Operand has bounds?<br />
!colspan="3"|Operand has bounds?<br />
!colspan="3"|Operand has bounds?<br />
|-<br />
!Left<br />
!colspan="2"|Right<br />
!Left<br />
!colspan="2"|Right<br />
!Left<br />
!colspan="2"|Right<br />
!Left<br />
!colspan="2"|Right<br />
|-<br />
!<br />
!yes<br />
!no<br />
!<br />
!yes<br />
!no<br />
!<br />
!yes<br />
!no<br />
!<br />
!yes<br />
!no<br />
|-<br />
!yes<br />
|bounded<br />
|bounded<br />
!yes<br />
|bounded<br />
|bounded<br />
!yes<br />
|bounded<br />
|unbounded<br />
!yes<br />
|bounded<br />
|unbounded<br />
|-<br />
!no<br />
|bounded<br />
|unbounded<br />
!no<br />
|unbounded<br />
|unbounded<br />
!no<br />
|unbounded<br />
|unbounded<br />
!no<br />
|unbounded<br />
|unbounded<br />
|}<br />
<br />
= Converting to RandomAccessible =<br />
<br />
It is also possible to convert '''MaskPredicate'''s to '''(Real)RandomAccessible'''s. The easiest way to do this is via the '''Masks''' class.<br />
<br />
<source lang="java"><br />
final double[] center = new double[] { 10, 13, 22.25 };<br />
final double[] semiAxisLengths = new double[] { 4, 5, 1 };<br />
final double exponent = 6;<br />
final SuperEllipsoid se = GeomMasks.closedWritableSuperEllipsoid( center, semiAxisLengths, exponent );<br />
<br />
final RealRandomAccessibleRealInterval< BoolType > rrari = Masks.toRealRandomAccessibleRealInterval( se );<br />
</source><br />
<br />
= Discussion =<br />
<br />
* [https://groups.google.com/d/msg/fiji-devel/AdeqZKffIUU/K8NRgKgk-WUJ G. Landini: Imglib or ImageJ2 and ROIs] – ROIs should be drawn from the center of each pixel<br />
* [https://groups.google.com/d/msg/fiji-devel/AdeqZKffIUU/9SoisoaivWwJ S. Preibisch: Imglib or ImageJ2 and ROIs - Where is a pixel?] – Two kinds of ROIs: discrete and continuous<br />
* [https://groups.google.com/d/msg/fiji-devel/AdeqZKffIUU/FU2Js4zNPG0J D. White: Imglib or ImageJ2 and ROIs - A pixel is not a little square] – Alvy Ray's classic article<br />
* [https://groups.google.com/d/msg/fiji-devel/E9SSt9z2zRQ/Slc1BLzuvtcJ J. Tinevez: ImageJ class hierarchy suggestions] – a proposed interface-driven design for ROIs<br />
* [http://forum.imagej.net/t/implementation-plan-for-imglib2-rois-2d/2531 Implementation plan for Imglib2-rois 2D] - forum discussion regarding ROI API</div>Mdoubehttps://imagej.net/index.php?title=BoneJ2&diff=39031BoneJ22019-01-29T00:35:24Z<p>Mdoube: /* Thickness */</p>
<hr />
<div>{{Infobox<br />
| name = BoneJ2<br />
| software = ImageJ<br />
| logo = [[File:Bonej-icon.png|96px]]<br />
| author = {{Person|Michaeldoube}}, {{Person|Rdom}}, {{Person|Alessandrofelder}}<br />
| maintainer = {{Person|Michaeldoube}}, {{Person|Alessandrofelder}}<br />
| source = {{GitHub|org=bonej-org|repo=BoneJ2}}, [https://doi.org/10.5281/zenodo.1427262 doi:10.5281/zenodo.1427262]<br />
| released = Dec 11<sup>th</sup>, 2017<br />
| latest version = cuneiform-experimental-patch2, Sep 24<sup>th</sup>, 2018<br />
| status = Active, Experimental<br />
}}<br />
BoneJ is a collection of skeletal biology plug-ins for ImageJ.<br />
This is the new experimental, modernized version of the software available through the ImageJ [http://imagej.net/Updater updater]. Its update site is called [http://sites.imagej.net/BoneJ BoneJ experimental]. For the old ImageJ1 version, see [[BoneJ]].<br />
<br />
This version works with the latest Fiji, and complies with the modern ImageJ [[architecture]]. Most plug-ins also now support hyperstacks, i.e. images with multiple channels or time frames.<br />
<br />
As the code is still experimental, it's still likely to change a lot. This means any scripts using the code might break, results can change, and plug-ins gain and lose parameters. Tools marked with ''WIP'' (work in progress), are more likely to undergo large changes. <br />
<br />
Below is the documentation for the plug-ins included in BoneJ experimental.<br />
<br />
== Installation ==<br />
[[File:Install-bonej.png|400 px|Installation steps]]<br />
# [http://imagej.net/Downloads Download] the latest version of Fiji for your operating system<br />
# Launch Fiji<br />
# Select in the menu ''Help'' &gt; ''Update...''<br />
# Click ''Manage update sites''<br />
# Check ''BoneJ experimental''<br />
# Click ''Close''<br />
# Click ''Apply changes''<br />
After the downloads have finished, close and restart Fiji.<br />
<br />
== Analyse skeleton ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyse skeleton''.<br />
<br />
This plug-in simply includes [[AnalyzeSkeleton]] in BoneJ. It adds some additional validation to check that your image suits the tool. It also skeletonizes your image by calling [[Skeletonize3D]] if needed.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[AnalyzeSkeleton]].<br />
<br />
== Anisotropy ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Anisotropy''.<br />
<br />
Anisotropy is used to quantify the directionality of trabecular bone. It tells whether the trabeculae have a certain orientation, or if they're randomly aligned. The method to measure anisotropy is fairly complex and consists of multiple steps:<br />
<br />
# Find mean intercept length (MIL) vectors from <math>n</math> directions<br />
# Plot MIL vectors into a point cloud<br />
# Solve the equation of an ellipsoid that best fits the point cloud<br />
# Calculate the degree of anisotropy from the radii of the ellipsoid<br />
<br />
It's important to note that algorithm is stochastic and does not guarantee exact results. Thus it's recommended to run it several times to establish the degree of anisotropy in your image.<br />
<br />
[[File:PhaseChanges.png|left|150 px|The red dots mark phase changes]]<br />
<br />
In the first step the algorithm draws parallel lines over the input image in direction <math>\mathbf{v}</math>. The direction is chosen randomly. Each line segment in the image stack is sampled to find points where it changes from background to foreground, i.e. where the line enters an object. The points are called ''phase changes'', in the adjacent figure they're marked with red dots. After the sampling is complete, the algorithm forms a ''MIL vector'', whose length is the total length of the line segments divided by the total number of phase changes found. The MIL vector has the same direction as <math>\mathbf{v}</math>. Drawing and sampling the lines is repeated for <math>n</math> directions, and the method creates <math>n</math> MIL vectors.<br />
<br />
After the MIL vectors have been calculated, they are added to a point cloud (a collection of points) around the origin. Then the method tries solve the equation of an ellipsoid that would fit the cloud. There may be no solution, especially if there are few points. That is, the fitting may fail at which point the plug-in stops. The radii of this ellipsoid determine the degree of anisotropy (see [http://imagej.net/index.php?title=BoneJ_experimental&action=submit#Results results]).<br />
<br />
[[File:MilCube.png|right|200 px|Projecting lines from a plane]]<br />
<br />
In more detail, the lines in the first step are projected from a <math>d * d</math> plane with normal <math>\mathbf{v}</math> (see the adjacent figure). The size <math>d = \sqrt{w^{2} + h^{2} + d^{2}}</math>, where <math>w, h, d</math> are the dimensions of the image stack. Each of the lines originates from a random point <math>\mathbf{o}</math> on the plane. The plane is divided into <math>m * m</math> same-sized sections, where <math>m</math> is a number selected by the user (i.e. ''Lines per dimension''). One origin <math>\mathbf{o}</math> is randomly selected from within each section. The lines are projected until they intercept the stack edges at points <math>\mathbf{o} + t_{min}\mathbf{v}</math>,<math>\mathbf{o} + t_{max}\mathbf{v}</math> (the algorithm solves for <math>t_{min}</math>, <math>t_{max}</math>). These line segments within the stack are then sampled for phase changes. In this drawing method some lines may miss the image stack completely, but conversely there aren't any areas in the stack that don't have an equal chance of being sampled.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
The plug-in is intended to analyse the "texture" of an object thus it suits samples of a larger whole, e.g. a trabecular cube that fills the whole stack. The results for whole objects such as the pre-packaged ''Bat Cochlea Volume'' ImageJ sample image are not really meaningful.<br />
<br />
==== Parameters ====<br />
* '''Directions''': number of times sampling is performed from different directions. The minimum is <math>9</math>, because that's how many independent variables the algorithm needs to solve the "shape" of the orientation in the image.<br />
* '''Lines per dimension''': controls how many parallel lines are drawn per each direction. For example, if ''lines per dimension'' is <math>2</math> then ''Anisotropy'' draws <math>4</math> lines. In this case, the origin points of the lines are randomly selected from within the <math>4</math> equal sections of the sampling plane (see above detailed explanation). The number is squared, because the location of the origins can vary in two dimensions.<br />
<br />
then the plane is divided into <math>4</math> equal sections, and a line is drawn from each. The origin point of each line is randomly located within their section.<br />
* '''Sampling increment''': controls how often each line is sampled. The default is <math>1.0</math>, which means that after each step a unit vector (a <math>1\_px</math> long line) is added to the position along a sampling line. The number of samples taken per line depends on the length of the line segment within the image stack.<br />
* '''Recommended minimum''': if checked, then the above three parameters are set to the recommended minimum values. In our tests we found that with these values the results are quite stable, and fitting unlikely to fail. However, these minimums are not guaranteed to be the best settings for your image.<br />
* '''Show radii''': if checked, then the radii of the fitted ellipsoid are shown in the results table.<br />
<br />
==== Results ====<br />
* '''Degree of anisotropy''': how much orientation there is in the structure. <math>0.0</math> means the image is completely isotropic, the sample has no directionality whatsoever. <math>1.0</math> means there is very strong orientation in the structure of the image. Note that these are theoretical minimum and maximum values. Due the stochastic nature of the algorithm, even an empty stack will have non-zero degree of anisotropy.<br />
* '''Radii of fitted ellipsoid''' (optional): the lengths of the radii <math>a \leq b \leq c</math> of the ellipsoid fitted on the MIL points. Degree of anisotropy <math>= 1.0 - a/c</math>.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* The results of this Anisotropy do not stabilize, so it's not repeated automatically like in BoneJ1. However, the results vary less between runs.<br />
* MIL vectors are drawn differently. In BoneJ1 they're drawn in sphere-shapes around random seed points. Here parallel lines from different directions are drawn through the whole stack. We think this method produces more uniform sampling, i.e. there's less chance of a directional bias.<br />
<br />
==== Related publications ====<br />
* Odgaard A (1997), ''Three-dimensional methods for quantification of cancellous bone architecture'', Bone, 20, 315-328, [http://dx.doi.org/10.1016/S8756-3282(97)00007-0 doi:10.1016/S8756-3282(97)00007-0]<br />
* Harrigan TP, Mann RW (1984), ''Characterization of microstructural anisotropy in orthotropic materials using a second rank tensor'', J Mater Sci, 19, 761-767, [http://dx.doi.org/10.1007/BF00540446 doi:10.1007/BF00540446]<br />
<br />
== Area/Volume fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Area/Volume fraction''<br />
<br />
''Area/Volume fraction'' calculates the fraction of bone in an image by it to the whole image. It counts all the foreground voxels, which it assumes represent bone, and compares them to the total number of voxels in the image. More formally defined, the plug-in calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''. In case of a 2D image, it calculates the fraction ''BA/TA'', which is the area of bone per unit area of the sample.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the bone voxels.<br />
* '''Total volume''': volume of the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 2D/3D subspace in the image, i.e. for each channel and time frame. Results will be for ''area'' if image is 2D.<br />
<br />
==== Differences to BoneJ1 ====<br />
* In BoneJ1 the plug-in was called ''Volume fraction''<br />
* Can process 2D images<br />
* Supports hyperstacks <br />
<br />
== Calibrate SCANCO (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyze &gt; Calibrate SCANCO''<br />
<br />
Applies the ''mg HA/ccm'' pixel value calibration, i.e. ''HU'' or Hounfield unit calibration stored in the .isq format metadata to the image.<br />
<br />
==== Suitable images ====<br />
An .isq format image generated by Scanco X-ray microtomography scanners.<br />
<br />
== Check voxel depth (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Check Voxel Depth''<br />
<br />
Checks whether slice spacing has been calibrated correctly. Some DICOM images contain slice thickness data in the header information, but thickness is not necessarily the same as the physical distance between consecutive slices' positions.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Connectivity ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Connectivity''.<br />
<br />
The Connectivity plug-in is designed to estimate the number of connected structures i.e. trabeculae in a trabecular network. This ''connectivity'' measure is related to a topological number <math>\chi</math> known as ''Euler characteristic'', ''Euler number'' or ''Euler-Poincaré characteristic''. Mathematically defined connectivity is <math>= 1 - (\chi + \Delta\chi)</math>. Roughly speaking, <math>\chi</math> describes the shape or structure of a topological space. It can also be expressed as <math>\chi = objects - handles + cavities</math>, where a handle is a hole that goes through an object (e.g the hole in a doughnut, or the ear of a coffee mug), and a cavity is enclosed inside one. When measuring trabecular cubes, you need to add <math>\Delta\chi</math> to <math>\chi</math> to get a more accurate estimate of the connectivity of the whole network. The term <math>\Delta\chi</math> corrects for the change in the topology of an object, when it's cut to pieces. <br />
<br />
NB some other Euler characteristic implementations report <math>\chi + \Delta\chi</math> as <math>\chi</math>, i.e. in them the correction <math>\Delta\chi</math> is implicit.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary. The plug-in assumes that there is only one particle in the foreground; to achieve this, run ''Purify''. Having more than one object often leads to negative connectivity.<br />
<br />
==== Results ====<br />
* '''Euler characteristic (χ)''': describes the shape of the object(s) in the image, <math>\chi = objects - handles + cavities</math>.<br />
* '''Corrected Euler (χ + Δχ)''': the Euler characteristic of the part corrected for edge effects to fit the whole.<br />
* '''Connectivity''': gives an estimate of the number of connected trabeculae in the image. Equal to <math>1 - (\chi + \Delta\chi)</math>.<br />
* '''Conn. density''': connectivity divided by unit volume. <br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* The old version reported ''Corrected Euler (χ + Δχ)'' incorrectly as ''Δχ''<br />
<br />
==== Related publications ====<br />
* Odgaard A, Gundersen HJG (1993), ''Quantification of connectivity in cancellous bone, with special emphasis on 3-D reconstructions'', Bone 14: 173-182, [http://dx.doi.org/10.1016/8756-3282(93)90245-6 doi:10.1016/8756-3282(93)90245-6.]<br />
* Toriwaki J, Yonekura T (2002), ''Euler number and connectivity indexes of a three dimensional digital picture'', [http://www.scipress.org/journals/forma/abstract/1703/17030183.html Forma 17: 183-209]<br />
<br />
== Delete slice range (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Delete slice range''<br />
<br />
Removes a range of slices from a stack, so that cropping in the Z direction is practical.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Ellipsoid factor (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Ellipsoid factor''.<br />
<br />
Ellipsoid Factor is a new method for measuring rod/plate geometry. It uses the axis lengths from prolate, oblate and intermediate elipsoids to determine how prolate or oblate the trabecular space is at a particular point. Highly prolate (javelin-shaped, rod-like) ellipsoids have a single long axis (<math>c</math>) and two short axes (<math>a, b</math>) such that <math>a < b \ll c</math> , whereas highly oblate (discus-shaped, plate-like) ellipsoids have two longer axes (<math>b, c</math>) and one much shorter axis (<math>a</math>) so that <math>a \ll b < c</math>. Calculating <math>EF</math> as the difference in ratios, <math>EF = a/b - b/c</math> leads to a useful scale ranging from <math>-1</math> (oblate, <math>a/b \approx 0, b/c \approx 1</math>) to <math>+1</math> (prolate, <math>a/b \approx 1, b/c \approx 0</math>). <math>EF</math> of <math>0</math> indicates an intermediate ellipsoid where <math>a/b = b/c</math>, which is the case for spheres (<math>a = b = c</math>) and other ellipsoids with axis ratios <math>a:qa:q^{2}a</math>. Ellipsoid Factor runs [[Skeletonize3D]] to get the medial axis of the trabeculae, which is used as the seed for sampling. Ellipsoids are seeded from each voxel on the medial axis. A combination of dilation, contraction, rotation and a small amount of translation is run iteratively until the ellipsoid increases no further in volume.<br />
<br />
The EF at a point in the structure is determined as the EF of the most voluminous ellipsoid which contains that point.<br />
<br />
If you use Ellipsoid Factor in your work, please cite:<br />
Doube M (2015), ''The Ellipsoid Factor for quantification of rods, plates and intermediate forms in 3D geometries'', Frontiers in Endocrinology, 6:15, [http://journal.frontiersin.org/Journal/10.3389/fendo.2015.00015/abstract doi: 10.3389/fendo.2015.00015]<br />
<br />
==== Suitable images ====<br />
A binary 3D image.<br />
<br />
==== Parameters ====<br />
* '''Sampling increment''': distance between sample points on each vector; should be less than the pixel spacing.<br />
* '''Vectors''': number of vectors to sample at each seed point.<br />
* '''Skeleton points per ellipsoid''': allows dense or sparse sampling, a value of <math>1</math> means that an ellipsoid is sampled at every seed point.<br />
* '''Contact sensitivity''': how many vectors must touch the background before dilation stops.<br />
* '''Maximum iterations''': how hard to try to find larger ellipsoids - fitting will stop if no improvement has been made after this number of iterations..<br />
* '''Maximum drift''': how far the centroid may be displaced from its seed point.<br />
* '''EF image''': stack containing EF values for each point contained by at least one ellipsoid and NaN elsewhere.<br />
* '''Ellipsoid ID image''': stack containing the ID of the biggest ellipsoid at each point, ranked in descending order (<math>0</math> is the largest ellipsoid).<br />
* '''Volume image''': image showing the volume of the largest ellipsoid containing that point.<br />
* '''Axis ratio images''': images showing <math>a/b</math> and <math>b/c</math> ratios foreach point containing at least one ellipsoid and NaN elsewhere.<br />
* '''Flinn peak plot''': plot of <math>a/b</math> vs <math>b/c</math> weighted by volume, so bright pixels indicate relatively more of the structure has that axis ratio.<br />
* '''Gaussian sigma:''' amount to blur the Flinn peak plot - set to <math>0</math> for a precise but less 'beautiful' result.<br />
* '''Flinn plot''': unweighted Flinn plot - every ellipsoid is represented by the same sized point regardless of ellipsoid size.<br />
<br />
==== Results ====<br />
* '''EF image''': stack containing EF values. NaN (not a number) values are used in the background. Summary statistics can be obtained by running Analyze > Histogram<br />
* '''Short-Mid image''': stack containing the <math>a/b</math> ratios<br />
* '''Mid-Long image''': stack contining the <math>b/c</math> ratios<br />
* '''Volume image''': stack containing ellipsoid volumes<br />
* '''Max id image''': stack containing the ID of the largest ellipsoid at each point; IDs relate to the sort order based on volume, so ID = 0 is the largest ellipsoid. <math>-1</math> is foreground and background is labelled with a large negative number.<br />
* '''Flinn diagram''': plot of <math>a/b</math> versus <math>b/c</math> values present in the volume<br />
* '''Weighted Flinn plot''': Flinn diagram with peaks of intensity proportional to volume occupied by each (<math>a/b</math>, <math>b/c</math>) ratio<br />
<br />
==== Related publications ====<br />
Salmon PL, Ohlsson C, Shefelbine SJ, Doube M (2015), ''Structure model index does not measure rods and plates in trabecular bone'', Frontiers in Endocrinology, 6:162, [http://dx.doi.org/10.3389/fendo.2015.00162 doi:10.3389/fendo.2015.00162].<br />
<br />
== Fit ellipsoid ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit ellipsoid''.<br />
<br />
Finds the ellipsoid that best fits a set of point or multi-point ROIs in the ROI Manager. ''Fit ellipsoid'' may fail to fit an ellipsoid. The more points you add, the more likely it is to succeed. Points are scaled to the spatial calibration (voxel widht, height &amp; depth) of the input image.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': ROIs with at least nine points in the ROI Manager.<br />
<br />
==== Results ====<br />
* '''Radii''': the radii ''a'', ''b'' and ''c'' of the fitted ellipsoid. Radius ''a'' is the shortest and ''c'' the longest.<br />
* '''Centroid''': ''x'', ''y'' and ''z'' coordinates of the ellipsoid centre point.<br />
<br />
==== Differences from BoneJ1 ====<br />
* Supports multi-point ROIs.<br />
* Plug-in cancels if an ellipsoid can't be found, instead of reporting invalid results.<br />
<br />
== Fit sphere (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit sphere''.<br />
<br />
Finds the sphere that best fits a set of point ROIs, and optionally displays the image data bounded by the sphere in a new image window. Place a set of point ROIs on structures of interest, hitting [T] to add each point to the ROI Manager. Fit Sphere takes the coordinates of the points from the ROI Manager and applies a least-squares optimisation.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': populated with at least 5 point ROI's<br />
* '''Copy Sphere''': Create a new stack containing image data from within the best-fit sphere.<br />
* '''Padding''': Number of black pixels to put between the sphere and the sides of the image<br />
* '''Inner Cube''': Create a new stack containing image data from the cube that just fits inside the best-fit sphere.<br />
* '''Outer Cube''': Create a new stack containing image data from the cube that the best-fit sphere just fits inside.<br />
* '''Crop Factor''': Radius used for generating new images is multiplied by crop factor so that a bigger or smaller volume can be produced.<br />
* '''Add to ROI Manager''': Add the sphere to the ROI Manager as a set of circular ROIs<br />
* '''Clear ROI Manager''': Clear any existing ROIs in the Manager prior to adding circles<br />
<br />
==== Results ====<br />
* '''X Centroid''': x-coordinate of sphere's centroid<br />
* '''Y Centroid''': y-coordinate of sphere's centroid<br />
* '''Z Centroid''': z-coordinate of sphere's centroid<br />
* '''Radius''': length of radius<br />
* '''Images (optional)''': images containing a copy of the original data within the sphere, or within cubes bounding or bounded by the sphere.<br />
<br />
== Fractal dimension ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fractal dimension''.<br />
<br />
This plug-in estimates the fractal dimension of an image by applying the box-counting algorithm. In this algorithm grids of diminishing size are scanned over the image, and the number of boxes containing at least one foreground voxel is counted. As the box size decreases and the grid becomes finer, the proportion of foreground boxes increases in a fractal structure. See [https://en.wikipedia.org/wiki/Box_counting Wikipedia] for further details. BoneJ uses a fixed-grid scan, with an option to try to find the optimal covering.<br />
<br />
The box counting algorithm produces a pair of <math>(log(n), -log(m))</math> values for each iteration it runs. Here n = number of boxes with foreground, and m = box size. These pairs are passed to a curve-fitting algorithm, which returns the slope of the linear function which describes them ([https://en.wikipedia.org/wiki/Linear_regression regression fit]). The coefficient of this slope is the fractal dimension.<br />
<br />
Fractal dimension is markedly influenced by the parameters selected for the box counting algorithm, so it's worth running it several times with different values to find an accurate measure for your image.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* ''Starting box size (px)'': the size (sides) in pixels of a box in the sampling grid in the first iteration of the algorithm.<br />
* ''Smallest box size (px)'': the minimum size in pixels of a box in the grid. When box size becomes smaller than this limit, the algorithm iterates one more time, and then stops.<br />
* ''Box scaling factor'': the term used to divide the box size after iteration. For example, a scaling factor of <math>2.0</math> halves the size at each step.<br />
* ''Grid translations'': how many times at each iteration the grid is moved to try to the find the optimal covering. The optimal covering covers the objects in the image with the least amount of boxes. The larger the parameter the more likely it is that optimal covering is found. However, this slows down the plug-in considerably.<br />
* ''Automatic parameters'': if checked, then the plug-in runs with default parameters.<br />
* ''Show points'': if checked, then the plug-in displays the <math>(log(n), -log(m))</math> values it calculated. <br />
<br />
==== Results ====<br />
* ''Fractal dimension'': the [https://en.wikipedia.org/wiki/Fractal_dimension fractal dimension] of the image. For example, the Koch snow flake has a fractal dimension of 1.262.<br />
* ''R²'': the [https://en.wikipedia.org/wiki/Coefficient_of_determination coefficient of determination] of the line fitted to the <math>(log(n), -log(m))</math> points.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* Algorithm parameters can be changed by the user.<br />
<br />
==== Related publications ====<br />
Fazzalari NL, Parkinson IH (1996), ''Fractal dimension and architecture of trabecular bone'', J Pathol, 178: 100-5, [http://dx.doi.org/10.1002/(SICI)1096-9896(199601)178:1%3C100::AID-PATH429%3E3.0.CO;2-K doi:10.1002/(SICI)1096-9896(199601)178:1<100::AID-PATH429>3.0.CO;2-K].<br />
<br />
== Inter-trabecular angles ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Inter-trabecular Angles''.<br />
<br />
The plug-in was designed to analyse the angles between trabeculae of cancellous bone. First it calls [[Skeletonize3D]] to thin the input image (if necessary). Then it calls [[AnalyzeSkeleton]], which creates a graph of the largest skeleton (by number of nodes) in the thinned image. The graph consists of nodes and the edges that connect them. Nodes are also known as vertices, and edges as branches. Roughly speaking the edges correspond to trabeculae and the nodes to the junction points, where trabeuculae meet.<br />
<br />
The graph is often not a perfect representation of the trabecular network in the input image. ''Inter-trabecular angles'' offers many options to adjust the graph's topology and filter out artefacts that may obfuscate or skew the results. First it allows you to filter out nodes with too many or too few edges. Secondly it can be used to prune very short edges, which often do not represent actual trabeculae. <br />
<br />
[[File:Ita_types.png|left|150 px|Types of edges in pruning]]<br />
Pruning works differently for different types of edges. There are four kinds: outer, dead-end, inner and short. An outer edge doesn't interconnect different parts of a graph. In other words, one (and only one) of its endpoints connects to only one branch, i.e. the edge itself. In the figure the outer edge is colored black. A dead-end (blue) is an outer edge whose length is less than the minimum set by the user, i.e. it's a short, outer edge. An inner edge (green) connects to end points with more than one branch. A short edge is an inner edge, whose length is less than the set minimum. When a dead-end is pruned, it with its "lonely" end-point are removed from the graph. When a short edge is pruned, it and it's endpoints are removed, and a new node is placed at the midpoint of the former. This new node connects to all the branches the previous nodes connected to.<br />
<br />
''Inter-trabecular angles'' offers two further options to control pruning: ''iteration'' and ''clustering''. Iteration repeats pruning until no new short edges are found. Sometimes pruning can create new short edges, and thus the graph may still have them after one iteration. However, iteration can alter the structure of the graph too dramatically. Clustering searches for all nodes connected by short edges, before removing any. In the figure, clustering pruning would remove the four nodes and the red edges between them in one go. It would create a new node at the center of the previous four, and connect it to the blue and green edges. When pruning is not clustering, it removes edges one-by-one. This changes the end result depending on the order the edges are traversed. Clustering creates the same result each time. <br />
<br />
Pruning also removes loops and redundant parallel edges. The former connects to the same node on both ends, and the latter connects two nodes that are already connected by another edge. <br />
<br />
The pruning and filtering features were added so that we can replicate and continue from the research of [https://doi.org/10.1016/j.actbio.2016.08.040 Reznikov et al.]<br />
<br />
==== Suitable images ====<br />
An 8-bit, binary 2D or 3D image. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
*'''Minimum valence''': minimum number of branches for a node to be included in the analysis.<br />
*'''Maximum valence''': maximum number of branches for a node to be included in the analysis.<br />
*'''Minimum trabecular length (px)''': minimum length for a branch to be preserved in the pruning. Length is calculated as the distance between the endpoints of a branch.<br />
** This length is also displayed in the units of the image calibration<br />
*'''Margin (px)''': minimum distance of a node from image stack edges to be included in the analysis. Having nodes too close to the edges can make the results less accurate, because you get more branches that do not terminate to a node at the other end.<br />
*'''Iterate pruning''': repeat pruning until no more new short branches are discovered. When true, the topology of the graph is likely to change more in the pruning.<br />
*'''Use clusters''': if true then the pruning result is independent of the order in which the graph is traversed. False corresponds with methodology in Reznikov's article. See above for more details.<br />
*'''Print centroids''': Print the centroids (center coordinates) of the node pairs at the ends of each edge.<br />
*'''Print % culled edges''': Print statistics of different types of edges pruned.<br />
<br />
==== Results ====<br />
*'''Inter-trabecular angles''': angles between each branch of each node included in the analysis. Sorted into columns according to the number of branches per node. For example, column ''"3"'' shows the angles between branches of nodes with three branches.<br />
*'''Centroids''' (optional): A table of the center coordinates of the node pairs at the ends of each edge.<br />
*'''Culled edge percentages''' (optional): A table showing the percentages of different kinds of edges pruned, compared to the total number of edges in the analysed graph.<br />
*'''Skeleton''' (optional): if the plug-in had to skeletonise the input image, it displays the result of the thinning.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Inter-trabecular angles generalizes the idea of ''Triple point angles'' for any types of points. It also provides more tools for adjusting the graph for analysis.<br />
<br />
==== Related publications ====<br />
Reznikov, N et al. (2016), ''Inter-trabecular angle: A parameter of trabecular bone architecture in the human proximal femur that reveals underlying topological motifs'', Acta Biomaterialia, 44: 65--72, [https://doi.org/10.1016/j.actbio.2016.08.040 doi:j.actbio.2016.08.040].<br />
<br />
== Thickness ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Thickness''.<br />
<br />
This plug-in includes [[Local_Thickness]] in BoneJ, and provides some additional options &amp; results. Local thickness measures ''the diameter of the largest sphere that fits inside the object and contains the point'' for each point i.e. foreground voxel in an image. The plug-in calculates mean and standard deviation of the trabecular thickness (Tb.Th) or trabecular spacing (Tb.Sp) directly from pixel values in the resulting thickness map. Foreground voxels are considered trabeculae, and background voxels are the spacing. Processing time is heavily dependent on feature size (in pixels); large features can take a very long time to process.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
* '''Calculate''': chooses which thickness maps to calculate - trabecular thickness, trabecular spacing, or both. In order to calculate trabecular spacing, the image voxels are inverted.<br />
* '''Show thickness maps''': display the calculated thickness maps or not.<br />
* '''Mask thickness maps''': remove artifacts from the thickness maps. Artifacts are foreground voxels not present in the original image.<br />
<br />
==== Results ====<br />
* The mean and standard deviation for each thickness map calculated.<br />
* Displays thickness map images if ''Show thickness maps'' was selected. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Calls the latest version of [[Local_Thickness]].<br />
<br />
==== Related publications ====<br />
* Dougherty R, Kunzelmann K (2007), ''Computing local thickness of 3D structures with ImageJ'', Microsc. Microanal., 13: 1678-1679, [http://dx.doi.org/10.1017/S1431927607074430 doi:10.1017/S1431927607074430]<br />
* Hildebrand T, Rüegsegger P (1997), ''A new method for the model-independent assessment of thickness in three-dimensional images'', J. Microsc., 185: 67-75, [http://dx.doi.org/10.1046/j.1365-2818.1997.1340694.x doi:10.1046/j.1365-2818.1997.1340694.x]<br />
<br />
== Moments of inertia (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Moments of Inertia''<br />
<br />
Calculates the three orthogonal principal axes and moments of inertia around those axes. It includes pixels with values between upper and lower limits, which can be defined in terms of unitless grey values or Hounsfield units (HU). It optionally creates a new stack with the image centred and rotated so that the principal axes are parallel to the image stack's x, y and z axes. Calculations are limited to a rectangular ROI if one is drawn. The plugin will guess whether the image is HU calibrated, and if so, apply HU limits of bone (0-4000 HU), otherwise it will calculate auto-thresholds based on the stack's histogram. If a calibration curve is known, the coefficients can be added to get weighted calculations. Aligning a bone with Moments of Inertia may be a useful step prior to Slice Geometry if bones are not aligned with the image z axis.<br />
<br />
==== Suitable images ====<br />
An 8-bit or 16-bit image.<br />
<br />
==== Parameters ====<br />
* '''Start slice''': First slice to include in calculations<br />
* '''End slice''': Last slice to include in calculations<br />
* '''HU Calibrated''': Plugin will guess whether the image is HU calibrated. If image is HU calibrated, make sure the box is checked and enter HU calibrated numeric values in the following fields<br />
* '''Bone Min''': Lower threshold, in either uncalibrated greys or HU<br />
* '''Bone Max''': Upper threshold, in either uncalibrated greys or HU<br />
* '''Slope''': m where physical density = m × pixel value + c<br />
* '''Y Intercept''': c where physical density = m × pixel value + c<br />
* '''Align result''': Draw a new stack with the principal axes parallel to the image axes<br />
* '''Show axes (2D)''': Draw the axes in white on the aligned image<br />
* '''Show axes (3D)''': Display the stack and its principal axes in a 3D Viewer window<br />
<br />
==== Results ====<br />
* '''Image (optional)''': a copy of the input image centered and aligned with the principal axes<br />
* '''Xc''': Centroid x-coordinate (mass-weighted by calibrated density)<br />
* '''Yc''': Centroid y-coordinate<br />
* '''Zc''': Centroid z-coordinate<br />
* '''Vol''': Total volume of thresholded voxels<br />
* '''Mass''': Mass of bone, from pixel values and density calibration coefficients<br />
* '''Icxx''': Moment around x axis passing through centroid<br />
* '''Icyy''': Moment around y axis passing through centroid<br />
* '''Iczz''': Moment around z axis passing through centroid<br />
* '''Icxy''': Off-axis term for constructing inertia tensor<br />
* '''Icxz''': Off-axis term for constructing inertia tensor<br />
* '''Icyz''': Off-axis term for constructing inertia tensor<br />
* '''I1''': Moment around the shortest principal axis<br />
* '''I2''': Moment around the middle principal axis<br />
* '''I3''': Moment around the longest principal axis<br />
* '''Verbose output in Log window'''<br />
** '''Eigenvalues''': Result of of eigenvalue decomposition. Moments of inertia<br />
** '''Eigenvectors of principal axes''': orientation of input image<br />
** '''Inverse eigenvector matrix''': used to map voxel positions in the aligned image back to voxel positions in the original image<br />
* Optional 3D display of principal axes<br />
<br />
== Optimise threshold (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Optimise Threshold''<br />
<br />
Several histogram-based methods exist for automatic determination of threshold for binary segmentation, but in ImageJ these are currently limited to pixel values in a single slice. The result can be excluding high values in a stack that are higher than the highest value in the current slice. This plugin uses all the pixels in a stack to construct a histogram and uses ImageJ's built-in isodata algorithm to determine the threshold. It optionally tests values either side of the initial auto-threshold for connectivity, because connectivity is very sensitive to image noise. The plugin attempts to find the threshold that results in minimal connectivity. Purification, erosion and dilation can improve the connectivity estimate, so Purify is always called, and erosion and dilation are applied as part of a sequence: purify, erode, purify, dilate.<br />
<br />
==== Suitable images ====<br />
An 8-bit of 16-bit image<br />
<br />
==== Parameters ====<br />
* '''Threshold Only''': Determine the threshold from the stack histogram only<br />
* '''Apply Threshold''': Replace the input image with a thresholded version<br />
* '''Show Plot''': Display a graph showing connectivity versus threshold<br />
* '''Tests''': Number of different thresholds to test for connectivity<br />
* '''Range''': Proportion of the initial threshold to test above and below initial thresholds<br />
* '''Subvolume Size''': Size of the volume to test for connectivity. Set small for a faster run and large to test the whole stack<br />
* '''Erosion Cycles''': Number of times to erode the stack after initial purification<br />
* '''Dilation Cycles''': Number of times to dilate the stack after secondary purification<br />
<br />
==== Results ====<br />
* '''Thresholded stack (optional)'''<br />
* '''Plot of connectivity versus threshold (optional)'''<br />
* '''Log of optimal threshold value'''<br />
<br />
== Orientation (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Orientation''<br />
<br />
Sets the direction in a 2D image, without rotating the image or changing it in any way. ''Slice Geometry'' (see below) uses ''Orientation'' to calculate diameter, second moments of area and section moduli around anatomic axes set by the user.<br />
<br />
==== Suitable images ====<br />
A 2D image.<br />
<br />
==== Parameters ====<br />
* '''Orientation''': input field displays current orientation (clockwise from 12 o'clock) and takes keyboard input<br />
* '''deg / rad''': display and set orientation in degrees or radians<br />
* '''Principal direction''': the main direction, the head of which is displayed in red<br />
* '''Secondary direction''': the orthogonal direction<br />
* '''Reflect''': swap the labels on this axis<br />
<br />
==== Results ====<br />
* '''Orientation axes''': draws the axes of the orientation on the image.<br />
<br />
== Purify (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Purify''<br />
<br />
Purify locates all particles in 3D and removes all but the largest foreground and background particles.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary.<br />
<br />
==== Parameters ====<br />
* '''Labelling algorithm''':<br />
** '''Mapped''': Non-recursive, memory efficient and fast.<br />
** '''Multithreaded''': use multiple cores and job chunking to reduce recursion. Fast on small stacks and if you have many CPU cores.<br />
** '''Linear''': Non-recursive but heavy on RAM and single-threaded. Fast on big stacks, but only if you have the memory.<br />
* '''Chunk Size''': number of slices to use in each particle labelling thread. If images are large, set this to 2<br />
* '''Performance Log''': Show verbose performance information to help tune your system<br />
* '''Make copy''': If checked, shows the result in a new window; if unchecked the result replaces the original image.<br />
<br />
==== Results ====<br />
* '''Performance metrics (optional)'''<br />
** '''Threads''': Number of CPU cores used<br />
** '''Slices''': Number of slices in the input image stack<br />
** '''Chunks''': Number of chunks of slices, each chunk is processed independently<br />
** '''Chunk size''': Number of slices per chunk<br />
** '''Last chunk size''': size of the last chunk (the remainder chunk)<br />
** '''Duration''': time in seconds to complete purification<br />
* '''Purified image''': optionally in a new image window.<br />
<br />
== Skeletonise ==<br />
Menu path ''Plugins &gt; BoneJ &gt;Skeletonise''.<br />
<br />
This plug-in simply includes [[Skeletonize3D]] in BoneJ. It adds some additional validation to check that your image suits the tool.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[Skeletonize3D]].<br />
<br />
== Slice geometry (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Slice Geometry''<br />
<br />
Slice Geometry calculates cross-sectional geometric properties of shapes: cross-sectional area, centroid, mean density, second moment of area, section modulus, Feret diameter and local thickness (2D and 3D). Measurements can be limited to a rectangular ROI. If your bone is not well aligned with the image axes, you may find it useful to align the bone to its principal axes using Moments of Inertia or by exporting a transformed volume from the ImageJ 3D Viewer. Importantly, no assumption of geometry is made for any of the measurements.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Bone''': Slice Geometry will guess from your image title the bone it is working on. If it is wrong, correct it. If your bone of interest isn't listed, email me.<br />
* '''2D Thickness''': Run Thickness on a per-slice basis; this fits circles rather than spheres<br />
* '''3D Thickness''': Run Thickness on the whole stack, fitting spheres, then report results per slice<br />
* '''Draw Axes''': Draw axes on an annotated copy of the stack<br />
* '''Draw Centroids''': Draw centroids on an annotated copy of the stack<br />
* '''Annotated Copy (2D)''': Create a new stack showing the centroids and principal axes<br />
* '''3D Annotation''': Display the stack, principal axes and centroids in the 3D viewer<br />
* '''Process Stack''': Calculate parameters for all slices in the stack<br />
* '''Clear Results''': Remove all data in the results table without saving, prior to calculating parameters<br />
* '''Use Orientation''': Also calculate parameters based on directions defined in Orientation<br />
* '''HU Calibrated''': Allows you to enter your thresholds in Hounsfield units (HU) or uncalibrated units<br />
* '''Bone Min''': minimum pixel value to use in calculations<br />
* '''Bone Max''': maximum pixel value to use in calculations<br />
* '''Slope''': <math>m</math> where physical density <math>= m * pixel value + c</math><br />
* '''Y Intercept''': <math>c</math> where physical density <math>= m * pixel value + c</math><br />
* '''Note''': density-weighted calculations are only applied to centroid determination at present<br />
* '''Partial volume compensation''': Use model that assumes Gaussian blur of imaging modality and linear transform between pixel value and sample 'density' to correct for blurred and pixelated images (e.g. small bone in clinical CT)<br />
* '''Background''': pixel value that corresponds to zero bone density (could be the 'fat', 'air' or 'muscle' pixel value)<br />
* '''Foreground''': pixel value that corresponds to 100% bone density<br />
* '''A rectangular ROI (optional)''': if there's a ROI, calculations are limited to its area.<br />
<br />
==== Results ====<br />
* '''Images (optional)''': displays the result images selected in the parameters<br />
* '''Bone code''': Unique numeric identifier for the anatomic name of each bone. Further bone codes can be added to BoneJ on request<br />
* '''Slice''': slice number indicating which slice contributed image data for this row of the results<br />
* '''CSA''': cross-sectional area<br />
* '''X cent.''': Centroid x-coordinate<br />
* '''Y cent.''': Centroid y-coordinate<br />
* '''Density''': mean physical density, calculated from pixel values and calibration coefficients<br />
* '''wX cent''': Density-weighted x-coordinate of centroid<br />
* '''wY cent''': Density-weighted y-coordinate of centroid<br />
* '''Theta''': angle of minor axis (axis for Imin, the long axis of your specimen's cross section) from the horizontal, ranging from <math>-\pi/2</math> to <math>\pi/2</math>, with positive as clockwise<br />
* '''R1''': maximum chord length from minor axis<br />
* '''R2''': maximum chord length from major axis<br />
* '''Imin''': Second moment of area around major axis<br />
* '''Imax''': Second moment of area around minor axis<br />
* '''Ipm''': Product moment of area (= 0 if no errors are present, e.g. due to pixelation)<br />
* '''Zmax''': Section modulus around major axis (Imax / R2)<br />
* '''Zmin''': Section modulus around minor axis (Imin / R1)<br />
* '''Zpol''': Polar section modulus<br />
* '''Feret Min''': Minimum caliper width<br />
* '''Feret Max''': Maximum caliper width<br />
* '''Feret Angle''': Orientation of maximum caliper width<br />
* '''Perimeter''': Distance around external surface<br />
* '''Max Thick 2D''': Maximum thickness determined by local thickness in 2D<br />
* '''Mean Thick 2D''': Mean thickness determined by local thickness in 2D<br />
* '''SD Thick 2D''': Standard deviation of the mean thickness determined by local thickness in 2D<br />
* '''Max Thick 3D''': Maximum thickness in this slice determined by local thickness in 3D<br />
* '''Mean Thick 3D''': Mean thickness in this slice determined by local thickness in 3D<br />
* '''SD Thick 3D''': Standard deviation of the mean thickness in this slice determined by local thickness in 3D Directional measurements, using Orientation directions, and the specimen's slice centroid<br />
* '''A (rad)''': Principal orientation (direction A)<br />
* '''B (rad)''': Secondary orientation (direction B)<br />
* '''IAa''': Second moment of area around Aa axis<br />
* '''IBb''': Second moment of area around Bb axis<br />
* '''ZAa''': Section modulus around Aa axis<br />
* '''ZBb''': Section modulus around Bb axis<br />
* '''RAa''': maximum chord length from Aa axis<br />
* '''RBb''': maximum chord length from Bb axis<br />
* '''DAa''': Calliper diameter in direction of Aa<br />
* '''DBb''': Calliper diameter in direction of Bb<br />
<br />
== Surface area ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Surface area''<br />
<br />
''Surface area'' creates a mesh from the bone in the image, and then calculates the area of the surface of the mesh. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Export STL file(s)''': if checked, then the meshes created from the image are saved as .stl-files. A dialog opens for you to select a folder for the files.<br />
<br />
==== Results ====<br />
* '''Surface area''': the surface area of the bone mesh<br />
* '''STL-file''': the mesh created from the bone image<br />
<br />
The surface area is reported and an .stl-file saved separately for each 3D subspace in the image. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Isosurface''<br />
<br />
== Surface fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Surface fraction''<br />
<br />
''Surface fraction'' calculates the fraction of bone volume in an image by comparing meshes created from bone particles and the whole image. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone. <br />
<br />
More formally defined, ''Surface fraction'' calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary.<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the mesh created from bone voxels.<br />
* '''Total volume''': volume of the mesh created from the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Volume fraction''<br />
<br />
== Results table ==<br />
The BoneJ plug-ins print their results into a shared result table. This is because we often need to calculate several measures for the same image, so it's handy to have them on one row. Repeated measures for the same image are reported on different rows. The results persist even if the table is closed. To clear the table run ''Plugins &gt; BoneJ &gt; Table &gt; Clear BoneJ results''.<br />
<br />
Note that some of the plug-ins (marked with ''WIP'') still use a ImageJ1 style results table that works slightly differently. As they are modernized they'll move to use the same new table as the others.<br />
<br />
== Usage reporting ==<br />
Menu path '' Edit &gt; Options &gt; BoneJ Usage (Modern | Legacy)''<br />
<br />
==== What is collected? ====<br />
<br />
BoneJ uses Google Analytics to report when a plugin's run() method completes successfully.<br />
<br />
<code><br />
ht<span>tp://</span>www.google-analytics.com/__utm.gif?utmwv=5.2.5&utms=0&utmn=1074354874&utmhn=bonej.org&utmt=event&utme=5(Plugin%20Usage*org.bonej.wrapperPlugins.wrapperUtils.UsageReporterOptions*0.5.1)&utmcs=UTF-8&utmsr=3840x1080&utmvp=3840x1080&utmsc=24-bit&utmul=en-gb&utmje=0&utmcn=1&utmdt=bonej.org%20Usage%20Statistics&utmhid=512699200&utmr=-&utmp=%2Fstats&utmac=UA-366405-8&utmcc=__utma%3D1589599318.1327557233.1538550102.1538550102.1538550102.2%3B%2B__utmz%3D1589599318.1538550102.79.42.utmcsr%3Dgoogle%7Cutmccn%3D(organic)%7Cutmcmd%3Dorganic%7Cutmctr%3DBoneJ%20Usage%20Reporter%3B<br />
</code><br />
<br />
A one-pixel GIF image is requested from Google, with a rather long set of parameters. Reported details are:<br />
<br />
* A unique ID which is stored in your ImageJ preferences between sessions<br />
* Your screen resolution<br />
* The name of the plugin's Java class<br />
* The version of BoneJ<br />
* The first time, last time and current time you ran a BoneJ plugin<br />
* Your system language and character map<br />
* Google also records your IP address as all webservers do in their logs<br />
* Some of these values are saved in your preferences<br />
* Your operating system and Java version are reported in the user agent ID<br />
<br />
==== What does the report look like? ====<br />
<br />
Data are collated with the Analytics report already used to track hits on bonej.org.<br />
<br />
==== For what is the data used? ====<br />
<br />
So far, BoneJ has been supported mainly by grants to scientists. We wish to create quantitative reports that detail how much BoneJ is being used in the community, so that decisions to fund further development can be made rationally.<br />
<br />
In addition, development resources are limited so it is useful to see which features are used heavily and can be consolidated, while little-used features can be abandoned or made more useful.<br />
<br />
==== That is noble but my work is top secret ====<br />
<br />
If you are uncomfortable with this level of data collection then please opt out, at the dialog which is prompted on first run, or by running '' Edit &gt; Options &gt; BoneJ Usage (Modern | Legacy) ''. Hitting Cancel (Legacy) or unchecking the box (Modern) will prevent any report from being gathered or sent and will also clear any values that were previously saved.<br />
<br />
You can opt back in by running '' Edit &gt; Options &gt; BoneJ Usage (Modern | Legacy)'', checking the box (Modern only) and hitting OK.<br />
<br />
==== Can I see the report? ====<br />
<br />
At the moment the report is kept private. If there is a strong will from the user community, who created the data in the first place, the report could be made more open. Please feel free to discuss on the user forum.<br />
<br />
==== How is it implemented? ====<br />
<br />
You can read the code on Github and in every copy of BoneJ. If you turn on ImageJ's debug mode (in '' Edit &gt; Options &gt; Misc. '') the URL and the GIF response will be logged to ImageJ's log window.<br />
<br />
== Where is my favourite plug-in? ==<br />
We have removed some plug-ins from BoneJ. ''Neck shaft angle'', ''Plateness'' and ''Structure model index'' have been discontinued. ''Interpolate ROIs'', [http://imagej.net/3D_Binary_Filters ''Dilate 3D'' and ''Erode 3D''] come pre-packaged with ImageJ, so they are no longer included in BoneJ2.<br />
<br />
Support for ''Kontron IMG'', ''Scanco ISQ'' and ''Stratec pQCT'' file formats has been moved to [[SCIFIO]]. Just run ''Edit &gt; Options &gt; ImageJ2'', and check ''Use SCIFIO when opening files''. When the option is enabled, these kinds of files can be opened from ''File > Open'' or dragging &amp; dropping them like any other format. <br />
<br />
''Distribution analysis'' and other pQCT related tools can now be downloaded independently from the [[PQCT]] update site.<br />
<br />
== Licence ==<br />
BoneJ2 is free, open-source software. You can redistribute it and/or modify it under the terms of the [https://github.com/bonej-org/BoneJ2/blob/master/LICENCE.md BSD 2-clause licence]. The software is provided "as is" and any warranties are disclaimed. In no event shall the copyright holder or contributors be liable.<br />
<br />
== Citation ==<br />
If you'd like to cite the software, we will soon publish a paper about BoneJ experimental. You can read the draft (and send us your feedback) as we're writing it [https://v1.overleaf.com/read/yxdkwpcdkjzj for Wellcome Open Research on Overleaf]. We recommend you cite the specific release used in your research.<br />
<br />
== Funding ==<br />
The redesign and porting effort to create BoneJ2 was supported by a [https://wellcome.ac.uk/what-we-do/directories/biomedical-resource-technology-development-grants-people-funded Wellcome Trust Biomedical Resource and Technology Development Grant]. Interaction with [[SciView]] was assisted by a [https://royalsociety.org/grants-schemes-awards/grants/international-exchanges/ Royal Society International Exchange grant].</div>Mdoubehttps://imagej.net/index.php?title=Downloads&diff=38724Downloads2018-11-16T09:38:02Z<p>Mdoube: /* Distributions of ImageJ */</p>
<hr />
<div>{{TOC|right}}Here you can [https://downloads.imagej.net/ImageJ2-20160205.zip download] an "all platforms" version of ImageJ, without a bundled Java or extra extensions.<br />
<br />
{{Notice | Unfortunately, due to the ongoing transition from Java 6 to Java 8, this download of "plain ImageJ2" cannot currently be updated to the latest Java-8-compatible version. See the [[Java 8]] page for details. For the time being, we recommend [[Fiji/Downloads|using the Fiji distribution of ImageJ]] to stay current with updates.}}<br />
<br />
<div style="width: 440px"><br />
{{Box |<br />
| bgcolor=white<br />
| text=<center><br />
[[File:Imagej2-download-icon.png | link=https://downloads.imagej.net/ImageJ2-20160205.zip | 192px ]]<br />
</center><br />
}}<br />
<br />
</div><br />
<br />
= Distributions of ImageJ =<br />
<br />
These downloads bundle ImageJ with a curated collection of plugins pre-installed.<br />
<br />
<div style="float: left; padding: 1em; text-align:center; font-size:1.5em">[[File:Fiji-icon.png|x96px|link=Fiji/Downloads]]<br>[[Fiji/Downloads|Fiji]]</div><br />
<div style="float: left; padding: 1em; text-align:center; font-size:1.5em">[[File:Bio7-icon.png|x96px|link=Bio7]]<br>[[Bio7]]</div><br />
{{Clear}}<br />
<br />
= System requirements =<br />
<br />
ImageJ will run on any system that has a Java 8 (or later) runtime installed. This includes, but is not limited to:<br />
<br />
# Windows XP, Vista, 7 or 8 with Java installed from [https://java.com/ java.com]<br />
# Mac OS X 10.8 "Mountain Lion" or later with Java installed from [https://java.com/ java.com]<br />
# Ubuntu Linux 12.04 LTS or later with OpenJDK 8 installed<br />
<br />
= Installation =<br />
{{AvoidProgramFiles}}<br />
ImageJ is distributed as a [[wikipedia:Portable application|portable application]]. That means that you do not have to run an installer; just download, unpack and start it.<br />
<br />
= Troubleshooting =<br />
<br />
* Many common questions are answered on the [[FAQ]] and [[Troubleshooting]] pages.<br />
* If you encounter bugs, please see the [[Help|Getting Help]] page.<br />
<br />
= Source code =<br />
<br />
See the [[source code]] page for details on obtaining the ImageJ source code.<br />
<br />
== See also ==<br />
* [[ImageJ2 development releases]] for early versions of [[ImageJ2]].<br />
* [http://imagej.net/download/ ImageJ1 download archive] for old versions of [[ImageJ1|ImageJ 1.x]].</div>Mdoubehttps://imagej.net/index.php?title=Thickness&diff=38614Thickness2018-10-11T03:56:32Z<p>Mdoube: Redirected page to BoneJ2#Thickness</p>
<hr />
<div>#REDIRECT [[BoneJ2#Thickness]]</div>Mdoubehttps://imagej.net/index.php?title=BoneJ2&diff=38613BoneJ22018-10-11T03:56:04Z<p>Mdoube: /* Thickness */</p>
<hr />
<div>{{Infobox<br />
| name = BoneJ2<br />
| software = ImageJ<br />
| logo = [[File:Bonej-icon.png|96px]]<br />
| author = {{Person|Michaeldoube}}, {{Person|Rdom}}, {{Person|Alessandrofelder}}<br />
| maintainer = {{Person|Michaeldoube}}, {{Person|Alessandrofelder}}<br />
| source = {{GitHub|org=bonej-org|repo=BoneJ2}}, [https://doi.org/10.5281/zenodo.1427262 doi:10.5281/zenodo.1427262]<br />
| released = Dec 11<sup>th</sup>, 2017<br />
| latest version = cuneiform-experimental-patch2, Sep 24<sup>th</sup>, 2018<br />
| status = Active, Experimental<br />
}}<br />
BoneJ is a collection of skeletal biology plug-ins for ImageJ.<br />
This is the new experimental, modernized version of the software available through the ImageJ [http://imagej.net/Updater updater]. Its update site is called [http://sites.imagej.net/BoneJ BoneJ experimental]. For the old ImageJ1 version, see [[BoneJ]].<br />
<br />
This version works with the latest Fiji, and complies with the modern ImageJ [[architecture]]. Most plug-ins also now support hyperstacks, i.e. images with multiple channels or time frames.<br />
<br />
As the code is still experimental, it's still likely to change a lot. This means any scripts using the code might break, results can change, and plug-ins gain and lose parameters. Tools marked with ''WIP'' (work in progress), are more likely to undergo large changes. <br />
<br />
Below is the documentation for the plug-ins included in BoneJ experimental.<br />
<br />
== Installation ==<br />
[[File:Install-bonej.png|400 px|Installation steps]]<br />
# [http://imagej.net/Downloads Download] the latest version of Fiji for your operating system<br />
# Launch Fiji<br />
# Select in the menu ''Help'' &gt; ''Update...''<br />
# Click ''Manage update sites''<br />
# Check ''BoneJ experimental''<br />
# Click ''Close''<br />
# Click ''Apply changes''<br />
After the downloads have finished, close and restart Fiji.<br />
<br />
== Analyse skeleton ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyse skeleton''.<br />
<br />
This plug-in simply includes [[AnalyzeSkeleton]] in BoneJ. It adds some additional validation to check that your image suits the tool. It also skeletonizes your image by calling [[Skeletonize3D]] if needed.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[AnalyzeSkeleton]].<br />
<br />
== Anisotropy ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Anisotropy''.<br />
<br />
Anisotropy is used to quantify the directionality of trabecular bone. It tells whether the trabeculae have a certain orientation, or if they're randomly aligned. The method to measure anisotropy is fairly complex and consists of multiple steps:<br />
<br />
# Find mean intercept length (MIL) vectors from <math>n</math> directions<br />
# Plot MIL vectors into a point cloud<br />
# Solve the equation of an ellipsoid that best fits the point cloud<br />
# Calculate the degree of anisotropy from the radii of the ellipsoid<br />
<br />
It's important to note that algorithm is stochastic and does not guarantee exact results. Thus it's recommended to run it several times to establish the degree of anisotropy in your image.<br />
<br />
[[File:PhaseChanges.png|left|150 px|The red dots mark phase changes]]<br />
<br />
In the first step the algorithm draws parallel lines over the input image in direction <math>\mathbf{v}</math>. The direction is chosen randomly. Each line segment in the image stack is sampled to find points where it changes from background to foreground, i.e. where the line enters an object. The points are called ''phase changes'', in the adjacent figure they're marked with red dots. After the sampling is complete, the algorithm forms a ''MIL vector'', whose length is the total length of the line segments divided by the total number of phase changes found. The MIL vector has the same direction as <math>\mathbf{v}</math>. Drawing and sampling the lines is repeated for <math>n</math> directions, and the method creates <math>n</math> MIL vectors.<br />
<br />
After the MIL vectors have been calculated, they are added to a point cloud (a collection of points) around the origin. Then the method tries solve the equation of an ellipsoid that would fit the cloud. There may be no solution, especially if there are few points. That is, the fitting may fail at which point the plug-in stops. The radii of this ellipsoid determine the degree of anisotropy (see [http://imagej.net/index.php?title=BoneJ_experimental&action=submit#Results results]).<br />
<br />
[[File:MilCube.png|right|200 px|Projecting lines from a plane]]<br />
<br />
In more detail, the lines in the first step are projected from a <math>d * d</math> plane with normal <math>\mathbf{v}</math> (see the adjacent figure). The size <math>d = \sqrt{w^{2} + h^{2} + d^{2}}</math>, where <math>w, h, d</math> are the dimensions of the image stack. Each of the lines originates from a random point <math>\mathbf{o}</math> on the plane. The plane is divided into <math>m * m</math> same-sized sections, where <math>m</math> is a number selected by the user (i.e. ''Lines per dimension''). One origin <math>\mathbf{o}</math> is randomly selected from within each section. The lines are projected until they intercept the stack edges at points <math>\mathbf{o} + t_{min}\mathbf{v}</math>,<math>\mathbf{o} + t_{max}\mathbf{v}</math> (the algorithm solves for <math>t_{min}</math>, <math>t_{max}</math>). These line segments within the stack are then sampled for phase changes. In this drawing method some lines may miss the image stack completely, but conversely there aren't any areas in the stack that don't have an equal chance of being sampled.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
The plug-in is intended to analyse the "texture" of an object thus it suits samples of a larger whole, e.g. a trabecular cube that fills the whole stack. The results for whole objects such as the pre-packaged ''Bat Cochlea Volume'' ImageJ sample image are not really meaningful.<br />
<br />
==== Parameters ====<br />
* '''Directions''': number of times sampling is performed from different directions. The minimum is <math>9</math>, because that's how many independent variables the algorithm needs to solve the "shape" of the orientation in the image.<br />
* '''Lines per dimension''': controls how many parallel lines are drawn per each direction. For example, if ''lines per dimension'' is <math>2</math> then ''Anisotropy'' draws <math>4</math> lines. In this case, the origin points of the lines are randomly selected from within the <math>4</math> equal sections of the sampling plane (see above detailed explanation). The number is squared, because the location of the origins can vary in two dimensions.<br />
<br />
then the plane is divided into <math>4</math> equal sections, and a line is drawn from each. The origin point of each line is randomly located within their section.<br />
* '''Sampling increment''': controls how often each line is sampled. The default is <math>1.0</math>, which means that after each step a unit vector (a <math>1\_px</math> long line) is added to the position along a sampling line. The number of samples taken per line depends on the length of the line segment within the image stack.<br />
* '''Recommended minimum''': if checked, then the above three parameters are set to the recommended minimum values. In our tests we found that with these values the results are quite stable, and fitting unlikely to fail. However, these minimums are not guaranteed to be the best settings for your image.<br />
* '''Show radii''': if checked, then the radii of the fitted ellipsoid are shown in the results table.<br />
<br />
==== Results ====<br />
* '''Degree of anisotropy''': how much orientation there is in the structure. <math>0.0</math> means the image is completely isotropic, the sample has no directionality whatsoever. <math>1.0</math> means there is very strong orientation in the structure of the image. Note that these are theoretical minimum and maximum values. Due the stochastic nature of the algorithm, even an empty stack will have non-zero degree of anisotropy.<br />
* '''Radii of fitted ellipsoid''' (optional): the lengths of the radii <math>a \leq b \leq c</math> of the ellipsoid fitted on the MIL points. Degree of anisotropy <math>= 1.0 - a/c</math>.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* The results of this Anisotropy do not stabilize, so it's not repeated automatically like in BoneJ1. However, the results vary less between runs.<br />
* MIL vectors are drawn differently. In BoneJ1 they're drawn in sphere-shapes around random seed points. Here parallel lines from different directions are drawn through the whole stack. We think this method produces more uniform sampling, i.e. there's less chance of a directional bias.<br />
<br />
==== Related publications ====<br />
* Odgaard A (1997), ''Three-dimensional methods for quantification of cancellous bone architecture'', Bone, 20, 315-328, [http://dx.doi.org/10.1016/S8756-3282(97)00007-0 doi:10.1016/S8756-3282(97)00007-0]<br />
* Harrigan TP, Mann RW (1984), ''Characterization of microstructural anisotropy in orthotropic materials using a second rank tensor'', J Mater Sci, 19, 761-767, [http://dx.doi.org/10.1007/BF00540446 doi:10.1007/BF00540446]<br />
<br />
== Area/Volume fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Area/Volume fraction''<br />
<br />
''Area/Volume fraction'' calculates the fraction of bone in an image by it to the whole image. It counts all the foreground voxels, which it assumes represent bone, and compares them to the total number of voxels in the image. More formally defined, the plug-in calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''. In case of a 2D image, it calculates the fraction ''BA/TA'', which is the area of bone per unit area of the sample.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the bone voxels.<br />
* '''Total volume''': volume of the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 2D/3D subspace in the image, i.e. for each channel and time frame. Results will be for ''area'' if image is 2D.<br />
<br />
==== Differences to BoneJ1 ====<br />
* In BoneJ1 the plug-in was called ''Volume fraction''<br />
* Can process 2D images<br />
* Supports hyperstacks <br />
<br />
== Calibrate SCANCO (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyze &gt; Calibrate SCANCO''<br />
<br />
Applies the ''mg HA/ccm'' pixel value calibration, i.e. ''HU'' or Hounfield unit calibration stored in the .isq format metadata to the image.<br />
<br />
==== Suitable images ====<br />
An .isq format image generated by Scanco X-ray microtomography scanners.<br />
<br />
== Check voxel depth (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Check Voxel Depth''<br />
<br />
Checks whether slice spacing has been calibrated correctly. Some DICOM images contain slice thickness data in the header information, but thickness is not necessarily the same as the physical distance between consecutive slices' positions.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Connectivity ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Connectivity''.<br />
<br />
The Connectivity plug-in is designed to estimate the number of connected structures i.e. trabeculae in a trabecular network. This ''connectivity'' measure is related to a topological number <math>\chi</math> known as ''Euler characteristic'', ''Euler number'' or ''Euler-Poincaré characteristic''. Mathematically defined connectivity is <math>= 1 - (\chi + \Delta\chi)</math>. Roughly speaking, <math>\chi</math> describes the shape or structure of a topological space. It can also be expressed as <math>\chi = objects - handles + cavities</math>, where a handle is a hole that goes through an object (e.g the hole in a doughnut, or the ear of a coffee mug), and a cavity is enclosed inside one. When measuring trabecular cubes, you need to add <math>\Delta\chi</math> to <math>\chi</math> to get a more accurate estimate of the connectivity of the whole network. The term <math>\Delta\chi</math> corrects for the change in the topology of an object, when it's cut to pieces. <br />
<br />
NB some other Euler characteristic implementations report <math>\chi + \Delta\chi</math> as <math>\chi</math>, i.e. in them the correction <math>\Delta\chi</math> is implicit.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary. The plug-in assumes that there is only one particle in the foreground; to achieve this, run ''Purify''. Having more than one object often leads to negative connectivity.<br />
<br />
==== Results ====<br />
* '''Euler characteristic (χ)''': describes the shape of the object(s) in the image, <math>\chi = objects - handles + cavities</math>.<br />
* '''Corrected Euler (χ + Δχ)''': the Euler characteristic of the part corrected for edge effects to fit the whole.<br />
* '''Connectivity''': gives an estimate of the number of connected trabeculae in the image. Equal to <math>1 - (\chi + \Delta\chi)</math>.<br />
* '''Conn. density''': connectivity divided by unit volume. <br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* The old version reported ''Corrected Euler (χ + Δχ)'' incorrectly as ''Δχ''<br />
<br />
==== Related publications ====<br />
* Odgaard A, Gundersen HJG (1993), ''Quantification of connectivity in cancellous bone, with special emphasis on 3-D reconstructions'', Bone 14: 173-182, [http://dx.doi.org/10.1016/8756-3282(93)90245-6 doi:10.1016/8756-3282(93)90245-6.]<br />
* Toriwaki J, Yonekura T (2002), ''Euler number and connectivity indexes of a three dimensional digital picture'', [http://www.scipress.org/journals/forma/abstract/1703/17030183.html Forma 17: 183-209]<br />
<br />
== Delete slice range (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Delete slice range''<br />
<br />
Removes a range of slices from a stack, so that cropping in the Z direction is practical.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Ellipsoid factor (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Ellipsoid factor''.<br />
<br />
Ellipsoid Factor is a new method for measuring rod/plate geometry. It uses the axis lengths from prolate, oblate and intermediate elipsoids to determine how prolate or oblate the trabecular space is at a particular point. Highly prolate (javelin-shaped, rod-like) ellipsoids have a single long axis (<math>c</math>) and two short axes (<math>a, b</math>) such that <math>a < b \ll c</math> , whereas highly oblate (discus-shaped, plate-like) ellipsoids have two longer axes (<math>b, c</math>) and one much shorter axis (<math>a</math>) so that <math>a \ll b < c</math>. Calculating <math>EF</math> as the difference in ratios, <math>EF = a/b - b/c</math> leads to a useful scale ranging from <math>-1</math> (oblate, <math>a/b \approx 0, b/c \approx 1</math>) to <math>+1</math> (prolate, <math>a/b \approx 1, b/c \approx 0</math>). <math>EF</math> of <math>0</math> indicates an intermediate ellipsoid where <math>a/b = b/c</math>, which is the case for spheres (<math>a = b = c</math>) and other ellipsoids with axis ratios <math>a:qa:q^{2}a</math>. Ellipsoid Factor runs [[Skeletonize3D]] to get the medial axis of the trabeculae, which is used as the seed for sampling. Ellipsoids are seeded from each voxel on the medial axis. A combination of dilation, contraction, rotation and a small amount of translation is run iteratively until the ellipsoid increases no further in volume.<br />
<br />
The EF at a point in the structure is determined as the EF of the most voluminous ellipsoid which contains that point.<br />
<br />
If you use Ellipsoid Factor in your work, please cite:<br />
Doube M (2015), ''The Ellipsoid Factor for quantification of rods, plates and intermediate forms in 3D geometries'', Frontiers in Endocrinology, 6:15, [http://journal.frontiersin.org/Journal/10.3389/fendo.2015.00015/abstract doi: 10.3389/fendo.2015.00015]<br />
<br />
==== Suitable images ====<br />
A binary 3D image.<br />
<br />
==== Parameters ====<br />
* '''Sampling increment''': distance between sample points on each vector; should be less than the pixel spacing.<br />
* '''Vectors''': number of vectors to sample at each seed point.<br />
* '''Skeleton points per ellipsoid''': allows dense or sparse sampling, a value of <math>1</math> means that an ellipsoid is sampled at every seed point.<br />
* '''Contact sensitivity''': how many vectors must touch the background before dilation stops.<br />
* '''Maximum iterations''': how hard to try to find larger ellipsoids - fitting will stop if no improvement has been made after this number of iterations..<br />
* '''Maximum drift''': how far the centroid may be displaced from its seed point.<br />
* '''EF image''': stack containing EF values for each point contained by at least one ellipsoid and NaN elsewhere.<br />
* '''Ellipsoid ID image''': stack containing the ID of the biggest ellipsoid at each point, ranked in descending order (<math>0</math> is the largest ellipsoid).<br />
* '''Volume image''': image showing the volume of the largest ellipsoid containing that point.<br />
* '''Axis ratio images''': images showing <math>a/b</math> and <math>b/c</math> ratios foreach point containing at least one ellipsoid and NaN elsewhere.<br />
* '''Flinn peak plot''': plot of <math>a/b</math> vs <math>b/c</math> weighted by volume, so bright pixels indicate relatively more of the structure has that axis ratio.<br />
* '''Gaussian sigma:''' amount to blur the Flinn peak plot - set to <math>0</math> for a precise but less 'beautiful' result.<br />
* '''Flinn plot''': unweighted Flinn plot - every ellipsoid is represented by the same sized point regardless of ellipsoid size.<br />
<br />
==== Results ====<br />
* '''EF image''': stack containing EF values. NaN (not a number) values are used in the background. Summary statistics can be obtained by running Analyze > Histogram<br />
* '''Short-Mid image''': stack containing the <math>a/b</math> ratios<br />
* '''Mid-Long image''': stack contining the <math>b/c</math> ratios<br />
* '''Volume image''': stack containing ellipsoid volumes<br />
* '''Max id image''': stack containing the ID of the largest ellipsoid at each point; IDs relate to the sort order based on volume, so ID = 0 is the largest ellipsoid. <math>-1</math> is foreground and background is labelled with a large negative number.<br />
* '''Flinn diagram''': plot of <math>a/b</math> versus <math>b/c</math> values present in the volume<br />
* '''Weighted Flinn plot''': Flinn diagram with peaks of intensity proportional to volume occupied by each (<math>a/b</math>, <math>b/c</math>) ratio<br />
<br />
==== Related publications ====<br />
Salmon PL, Ohlsson C, Shefelbine SJ, Doube M (2015), ''Structure model index does not measure rods and plates in trabecular bone'', Frontiers in Endocrinology, 6:162, [http://dx.doi.org/10.3389/fendo.2015.00162 doi:10.3389/fendo.2015.00162].<br />
<br />
== Fit ellipsoid ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit ellipsoid''.<br />
<br />
Finds the ellipsoid that best fits a set of point or multi-point ROIs in the ROI Manager. ''Fit ellipsoid'' may fail to fit an ellipsoid. The more points you add, the more likely it is to succeed. Points are scaled to the spatial calibration (voxel widht, height &amp; depth) of the input image.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': ROIs with at least nine points in the ROI Manager.<br />
<br />
==== Results ====<br />
* '''Radii''': the radii ''a'', ''b'' and ''c'' of the fitted ellipsoid. Radius ''a'' is the shortest and ''c'' the longest.<br />
* '''Centroid''': ''x'', ''y'' and ''z'' coordinates of the ellipsoid centre point.<br />
<br />
==== Differences from BoneJ1 ====<br />
* Supports multi-point ROIs.<br />
* Plug-in cancels if an ellipsoid can't be found, instead of reporting invalid results.<br />
<br />
== Fit sphere (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit sphere''.<br />
<br />
Finds the sphere that best fits a set of point ROIs, and optionally displays the image data bounded by the sphere in a new image window. Place a set of point ROIs on structures of interest, hitting [T] to add each point to the ROI Manager. Fit Sphere takes the coordinates of the points from the ROI Manager and applies a least-squares optimisation.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': populated with at least 5 point ROI's<br />
* '''Copy Sphere''': Create a new stack containing image data from within the best-fit sphere.<br />
* '''Padding''': Number of black pixels to put between the sphere and the sides of the image<br />
* '''Inner Cube''': Create a new stack containing image data from the cube that just fits inside the best-fit sphere.<br />
* '''Outer Cube''': Create a new stack containing image data from the cube that the best-fit sphere just fits inside.<br />
* '''Crop Factor''': Radius used for generating new images is multiplied by crop factor so that a bigger or smaller volume can be produced.<br />
* '''Add to ROI Manager''': Add the sphere to the ROI Manager as a set of circular ROIs<br />
* '''Clear ROI Manager''': Clear any existing ROIs in the Manager prior to adding circles<br />
<br />
==== Results ====<br />
* '''X Centroid''': x-coordinate of sphere's centroid<br />
* '''Y Centroid''': y-coordinate of sphere's centroid<br />
* '''Z Centroid''': z-coordinate of sphere's centroid<br />
* '''Radius''': length of radius<br />
* '''Images (optional)''': images containing a copy of the original data within the sphere, or within cubes bounding or bounded by the sphere.<br />
<br />
== Fractal dimension ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fractal dimension''.<br />
<br />
This plug-in estimates the fractal dimension of an image by applying the box-counting algorithm. In this algorithm grids of diminishing size are scanned over the image, and the number of boxes containing at least one foreground voxel is counted. As the box size decreases and the grid becomes finer, the proportion of foreground boxes increases in a fractal structure. See [https://en.wikipedia.org/wiki/Box_counting Wikipedia] for further details. BoneJ uses a fixed-grid scan, with an option to try to find the optimal covering.<br />
<br />
The box counting algorithm produces a pair of <math>(log(n), -log(m))</math> values for each iteration it runs. Here n = number of boxes with foreground, and m = box size. These pairs are passed to a curve-fitting algorithm, which returns the slope of the linear function which describes them ([https://en.wikipedia.org/wiki/Linear_regression regression fit]). The coefficient of this slope is the fractal dimension.<br />
<br />
Fractal dimension is markedly influenced by the parameters selected for the box counting algorithm, so it's worth running it several times with different values to find an accurate measure for your image.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* ''Starting box size (px)'': the size (sides) in pixels of a box in the sampling grid in the first iteration of the algorithm.<br />
* ''Smallest box size (px)'': the minimum size in pixels of a box in the grid. When box size becomes smaller than this limit, the algorithm iterates one more time, and then stops.<br />
* ''Box scaling factor'': the term used to divide the box size after iteration. For example, a scaling factor of <math>2.0</math> halves the size at each step.<br />
* ''Grid translations'': how many times at each iteration the grid is moved to try to the find the optimal covering. The optimal covering covers the objects in the image with the least amount of boxes. The larger the parameter the more likely it is that optimal covering is found. However, this slows down the plug-in considerably.<br />
* ''Automatic parameters'': if checked, then the plug-in runs with default parameters.<br />
* ''Show points'': if checked, then the plug-in displays the <math>(log(n), -log(m))</math> values it calculated. <br />
<br />
==== Results ====<br />
* ''Fractal dimension'': the [https://en.wikipedia.org/wiki/Fractal_dimension fractal dimension] of the image. For example, the Koch snow flake has a fractal dimension of 1.262.<br />
* ''R²'': the [https://en.wikipedia.org/wiki/Coefficient_of_determination coefficient of determination] of the line fitted to the <math>(log(n), -log(m))</math> points.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* Algorithm parameters can be changed by the user.<br />
<br />
==== Related publications ====<br />
Fazzalari NL, Parkinson IH (1996), ''Fractal dimension and architecture of trabecular bone'', J Pathol, 178: 100-5, [http://dx.doi.org/10.1002/(SICI)1096-9896(199601)178:1%3C100::AID-PATH429%3E3.0.CO;2-K doi:10.1002/(SICI)1096-9896(199601)178:1<100::AID-PATH429>3.0.CO;2-K].<br />
<br />
== Inter-trabecular angles ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Inter-trabecular Angles''.<br />
<br />
The plug-in was designed to analyse the angles between trabeculae of cancellous bone. First it calls [[Skeletonize3D]] to thin the input image (if necessary). Then it calls [[AnalyzeSkeleton]], which creates a graph of the largest skeleton (by number of nodes) in the thinned image. The graph consists of nodes and the edges that connect them. Nodes are also known as vertices, and edges as branches. Roughly speaking the edges correspond to trabeculae and the nodes to the junction points, where trabeuculae meet.<br />
<br />
The graph is often not a perfect representation of the trabecular network in the input image. ''Inter-trabecular angles'' offers many options to adjust the graph's topology and filter out artefacts that may obfuscate or skew the results. First it allows you to filter out nodes with too many or too few edges. Secondly it can be used to prune very short edges, which often do not represent actual trabeculae. <br />
<br />
[[File:Ita_types.png|left|150 px|Types of edges in pruning]]<br />
Pruning works differently for different types of edges. There are four kinds: outer, dead-end, inner and short. An outer edge doesn't interconnect different parts of a graph. In other words, one (and only one) of its endpoints connects to only one branch, i.e. the edge itself. In the figure the outer edge is colored black. A dead-end (blue) is an outer edge whose length is less than the minimum set by the user, i.e. it's a short, outer edge. An inner edge (green) connects to end points with more than one branch. A short edge is an inner edge, whose length is less than the set minimum. When a dead-end is pruned, it with its "lonely" end-point are removed from the graph. When a short edge is pruned, it and it's endpoints are removed, and a new node is placed at the midpoint of the former. This new node connects to all the branches the previous nodes connected to.<br />
<br />
''Inter-trabecular angles'' offers two further options to control pruning: ''iteration'' and ''clustering''. Iteration repeats pruning until no new short edges are found. Sometimes pruning can create new short edges, and thus the graph may still have them after one iteration. However, iteration can alter the structure of the graph too dramatically. Clustering searches for all nodes connected by short edges, before removing any. In the figure, clustering pruning would remove the four nodes and the red edges between them in one go. It would create a new node at the center of the previous four, and connect it to the blue and green edges. When pruning is not clustering, it removes edges one-by-one. This changes the end result depending on the order the edges are traversed. Clustering creates the same result each time. <br />
<br />
Pruning also removes loops and redundant parallel edges. The former connects to the same node on both ends, and the latter connects two nodes that are already connected by another edge. <br />
<br />
The pruning and filtering features were added so that we can replicate and continue from the research of [https://doi.org/10.1016/j.actbio.2016.08.040 Reznikov et al.]<br />
<br />
==== Suitable images ====<br />
An 8-bit, binary 2D or 3D image. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
*'''Minimum valence''': minimum number of branches for a node to be included in the analysis.<br />
*'''Maximum valence''': maximum number of branches for a node to be included in the analysis.<br />
*'''Minimum trabecular length (px)''': minimum length for a branch to be preserved in the pruning. Length is calculated as the distance between the endpoints of a branch.<br />
** This length is also displayed in the units of the image calibration<br />
*'''Margin (px)''': minimum distance of a node from image stack edges to be included in the analysis. Having nodes too close to the edges can make the results less accurate, because you get more branches that do not terminate to a node at the other end.<br />
*'''Iterate pruning''': repeat pruning until no more new short branches are discovered. When true, the topology of the graph is likely to change more in the pruning.<br />
*'''Use clusters''': if true then the pruning result is independent of the order in which the graph is traversed. False corresponds with methodology in Reznikov's article. See above for more details.<br />
*'''Print centroids''': Print the centroids (center coordinates) of the node pairs at the ends of each edge.<br />
*'''Print % culled edges''': Print statistics of different types of edges pruned.<br />
<br />
==== Results ====<br />
*'''Inter-trabecular angles''': angles between each branch of each node included in the analysis. Sorted into columns according to the number of branches per node. For example, column ''"3"'' shows the angles between branches of nodes with three branches.<br />
*'''Centroids''' (optional): A table of the center coordinates of the node pairs at the ends of each edge.<br />
*'''Culled edge percentages''' (optional): A table showing the percentages of different kinds of edges pruned, compared to the total number of edges in the analysed graph.<br />
*'''Skeleton''' (optional): if the plug-in had to skeletonise the input image, it displays the result of the thinning.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Inter-trabecular angles generalizes the idea of ''Triple point angles'' for any types of points. It also provides more tools for adjusting the graph for analysis.<br />
<br />
==== Related publications ====<br />
Reznikov, N et al. (2016), ''Inter-trabecular angle: A parameter of trabecular bone architecture in the human proximal femur that reveals underlying topological motifs'', Acta Biomaterialia, 44: 65--72, [https://doi.org/10.1016/j.actbio.2016.08.040 doi:j.actbio.2016.08.040].<br />
<br />
== Thickness ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Thickness''.<br />
<br />
This plug-in includes [[Local_Thickness]] in BoneJ, and provides some additional options &amp; results. Local thickness measures ''the diameter of the largest sphere that fits inside the object and contains the point'' for each point i.e. foreground voxel in an image. The plug-in calculates mean and standard deviation of the trabecular thickness (Tb.Th) or trabecular spacing (Tb.Sp) directly from pixel values in the resulting thickness map. Foreground voxels are considered trabeculae, and background voxels are the spacing. Processing time is heavily dependent on feature size (in pixels); large features can take a very long time to process.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
* '''Calculate''': chooses which thickness maps to calculate - trabecular thickness, trabecular spacing, or both. In order to calculate trabecular spacing, the image voxels are inverted.<br />
* '''Show thickness maps''': display the calculated thickness maps or not.<br />
* '''Mask thickness maps''': remove artifacts from the thickness maps. Artifacts are foreground voxels not present in the original image.<br />
* '''Crop to ROI manager''': create thickness maps only from the area bounded by the ROIs in the ROI manager. Checking this option requires you've added ROIs to the ROI manager.<br />
<br />
==== Results ====<br />
* The mean and standard deviation for each thickness map calculated.<br />
* Displays thickness map images if ''Show thickness maps'' was selected. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Calls the latest version of [[Local_Thickness]].<br />
* Thickness values for background voxels are marked ''NaN'' instead of ''0''.<br />
<br />
==== Related publications ====<br />
* Dougherty R, Kunzelmann K (2007), ''Computing local thickness of 3D structures with ImageJ'', Microsc. Microanal., 13: 1678-1679, [http://dx.doi.org/10.1017/S1431927607074430 doi:10.1017/S1431927607074430]<br />
* Hildebrand T, Rüegsegger P (1997), ''A new method for the model-independent assessment of thickness in three-dimensional images'', J. Microsc., 185: 67-75, [http://dx.doi.org/10.1046/j.1365-2818.1997.1340694.x doi:10.1046/j.1365-2818.1997.1340694.x]<br />
<br />
== Moments of inertia (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Moments of Inertia''<br />
<br />
Calculates the three orthogonal principal axes and moments of inertia around those axes. It includes pixels with values between upper and lower limits, which can be defined in terms of unitless grey values or Hounsfield units (HU). It optionally creates a new stack with the image centred and rotated so that the principal axes are parallel to the image stack's x, y and z axes. Calculations are limited to a rectangular ROI if one is drawn. The plugin will guess whether the image is HU calibrated, and if so, apply HU limits of bone (0-4000 HU), otherwise it will calculate auto-thresholds based on the stack's histogram. If a calibration curve is known, the coefficients can be added to get weighted calculations. Aligning a bone with Moments of Inertia may be a useful step prior to Slice Geometry if bones are not aligned with the image z axis.<br />
<br />
==== Suitable images ====<br />
An 8-bit or 16-bit image.<br />
<br />
==== Parameters ====<br />
* '''Start slice''': First slice to include in calculations<br />
* '''End slice''': Last slice to include in calculations<br />
* '''HU Calibrated''': Plugin will guess whether the image is HU calibrated. If image is HU calibrated, make sure the box is checked and enter HU calibrated numeric values in the following fields<br />
* '''Bone Min''': Lower threshold, in either uncalibrated greys or HU<br />
* '''Bone Max''': Upper threshold, in either uncalibrated greys or HU<br />
* '''Slope''': m where physical density = m × pixel value + c<br />
* '''Y Intercept''': c where physical density = m × pixel value + c<br />
* '''Align result''': Draw a new stack with the principal axes parallel to the image axes<br />
* '''Show axes (2D)''': Draw the axes in white on the aligned image<br />
* '''Show axes (3D)''': Display the stack and its principal axes in a 3D Viewer window<br />
<br />
==== Results ====<br />
* '''Image (optional)''': a copy of the input image centered and aligned with the principal axes<br />
* '''Xc''': Centroid x-coordinate (mass-weighted by calibrated density)<br />
* '''Yc''': Centroid y-coordinate<br />
* '''Zc''': Centroid z-coordinate<br />
* '''Vol''': Total volume of thresholded voxels<br />
* '''Mass''': Mass of bone, from pixel values and density calibration coefficients<br />
* '''Icxx''': Moment around x axis passing through centroid<br />
* '''Icyy''': Moment around y axis passing through centroid<br />
* '''Iczz''': Moment around z axis passing through centroid<br />
* '''Icxy''': Off-axis term for constructing inertia tensor<br />
* '''Icxz''': Off-axis term for constructing inertia tensor<br />
* '''Icyz''': Off-axis term for constructing inertia tensor<br />
* '''I1''': Moment around the shortest principal axis<br />
* '''I2''': Moment around the middle principal axis<br />
* '''I3''': Moment around the longest principal axis<br />
* '''Verbose output in Log window'''<br />
** '''Eigenvalues''': Result of of eigenvalue decomposition. Moments of inertia<br />
** '''Eigenvectors of principal axes''': orientation of input image<br />
** '''Inverse eigenvector matrix''': used to map voxel positions in the aligned image back to voxel positions in the original image<br />
* Optional 3D display of principal axes<br />
<br />
== Optimise threshold (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Optimise Threshold''<br />
<br />
Several histogram-based methods exist for automatic determination of threshold for binary segmentation, but in ImageJ these are currently limited to pixel values in a single slice. The result can be excluding high values in a stack that are higher than the highest value in the current slice. This plugin uses all the pixels in a stack to construct a histogram and uses ImageJ's built-in isodata algorithm to determine the threshold. It optionally tests values either side of the initial auto-threshold for connectivity, because connectivity is very sensitive to image noise. The plugin attempts to find the threshold that results in minimal connectivity. Purification, erosion and dilation can improve the connectivity estimate, so Purify is always called, and erosion and dilation are applied as part of a sequence: purify, erode, purify, dilate.<br />
<br />
==== Suitable images ====<br />
An 8-bit of 16-bit image<br />
<br />
==== Parameters ====<br />
* '''Threshold Only''': Determine the threshold from the stack histogram only<br />
* '''Apply Threshold''': Replace the input image with a thresholded version<br />
* '''Show Plot''': Display a graph showing connectivity versus threshold<br />
* '''Tests''': Number of different thresholds to test for connectivity<br />
* '''Range''': Proportion of the initial threshold to test above and below initial thresholds<br />
* '''Subvolume Size''': Size of the volume to test for connectivity. Set small for a faster run and large to test the whole stack<br />
* '''Erosion Cycles''': Number of times to erode the stack after initial purification<br />
* '''Dilation Cycles''': Number of times to dilate the stack after secondary purification<br />
<br />
==== Results ====<br />
* '''Thresholded stack (optional)'''<br />
* '''Plot of connectivity versus threshold (optional)'''<br />
* '''Log of optimal threshold value'''<br />
<br />
== Orientation (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Orientation''<br />
<br />
Sets the direction in a 2D image, without rotating the image or changing it in any way. ''Slice Geometry'' (see below) uses ''Orientation'' to calculate diameter, second moments of area and section moduli around anatomic axes set by the user.<br />
<br />
==== Suitable images ====<br />
A 2D image.<br />
<br />
==== Parameters ====<br />
* '''Orientation''': input field displays current orientation (clockwise from 12 o'clock) and takes keyboard input<br />
* '''deg / rad''': display and set orientation in degrees or radians<br />
* '''Principal direction''': the main direction, the head of which is displayed in red<br />
* '''Secondary direction''': the orthogonal direction<br />
* '''Reflect''': swap the labels on this axis<br />
<br />
==== Results ====<br />
* '''Orientation axes''': draws the axes of the orientation on the image.<br />
<br />
== Purify (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Purify''<br />
<br />
Purify locates all particles in 3D and removes all but the largest foreground and background particles.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary.<br />
<br />
==== Parameters ====<br />
* '''Labelling algorithm''':<br />
** '''Mapped''': Non-recursive, memory efficient and fast.<br />
** '''Multithreaded''': use multiple cores and job chunking to reduce recursion. Fast on small stacks and if you have many CPU cores.<br />
** '''Linear''': Non-recursive but heavy on RAM and single-threaded. Fast on big stacks, but only if you have the memory.<br />
* '''Chunk Size''': number of slices to use in each particle labelling thread. If images are large, set this to 2<br />
* '''Performance Log''': Show verbose performance information to help tune your system<br />
* '''Make copy''': If checked, shows the result in a new window; if unchecked the result replaces the original image.<br />
<br />
==== Results ====<br />
* '''Performance metrics (optional)'''<br />
** '''Threads''': Number of CPU cores used<br />
** '''Slices''': Number of slices in the input image stack<br />
** '''Chunks''': Number of chunks of slices, each chunk is processed independently<br />
** '''Chunk size''': Number of slices per chunk<br />
** '''Last chunk size''': size of the last chunk (the remainder chunk)<br />
** '''Duration''': time in seconds to complete purification<br />
* '''Purified image''': optionally in a new image window.<br />
<br />
== Skeletonise ==<br />
Menu path ''Plugins &gt; BoneJ &gt;Skeletonise''.<br />
<br />
This plug-in simply includes [[Skeletonize3D]] in BoneJ. It adds some additional validation to check that your image suits the tool.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[Skeletonize3D]].<br />
<br />
== Slice geometry (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Slice Geometry''<br />
<br />
Slice Geometry calculates cross-sectional geometric properties of shapes: cross-sectional area, centroid, mean density, second moment of area, section modulus, Feret diameter and local thickness (2D and 3D). Measurements can be limited to a rectangular ROI. If your bone is not well aligned with the image axes, you may find it useful to align the bone to its principal axes using Moments of Inertia or by exporting a transformed volume from the ImageJ 3D Viewer. Importantly, no assumption of geometry is made for any of the measurements.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Bone''': Slice Geometry will guess from your image title the bone it is working on. If it is wrong, correct it. If your bone of interest isn't listed, email me.<br />
* '''2D Thickness''': Run Thickness on a per-slice basis; this fits circles rather than spheres<br />
* '''3D Thickness''': Run Thickness on the whole stack, fitting spheres, then report results per slice<br />
* '''Draw Axes''': Draw axes on an annotated copy of the stack<br />
* '''Draw Centroids''': Draw centroids on an annotated copy of the stack<br />
* '''Annotated Copy (2D)''': Create a new stack showing the centroids and principal axes<br />
* '''3D Annotation''': Display the stack, principal axes and centroids in the 3D viewer<br />
* '''Process Stack''': Calculate parameters for all slices in the stack<br />
* '''Clear Results''': Remove all data in the results table without saving, prior to calculating parameters<br />
* '''Use Orientation''': Also calculate parameters based on directions defined in Orientation<br />
* '''HU Calibrated''': Allows you to enter your thresholds in Hounsfield units (HU) or uncalibrated units<br />
* '''Bone Min''': minimum pixel value to use in calculations<br />
* '''Bone Max''': maximum pixel value to use in calculations<br />
* '''Slope''': <math>m</math> where physical density <math>= m * pixel value + c</math><br />
* '''Y Intercept''': <math>c</math> where physical density <math>= m * pixel value + c</math><br />
* '''Note''': density-weighted calculations are only applied to centroid determination at present<br />
* '''Partial volume compensation''': Use model that assumes Gaussian blur of imaging modality and linear transform between pixel value and sample 'density' to correct for blurred and pixelated images (e.g. small bone in clinical CT)<br />
* '''Background''': pixel value that corresponds to zero bone density (could be the 'fat', 'air' or 'muscle' pixel value)<br />
* '''Foreground''': pixel value that corresponds to 100% bone density<br />
* '''A rectangular ROI (optional)''': if there's a ROI, calculations are limited to its area.<br />
<br />
==== Results ====<br />
* '''Images (optional)''': displays the result images selected in the parameters<br />
* '''Bone code''': Unique numeric identifier for the anatomic name of each bone. Further bone codes can be added to BoneJ on request<br />
* '''Slice''': slice number indicating which slice contributed image data for this row of the results<br />
* '''CSA''': cross-sectional area<br />
* '''X cent.''': Centroid x-coordinate<br />
* '''Y cent.''': Centroid y-coordinate<br />
* '''Density''': mean physical density, calculated from pixel values and calibration coefficients<br />
* '''wX cent''': Density-weighted x-coordinate of centroid<br />
* '''wY cent''': Density-weighted y-coordinate of centroid<br />
* '''Theta''': angle of minor axis (axis for Imin, the long axis of your specimen's cross section) from the horizontal, ranging from <math>-\pi/2</math> to <math>\pi/2</math>, with positive as clockwise<br />
* '''R1''': maximum chord length from minor axis<br />
* '''R2''': maximum chord length from major axis<br />
* '''Imin''': Second moment of area around major axis<br />
* '''Imax''': Second moment of area around minor axis<br />
* '''Ipm''': Product moment of area (= 0 if no errors are present, e.g. due to pixelation)<br />
* '''Zmax''': Section modulus around major axis (Imax / R2)<br />
* '''Zmin''': Section modulus around minor axis (Imin / R1)<br />
* '''Zpol''': Polar section modulus<br />
* '''Feret Min''': Minimum caliper width<br />
* '''Feret Max''': Maximum caliper width<br />
* '''Feret Angle''': Orientation of maximum caliper width<br />
* '''Perimeter''': Distance around external surface<br />
* '''Max Thick 2D''': Maximum thickness determined by local thickness in 2D<br />
* '''Mean Thick 2D''': Mean thickness determined by local thickness in 2D<br />
* '''SD Thick 2D''': Standard deviation of the mean thickness determined by local thickness in 2D<br />
* '''Max Thick 3D''': Maximum thickness in this slice determined by local thickness in 3D<br />
* '''Mean Thick 3D''': Mean thickness in this slice determined by local thickness in 3D<br />
* '''SD Thick 3D''': Standard deviation of the mean thickness in this slice determined by local thickness in 3D Directional measurements, using Orientation directions, and the specimen's slice centroid<br />
* '''A (rad)''': Principal orientation (direction A)<br />
* '''B (rad)''': Secondary orientation (direction B)<br />
* '''IAa''': Second moment of area around Aa axis<br />
* '''IBb''': Second moment of area around Bb axis<br />
* '''ZAa''': Section modulus around Aa axis<br />
* '''ZBb''': Section modulus around Bb axis<br />
* '''RAa''': maximum chord length from Aa axis<br />
* '''RBb''': maximum chord length from Bb axis<br />
* '''DAa''': Calliper diameter in direction of Aa<br />
* '''DBb''': Calliper diameter in direction of Bb<br />
<br />
== Surface area ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Surface area''<br />
<br />
''Surface area'' creates a mesh from the bone in the image, and then calculates the area of the surface of the mesh. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Export STL file(s)''': if checked, then the meshes created from the image are saved as .stl-files. A dialog opens for you to select a folder for the files.<br />
<br />
==== Results ====<br />
* '''Surface area''': the surface area of the bone mesh<br />
* '''STL-file''': the mesh created from the bone image<br />
<br />
The surface area is reported and an .stl-file saved separately for each 3D subspace in the image. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Isosurface''<br />
<br />
== Surface fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Surface fraction''<br />
<br />
''Surface fraction'' calculates the fraction of bone volume in an image by comparing meshes created from bone particles and the whole image. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone. <br />
<br />
More formally defined, ''Surface fraction'' calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary.<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the mesh created from bone voxels.<br />
* '''Total volume''': volume of the mesh created from the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Volume fraction''<br />
<br />
== Results table ==<br />
The BoneJ plug-ins print their results into a shared result table. This is because we often need to calculate several measures for the same image, so it's handy to have them on one row. Repeated measures for the same image are reported on different rows. The results persist even if the table is closed. To clear the table run ''Plugins &gt; BoneJ &gt; Table &gt; Clear BoneJ results''.<br />
<br />
Note that some of the plug-ins (marked with ''WIP'') still use a ImageJ1 style results table that works slightly differently. As they are modernized they'll move to use the same new table as the others.<br />
<br />
== Usage reporting ==<br />
Menu path '' Edit &gt; Options &gt; BoneJ Usage (Modern | Legacy)''<br />
<br />
==== What is collected? ====<br />
<br />
BoneJ uses Google Analytics to report when a plugin's run() method completes successfully.<br />
<br />
<code><br />
ht<span>tp://</span>www.google-analytics.com/__utm.gif?utmwv=5.2.5&utms=0&utmn=1074354874&utmhn=bonej.org&utmt=event&utme=5(Plugin%20Usage*org.bonej.wrapperPlugins.wrapperUtils.UsageReporterOptions*0.5.1)&utmcs=UTF-8&utmsr=3840x1080&utmvp=3840x1080&utmsc=24-bit&utmul=en-gb&utmje=0&utmcn=1&utmdt=bonej.org%20Usage%20Statistics&utmhid=512699200&utmr=-&utmp=%2Fstats&utmac=UA-366405-8&utmcc=__utma%3D1589599318.1327557233.1538550102.1538550102.1538550102.2%3B%2B__utmz%3D1589599318.1538550102.79.42.utmcsr%3Dgoogle%7Cutmccn%3D(organic)%7Cutmcmd%3Dorganic%7Cutmctr%3DBoneJ%20Usage%20Reporter%3B<br />
</code><br />
<br />
A one-pixel GIF image is requested from Google, with a rather long set of parameters. Reported details are:<br />
<br />
* A unique ID which is stored in your ImageJ preferences between sessions<br />
* Your screen resolution<br />
* The name of the plugin's Java class<br />
* The version of BoneJ<br />
* The first time, last time and current time you ran a BoneJ plugin<br />
* Your system language and character map<br />
* Google also records your IP address as all webservers do in their logs<br />
* Some of these values are saved in your preferences<br />
* Your operating system and Java version are reported in the user agent ID<br />
<br />
==== What does the report look like? ====<br />
<br />
Data are collated with the Analytics report already used to track hits on bonej.org.<br />
<br />
==== For what is the data used? ====<br />
<br />
So far, BoneJ has been supported mainly by grants to scientists. We wish to create quantitative reports that detail how much BoneJ is being used in the community, so that decisions to fund further development can be made rationally.<br />
<br />
In addition, development resources are limited so it is useful to see which features are used heavily and can be consolidated, while little-used features can be abandoned or made more useful.<br />
<br />
==== That is noble but my work is top secret ====<br />
<br />
If you are uncomfortable with this level of data collection then please opt out, at the dialog which is prompted on first run, or by running '' Edit &gt; Options &gt; BoneJ Usage (Modern | Legacy) ''. Hitting Cancel (Legacy) or unchecking the box (Modern) will prevent any report from being gathered or sent and will also clear any values that were previously saved.<br />
<br />
You can opt back in by running '' Edit &gt; Options &gt; BoneJ Usage (Modern | Legacy)'', checking the box (Modern only) and hitting OK.<br />
<br />
==== Can I see the report? ====<br />
<br />
At the moment the report is kept private. If there is a strong will from the user community, who created the data in the first place, the report could be made more open. Please feel free to discuss on the user forum.<br />
<br />
==== How is it implemented? ====<br />
<br />
You can read the code on Github and in every copy of BoneJ. If you turn on ImageJ's debug mode (in '' Edit &gt; Options &gt; Misc. '') the URL and the GIF response will be logged to ImageJ's log window.<br />
<br />
== Where is my favourite plug-in? ==<br />
We have removed some plug-ins from BoneJ. ''Neck shaft angle'', ''Plateness'' and ''Structure model index'' have been discontinued. ''Interpolate ROIs'', [http://imagej.net/3D_Binary_Filters ''Dilate 3D'' and ''Erode 3D''] come pre-packaged with ImageJ, so they are no longer included in BoneJ2.<br />
<br />
Support for ''Kontron IMG'', ''Scanco ISQ'' and ''Stratec pQCT'' file formats has been moved to [[SCIFIO]]. Just run ''Edit &gt; Options &gt; ImageJ2'', and check ''Use SCIFIO when opening files''. When the option is enabled, these kinds of files can be opened from ''File > Open'' or dragging &amp; dropping them like any other format. <br />
<br />
''Distribution analysis'' and other pQCT related tools can now be downloaded independently from the [[PQCT]] update site.<br />
<br />
== Licence ==<br />
BoneJ2 is free, open-source software. You can redistribute it and/or modify it under the terms of the [https://github.com/bonej-org/BoneJ2/blob/master/LICENCE.md BSD 2-clause licence]. The software is provided "as is" and any warranties are disclaimed. In no event shall the copyright holder or contributors be liable.<br />
<br />
== Citation ==<br />
If you'd like to cite the software, we will soon publish a paper about BoneJ experimental. You can read the draft (and send us your feedback) as we're writing it [https://v1.overleaf.com/read/yxdkwpcdkjzj for Wellcome Open Research on Overleaf]. We recommend you cite the specific release used in your research.<br />
<br />
== Funding ==<br />
The redesign and porting effort to create BoneJ2 was supported by a [https://wellcome.ac.uk/what-we-do/directories/biomedical-resource-technology-development-grants-people-funded Wellcome Trust Biomedical Resource and Technology Development Grant]. Interaction with [[SciView]] was assisted by a [https://royalsociety.org/grants-schemes-awards/grants/international-exchanges/ Royal Society International Exchange grant].</div>Mdoubehttps://imagej.net/index.php?title=Surface_area&diff=38612Surface area2018-10-11T03:41:03Z<p>Mdoube: Redirected page to BoneJ2#Surface area</p>
<hr />
<div>#REDIRECT [[BoneJ2#Surface_area]]</div>Mdoubehttps://imagej.net/index.php?title=Inter-trabecular_angles&diff=38611Inter-trabecular angles2018-10-11T03:40:14Z<p>Mdoube: Redirected page to BoneJ2#Inter-trabecular angles</p>
<hr />
<div>#REDIRECT [[BoneJ2#Inter-trabecular_angles]]</div>Mdoubehttps://imagej.net/index.php?title=Surface_fraction&diff=38610Surface fraction2018-10-11T03:38:48Z<p>Mdoube: Redirected page to BoneJ2#Surface fraction</p>
<hr />
<div>#REDIRECT [[BoneJ2#Surface_fraction]]</div>Mdoubehttps://imagej.net/index.php?title=Area_Volume_fraction&diff=38609Area Volume fraction2018-10-11T03:36:36Z<p>Mdoube: Redirected page to BoneJ2#Area.2FVolume fraction</p>
<hr />
<div>#REDIRECT [[BoneJ2#Area.2FVolume_fraction]]</div>Mdoubehttps://imagej.net/index.php?title=Fractal_dimension&diff=38608Fractal dimension2018-10-11T03:29:03Z<p>Mdoube: Redirected page to BoneJ2#Fractal dimension</p>
<hr />
<div>#REDIRECT [[BoneJ2#Fractal_dimension]]</div>Mdoubehttps://imagej.net/index.php?title=Fit_ellipsoid&diff=38606Fit ellipsoid2018-10-11T03:20:30Z<p>Mdoube: Redirected page to BoneJ2#Fit ellipsoid</p>
<hr />
<div>#REDIRECT [[BoneJ2#Fit_ellipsoid]]</div>Mdoubehttps://imagej.net/index.php?title=Fit_ellipsoid&diff=38605Fit ellipsoid2018-10-11T03:19:50Z<p>Mdoube: Redirected page to BoneJ2#Fit Ellipsoid</p>
<hr />
<div>#REDIRECT [[BoneJ2#Fit_Ellipsoid]]</div>Mdoubehttps://imagej.net/index.php?title=Anisotropy&diff=38604Anisotropy2018-10-11T03:17:54Z<p>Mdoube: Redirected page to BoneJ2#Anisotropy</p>
<hr />
<div>#REDIRECT [[BoneJ2#Anisotropy]]</div>Mdoubehttps://imagej.net/index.php?title=Skeletonise&diff=38603Skeletonise2018-10-11T03:16:47Z<p>Mdoube: Redirected page to BoneJ2#Skeletonise</p>
<hr />
<div>#REDIRECT [[BoneJ2#Skeletonise]]</div>Mdoubehttps://imagej.net/index.php?title=Analyse_Skeleton&diff=38602Analyse Skeleton2018-10-11T03:15:45Z<p>Mdoube: Redirected page to BoneJ2#Analyse skeleton</p>
<hr />
<div>#REDIRECT [[BoneJ2#Analyse_skeleton]]</div>Mdoubehttps://imagej.net/index.php?title=Analyze_Skeleton_2D_3D&diff=38601Analyze Skeleton 2D 3D2018-10-11T03:15:16Z<p>Mdoube: Blanked the page</p>
<hr />
<div></div>Mdoubehttps://imagej.net/index.php?title=Analyze_Skeleton_2D_3D&diff=38600Analyze Skeleton 2D 3D2018-10-11T03:14:41Z<p>Mdoube: Redirected page to BoneJ2#Analyse skeleton</p>
<hr />
<div>#REDIRECT [[BoneJ2#Analyse_skeleton]]</div>Mdoubehttps://imagej.net/index.php?title=Check_Voxel_Depth&diff=38599Check Voxel Depth2018-10-11T03:08:21Z<p>Mdoube: Redirected page to BoneJ2#Check voxel depth .28WIP.29</p>
<hr />
<div>#REDIRECT [[BoneJ2#Check_voxel_depth_.28WIP.29]]</div>Mdoubehttps://imagej.net/index.php?title=Delete_Slice_Range&diff=38598Delete Slice Range2018-10-11T02:49:30Z<p>Mdoube: Redirected page to BoneJ2#Delete slice range .28WIP.29</p>
<hr />
<div>#REDIRECT [[BoneJ2#Delete_slice_range_.28WIP.29]]</div>Mdoubehttps://imagej.net/index.php?title=Slice_Geometry&diff=38597Slice Geometry2018-10-11T02:46:10Z<p>Mdoube: Redirected page to BoneJ2#Slice geometry .28WIP.29</p>
<hr />
<div>#REDIRECT [[BoneJ2#Slice_geometry_.28WIP.29]]</div>Mdoubehttps://imagej.net/index.php?title=Moments_of_Inertia&diff=38596Moments of Inertia2018-10-11T02:05:03Z<p>Mdoube: Redirected page to BoneJ2#Moments of inertia .28WIP.29</p>
<hr />
<div>#REDIRECT [[BoneJ2#Moments_of_inertia_.28WIP.29]]</div>Mdoubehttps://imagej.net/index.php?title=Moments_of_Inertia&diff=38595Moments of Inertia2018-10-11T02:04:48Z<p>Mdoube: Redirected page to Https://imagej.net/BoneJ2#Moments of inertia .28WIP.29</p>
<hr />
<div>#REDIRECT [[https://imagej.net/BoneJ2#Moments_of_inertia_.28WIP.29]]</div>Mdoubehttps://imagej.net/index.php?title=Fit_Sphere&diff=38594Fit Sphere2018-10-11T02:03:40Z<p>Mdoube: Redirected page to BoneJ2#Fit sphere .28WIP.29</p>
<hr />
<div>#REDIRECT [[BoneJ2#Fit_sphere_.28WIP.29]]</div>Mdoubehttps://imagej.net/index.php?title=Purify&diff=38593Purify2018-10-11T02:02:48Z<p>Mdoube: Redirected page to BoneJ2#Purify .28WIP.29</p>
<hr />
<div>#REDIRECT [[BoneJ2#Purify_.28WIP.29]]</div>Mdoubehttps://imagej.net/index.php?title=Calibrate_SCANCO&diff=38592Calibrate SCANCO2018-10-11T01:48:47Z<p>Mdoube: Redirected page to BoneJ2#Calibrate SCANCO .28WIP.29</p>
<hr />
<div>#REDIRECT [[BoneJ2#Calibrate_SCANCO_.28WIP.29]]</div>Mdoubehttps://imagej.net/index.php?title=Orientation&diff=38591Orientation2018-10-11T01:42:26Z<p>Mdoube: Redirected page to BoneJ2#Orientation .28WIP.29</p>
<hr />
<div>#REDIRECT [[BoneJ2#Orientation_.28WIP.29]]</div>Mdoubehttps://imagej.net/index.php?title=BoneJ_Usage_Legacy&diff=38590BoneJ Usage Legacy2018-10-11T01:32:49Z<p>Mdoube: Redirected page to BoneJ2#Usage reporting</p>
<hr />
<div>#REDIRECT [[BoneJ2#Usage_reporting]]</div>Mdoubehttps://imagej.net/index.php?title=BoneJ_Usage_Modern&diff=38589BoneJ Usage Modern2018-10-11T01:32:26Z<p>Mdoube: Redirected page to BoneJ2#Usage reporting</p>
<hr />
<div>#REDIRECT [[BoneJ2#Usage_reporting]]</div>Mdoubehttps://imagej.net/index.php?title=Clear_BoneJ_results&diff=38588Clear BoneJ results2018-10-11T01:31:36Z<p>Mdoube: Redirected page to BoneJ2#Results table</p>
<hr />
<div>#REDIRECT [[BoneJ2#Results_table]]</div>Mdoubehttps://imagej.net/index.php?title=Connectivity&diff=38578Connectivity2018-10-04T08:34:16Z<p>Mdoube: Redirected page to BoneJ2#Connectivity</p>
<hr />
<div>#REDIRECT [[BoneJ2#Connectivity]]</div>Mdoubehttps://imagej.net/index.php?title=BoneJ2&diff=38577BoneJ22018-10-04T08:29:49Z<p>Mdoube: /* Can I see the report? */</p>
<hr />
<div>{{Infobox<br />
| name = BoneJ2<br />
| software = ImageJ<br />
| logo = [[File:Bonej-icon.png|96px]]<br />
| author = {{Person|Michaeldoube}}, {{Person|Rdom}}, {{Person|Alessandrofelder}}<br />
| maintainer = {{Person|Michaeldoube}}, {{Person|Alessandrofelder}}<br />
| source = {{GitHub|org=bonej-org|repo=BoneJ2}}, [https://doi.org/10.5281/zenodo.1427262 doi:10.5281/zenodo.1427262]<br />
| released = Dec 11<sup>th</sup>, 2017<br />
| latest version = cuneiform-experimental-patch2, Sep 24<sup>th</sup>, 2018<br />
| status = Active, Experimental<br />
}}<br />
BoneJ is a collection of skeletal biology plug-ins for ImageJ.<br />
This is the new experimental, modernized version of the software available through the ImageJ [http://imagej.net/Updater updater]. Its update site is called [http://sites.imagej.net/BoneJ BoneJ experimental]. For the old ImageJ1 version, see [[BoneJ]].<br />
<br />
This version works with the latest Fiji, and complies with the modern ImageJ [[architecture]]. Most plug-ins also now support hyperstacks, i.e. images with multiple channels or time frames.<br />
<br />
As the code is still experimental, it's still likely to change a lot. This means any scripts using the code might break, results can change, and plug-ins gain and lose parameters. Tools marked with ''WIP'' (work in progress), are more likely to undergo large changes. <br />
<br />
Below is the documentation for the plug-ins included in BoneJ experimental.<br />
<br />
== Installation ==<br />
[[File:Install-bonej.png|400 px|Installation steps]]<br />
# [http://imagej.net/Downloads Download] the latest version of Fiji for your operating system<br />
# Launch Fiji<br />
# Select in the menu ''Help'' &gt; ''Update...''<br />
# Click ''Manage update sites''<br />
# Check ''BoneJ experimental''<br />
# Click ''Close''<br />
# Click ''Apply changes''<br />
After the downloads have finished, close and restart Fiji.<br />
<br />
== Analyse skeleton ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyse skeleton''.<br />
<br />
This plug-in simply includes [[AnalyzeSkeleton]] in BoneJ. It adds some additional validation to check that your image suits the tool. It also skeletonizes your image by calling [[Skeletonize3D]] if needed.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[AnalyzeSkeleton]].<br />
<br />
== Anisotropy ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Anisotropy''.<br />
<br />
Anisotropy is used to quantify the directionality of trabecular bone. It tells whether the trabeculae have a certain orientation, or if they're randomly aligned. The method to measure anisotropy is fairly complex and consists of multiple steps:<br />
<br />
# Find mean intercept length (MIL) vectors from <math>n</math> directions<br />
# Plot MIL vectors into a point cloud<br />
# Solve the equation of an ellipsoid that best fits the point cloud<br />
# Calculate the degree of anisotropy from the radii of the ellipsoid<br />
<br />
It's important to note that algorithm is stochastic and does not guarantee exact results. Thus it's recommended to run it several times to establish the degree of anisotropy in your image.<br />
<br />
[[File:PhaseChanges.png|left|150 px|The red dots mark phase changes]]<br />
<br />
In the first step the algorithm draws parallel lines over the input image in direction <math>\mathbf{v}</math>. The direction is chosen randomly. Each line segment in the image stack is sampled to find points where it changes from background to foreground, i.e. where the line enters an object. The points are called ''phase changes'', in the adjacent figure they're marked with red dots. After the sampling is complete, the algorithm forms a ''MIL vector'', whose length is the total length of the line segments divided by the total number of phase changes found. The MIL vector has the same direction as <math>\mathbf{v}</math>. Drawing and sampling the lines is repeated for <math>n</math> directions, and the method creates <math>n</math> MIL vectors.<br />
<br />
After the MIL vectors have been calculated, they are added to a point cloud (a collection of points) around the origin. Then the method tries solve the equation of an ellipsoid that would fit the cloud. There may be no solution, especially if there are few points. That is, the fitting may fail at which point the plug-in stops. The radii of this ellipsoid determine the degree of anisotropy (see [http://imagej.net/index.php?title=BoneJ_experimental&action=submit#Results results]).<br />
<br />
[[File:MilCube.png|right|200 px|Projecting lines from a plane]]<br />
<br />
In more detail, the lines in the first step are projected from a <math>d * d</math> plane with normal <math>\mathbf{v}</math> (see the adjacent figure). The size <math>d = \sqrt{w^{2} + h^{2} + d^{2}}</math>, where <math>w, h, d</math> are the dimensions of the image stack. Each of the lines originates from a random point <math>\mathbf{o}</math> on the plane. The plane is divided into <math>m * m</math> same-sized sections, where <math>m</math> is a number selected by the user (i.e. ''Lines per dimension''). One origin <math>\mathbf{o}</math> is randomly selected from within each section. The lines are projected until they intercept the stack edges at points <math>\mathbf{o} + t_{min}\mathbf{v}</math>,<math>\mathbf{o} + t_{max}\mathbf{v}</math> (the algorithm solves for <math>t_{min}</math>, <math>t_{max}</math>). These line segments within the stack are then sampled for phase changes. In this drawing method some lines may miss the image stack completely, but conversely there aren't any areas in the stack that don't have an equal chance of being sampled.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
The plug-in is intended to analyse the "texture" of an object thus it suits samples of a larger whole, e.g. a trabecular cube that fills the whole stack. The results for whole objects such as the pre-packaged ''Bat Cochlea Volume'' ImageJ sample image are not really meaningful.<br />
<br />
==== Parameters ====<br />
* '''Directions''': number of times sampling is performed from different directions. The minimum is <math>9</math>, because that's how many independent variables the algorithm needs to solve the "shape" of the orientation in the image.<br />
* '''Lines per dimension''': controls how many parallel lines are drawn per each direction. For example, if ''lines per dimension'' is <math>2</math> then ''Anisotropy'' draws <math>4</math> lines. In this case, the origin points of the lines are randomly selected from within the <math>4</math> equal sections of the sampling plane (see above detailed explanation). The number is squared, because the location of the origins can vary in two dimensions.<br />
<br />
then the plane is divided into <math>4</math> equal sections, and a line is drawn from each. The origin point of each line is randomly located within their section.<br />
* '''Sampling increment''': controls how often each line is sampled. The default is <math>1.0</math>, which means that after each step a unit vector (a <math>1\_px</math> long line) is added to the position along a sampling line. The number of samples taken per line depends on the length of the line segment within the image stack.<br />
* '''Recommended minimum''': if checked, then the above three parameters are set to the recommended minimum values. In our tests we found that with these values the results are quite stable, and fitting unlikely to fail. However, these minimums are not guaranteed to be the best settings for your image.<br />
* '''Show radii''': if checked, then the radii of the fitted ellipsoid are shown in the results table.<br />
<br />
==== Results ====<br />
* '''Degree of anisotropy''': how much orientation there is in the structure. <math>0.0</math> means the image is completely isotropic, the sample has no directionality whatsoever. <math>1.0</math> means there is very strong orientation in the structure of the image. Note that these are theoretical minimum and maximum values. Due the stochastic nature of the algorithm, even an empty stack will have non-zero degree of anisotropy.<br />
* '''Radii of fitted ellipsoid''' (optional): the lengths of the radii <math>a \leq b \leq c</math> of the ellipsoid fitted on the MIL points. Degree of anisotropy <math>= 1.0 - a/c</math>.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* The results of this Anisotropy do not stabilize, so it's not repeated automatically like in BoneJ1. However, the results vary less between runs.<br />
* MIL vectors are drawn differently. In BoneJ1 they're drawn in sphere-shapes around random seed points. Here parallel lines from different directions are drawn through the whole stack. We think this method produces more uniform sampling, i.e. there's less chance of a directional bias.<br />
<br />
==== Related publications ====<br />
* Odgaard A (1997), ''Three-dimensional methods for quantification of cancellous bone architecture'', Bone, 20, 315-328, [http://dx.doi.org/10.1016/S8756-3282(97)00007-0 doi:10.1016/S8756-3282(97)00007-0]<br />
* Harrigan TP, Mann RW (1984), ''Characterization of microstructural anisotropy in orthotropic materials using a second rank tensor'', J Mater Sci, 19, 761-767, [http://dx.doi.org/10.1007/BF00540446 doi:10.1007/BF00540446]<br />
<br />
== Area/Volume fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Area/Volume fraction''<br />
<br />
''Area/Volume fraction'' calculates the fraction of bone in an image by it to the whole image. It counts all the foreground voxels, which it assumes represent bone, and compares them to the total number of voxels in the image. More formally defined, the plug-in calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''. In case of a 2D image, it calculates the fraction ''BA/TA'', which is the area of bone per unit area of the sample.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the bone voxels.<br />
* '''Total volume''': volume of the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 2D/3D subspace in the image, i.e. for each channel and time frame. Results will be for ''area'' if image is 2D.<br />
<br />
==== Differences to BoneJ1 ====<br />
* In BoneJ1 the plug-in was called ''Volume fraction''<br />
* Can process 2D images<br />
* Supports hyperstacks <br />
<br />
== Calibrate SCANCO (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyze &gt; Calibrate SCANCO''<br />
<br />
Applies the ''mg HA/ccm'' pixel value calibration, i.e. ''HU'' or Hounfield unit calibration stored in the .isq format metadata to the image.<br />
<br />
==== Suitable images ====<br />
An .isq format image generated by Scanco X-ray microtomography scanners.<br />
<br />
== Check voxel depth (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Check Voxel Depth''<br />
<br />
Checks whether slice spacing has been calibrated correctly. Some DICOM images contain slice thickness data in the header information, but thickness is not necessarily the same as the physical distance between consecutive slices' positions.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Connectivity ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Connectivity''.<br />
<br />
The Connectivity plug-in is designed to estimate the number of connected structures i.e. trabeculae in a trabecular network. This ''connectivity'' measure is related to a topological number <math>\chi</math> known as ''Euler characteristic'', ''Euler number'' or ''Euler-Poincaré characteristic''. Mathematically defined connectivity is <math>= 1 - (\chi + \Delta\chi)</math>. Roughly speaking, <math>\chi</math> describes the shape or structure of a topological space. It can also be expressed as <math>\chi = objects - handles + cavities</math>, where a handle is a hole that goes through an object (e.g the hole in a doughnut, or the ear of a coffee mug), and a cavity is enclosed inside one. When measuring trabecular cubes, you need to add <math>\Delta\chi</math> to <math>\chi</math> to get a more accurate estimate of the connectivity of the whole network. The term <math>\Delta\chi</math> corrects for the change in the topology of an object, when it's cut to pieces. <br />
<br />
NB some other Euler characteristic implementations report <math>\chi + \Delta\chi</math> as <math>\chi</math>, i.e. in them the correction <math>\Delta\chi</math> is implicit.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary. The plug-in assumes that there is only one particle in the foreground; to achieve this, run ''Purify''. Having more than one object often leads to negative connectivity.<br />
<br />
==== Results ====<br />
* '''Euler characteristic (χ)''': describes the shape of the object(s) in the image, <math>\chi = objects - handles + cavities</math>.<br />
* '''Corrected Euler (χ + Δχ)''': the Euler characteristic of the part corrected for edge effects to fit the whole.<br />
* '''Connectivity''': gives an estimate of the number of connected trabeculae in the image. Equal to <math>1 - (\chi + \Delta\chi)</math>.<br />
* '''Conn. density''': connectivity divided by unit volume. <br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* The old version reported ''Corrected Euler (χ + Δχ)'' incorrectly as ''Δχ''<br />
<br />
==== Related publications ====<br />
* Odgaard A, Gundersen HJG (1993), ''Quantification of connectivity in cancellous bone, with special emphasis on 3-D reconstructions'', Bone 14: 173-182, [http://dx.doi.org/10.1016/8756-3282(93)90245-6 doi:10.1016/8756-3282(93)90245-6.]<br />
* Toriwaki J, Yonekura T (2002), ''Euler number and connectivity indexes of a three dimensional digital picture'', [http://www.scipress.org/journals/forma/abstract/1703/17030183.html Forma 17: 183-209]<br />
<br />
== Delete slice range (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Delete slice range''<br />
<br />
Removes a range of slices from a stack, so that cropping in the Z direction is practical.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Ellipsoid factor (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Ellipsoid factor''.<br />
<br />
Ellipsoid Factor is a new method for measuring rod/plate geometry. It uses the axis lengths from prolate, oblate and intermediate elipsoids to determine how prolate or oblate the trabecular space is at a particular point. Highly prolate (javelin-shaped, rod-like) ellipsoids have a single long axis (<math>c</math>) and two short axes (<math>a, b</math>) such that <math>a < b \ll c</math> , whereas highly oblate (discus-shaped, plate-like) ellipsoids have two longer axes (<math>b, c</math>) and one much shorter axis (<math>a</math>) so that <math>a \ll b < c</math>. Calculating <math>EF</math> as the difference in ratios, <math>EF = a/b - b/c</math> leads to a useful scale ranging from <math>-1</math> (oblate, <math>a/b \approx 0, b/c \approx 1</math>) to <math>+1</math> (prolate, <math>a/b \approx 1, b/c \approx 0</math>). <math>EF</math> of <math>0</math> indicates an intermediate ellipsoid where <math>a/b = b/c</math>, which is the case for spheres (<math>a = b = c</math>) and other ellipsoids with axis ratios <math>a:qa:q^{2}a</math>. Ellipsoid Factor runs [[Skeletonize3D]] to get the medial axis of the trabeculae, which is used as the seed for sampling. Ellipsoids are seeded from each voxel on the medial axis. A combination of dilation, contraction, rotation and a small amount of translation is run iteratively until the ellipsoid increases no further in volume.<br />
<br />
The EF at a point in the structure is determined as the EF of the most voluminous ellipsoid which contains that point.<br />
<br />
If you use Ellipsoid Factor in your work, please cite:<br />
Doube M (2015), ''The Ellipsoid Factor for quantification of rods, plates and intermediate forms in 3D geometries'', Frontiers in Endocrinology, 6:15, [http://journal.frontiersin.org/Journal/10.3389/fendo.2015.00015/abstract doi: 10.3389/fendo.2015.00015]<br />
<br />
==== Suitable images ====<br />
A binary 3D image.<br />
<br />
==== Parameters ====<br />
* '''Sampling increment''': distance between sample points on each vector; should be less than the pixel spacing.<br />
* '''Vectors''': number of vectors to sample at each seed point.<br />
* '''Skeleton points per ellipsoid''': allows dense or sparse sampling, a value of <math>1</math> means that an ellipsoid is sampled at every seed point.<br />
* '''Contact sensitivity''': how many vectors must touch the background before dilation stops.<br />
* '''Maximum iterations''': how hard to try to find larger ellipsoids - fitting will stop if no improvement has been made after this number of iterations..<br />
* '''Maximum drift''': how far the centroid may be displaced from its seed point.<br />
* '''EF image''': stack containing EF values for each point contained by at least one ellipsoid and NaN elsewhere.<br />
* '''Ellipsoid ID image''': stack containing the ID of the biggest ellipsoid at each point, ranked in descending order (<math>0</math> is the largest ellipsoid).<br />
* '''Volume image''': image showing the volume of the largest ellipsoid containing that point.<br />
* '''Axis ratio images''': images showing <math>a/b</math> and <math>b/c</math> ratios foreach point containing at least one ellipsoid and NaN elsewhere.<br />
* '''Flinn peak plot''': plot of <math>a/b</math> vs <math>b/c</math> weighted by volume, so bright pixels indicate relatively more of the structure has that axis ratio.<br />
* '''Gaussian sigma:''' amount to blur the Flinn peak plot - set to <math>0</math> for a precise but less 'beautiful' result.<br />
* '''Flinn plot''': unweighted Flinn plot - every ellipsoid is represented by the same sized point regardless of ellipsoid size.<br />
<br />
==== Results ====<br />
* '''EF image''': stack containing EF values. NaN (not a number) values are used in the background. Summary statistics can be obtained by running Analyze > Histogram<br />
* '''Short-Mid image''': stack containing the <math>a/b</math> ratios<br />
* '''Mid-Long image''': stack contining the <math>b/c</math> ratios<br />
* '''Volume image''': stack containing ellipsoid volumes<br />
* '''Max id image''': stack containing the ID of the largest ellipsoid at each point; IDs relate to the sort order based on volume, so ID = 0 is the largest ellipsoid. <math>-1</math> is foreground and background is labelled with a large negative number.<br />
* '''Flinn diagram''': plot of <math>a/b</math> versus <math>b/c</math> values present in the volume<br />
* '''Weighted Flinn plot''': Flinn diagram with peaks of intensity proportional to volume occupied by each (<math>a/b</math>, <math>b/c</math>) ratio<br />
<br />
==== Related publications ====<br />
Salmon PL, Ohlsson C, Shefelbine SJ, Doube M (2015), ''Structure model index does not measure rods and plates in trabecular bone'', Frontiers in Endocrinology, 6:162, [http://dx.doi.org/10.3389/fendo.2015.00162 doi:10.3389/fendo.2015.00162].<br />
<br />
== Fit ellipsoid ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit ellipsoid''.<br />
<br />
Finds the ellipsoid that best fits a set of point or multi-point ROIs in the ROI Manager. ''Fit ellipsoid'' may fail to fit an ellipsoid. The more points you add, the more likely it is to succeed. Points are scaled to the spatial calibration (voxel widht, height &amp; depth) of the input image.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': ROIs with at least nine points in the ROI Manager.<br />
<br />
==== Results ====<br />
* '''Radii''': the radii ''a'', ''b'' and ''c'' of the fitted ellipsoid. Radius ''a'' is the shortest and ''c'' the longest.<br />
* '''Centroid''': ''x'', ''y'' and ''z'' coordinates of the ellipsoid centre point.<br />
<br />
==== Differences from BoneJ1 ====<br />
* Supports multi-point ROIs.<br />
* Plug-in cancels if an ellipsoid can't be found, instead of reporting invalid results.<br />
<br />
== Fit sphere (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit sphere''.<br />
<br />
Finds the sphere that best fits a set of point ROIs, and optionally displays the image data bounded by the sphere in a new image window. Place a set of point ROIs on structures of interest, hitting [T] to add each point to the ROI Manager. Fit Sphere takes the coordinates of the points from the ROI Manager and applies a least-squares optimisation.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': populated with at least 5 point ROI's<br />
* '''Copy Sphere''': Create a new stack containing image data from within the best-fit sphere.<br />
* '''Padding''': Number of black pixels to put between the sphere and the sides of the image<br />
* '''Inner Cube''': Create a new stack containing image data from the cube that just fits inside the best-fit sphere.<br />
* '''Outer Cube''': Create a new stack containing image data from the cube that the best-fit sphere just fits inside.<br />
* '''Crop Factor''': Radius used for generating new images is multiplied by crop factor so that a bigger or smaller volume can be produced.<br />
* '''Add to ROI Manager''': Add the sphere to the ROI Manager as a set of circular ROIs<br />
* '''Clear ROI Manager''': Clear any existing ROIs in the Manager prior to adding circles<br />
<br />
==== Results ====<br />
* '''X Centroid''': x-coordinate of sphere's centroid<br />
* '''Y Centroid''': y-coordinate of sphere's centroid<br />
* '''Z Centroid''': z-coordinate of sphere's centroid<br />
* '''Radius''': length of radius<br />
* '''Images (optional)''': images containing a copy of the original data within the sphere, or within cubes bounding or bounded by the sphere.<br />
<br />
== Fractal dimension ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fractal dimension''.<br />
<br />
This plug-in estimates the fractal dimension of an image by applying the box-counting algorithm. In this algorithm grids of diminishing size are scanned over the image, and the number of boxes containing at least one foreground voxel is counted. As the box size decreases and the grid becomes finer, the proportion of foreground boxes increases in a fractal structure. See [https://en.wikipedia.org/wiki/Box_counting Wikipedia] for further details. BoneJ uses a fixed-grid scan, with an option to try to find the optimal covering.<br />
<br />
The box counting algorithm produces a pair of <math>(log(n), -log(m))</math> values for each iteration it runs. Here n = number of boxes with foreground, and m = box size. These pairs are passed to a curve-fitting algorithm, which returns the slope of the linear function which describes them ([https://en.wikipedia.org/wiki/Linear_regression regression fit]). The coefficient of this slope is the fractal dimension.<br />
<br />
Fractal dimension is markedly influenced by the parameters selected for the box counting algorithm, so it's worth running it several times with different values to find an accurate measure for your image.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* ''Starting box size (px)'': the size (sides) in pixels of a box in the sampling grid in the first iteration of the algorithm.<br />
* ''Smallest box size (px)'': the minimum size in pixels of a box in the grid. When box size becomes smaller than this limit, the algorithm iterates one more time, and then stops.<br />
* ''Box scaling factor'': the term used to divide the box size after iteration. For example, a scaling factor of <math>2.0</math> halves the size at each step.<br />
* ''Grid translations'': how many times at each iteration the grid is moved to try to the find the optimal covering. The optimal covering covers the objects in the image with the least amount of boxes. The larger the parameter the more likely it is that optimal covering is found. However, this slows down the plug-in considerably.<br />
* ''Automatic parameters'': if checked, then the plug-in runs with default parameters.<br />
* ''Show points'': if checked, then the plug-in displays the <math>(log(n), -log(m))</math> values it calculated. <br />
<br />
==== Results ====<br />
* ''Fractal dimension'': the [https://en.wikipedia.org/wiki/Fractal_dimension fractal dimension] of the image. For example, the Koch snow flake has a fractal dimension of 1.262.<br />
* ''R²'': the [https://en.wikipedia.org/wiki/Coefficient_of_determination coefficient of determination] of the line fitted to the <math>(log(n), -log(m))</math> points.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* Algorithm parameters can be changed by the user.<br />
<br />
==== Related publications ====<br />
Fazzalari NL, Parkinson IH (1996), ''Fractal dimension and architecture of trabecular bone'', J Pathol, 178: 100-5, [http://dx.doi.org/10.1002/(SICI)1096-9896(199601)178:1%3C100::AID-PATH429%3E3.0.CO;2-K doi:10.1002/(SICI)1096-9896(199601)178:1<100::AID-PATH429>3.0.CO;2-K].<br />
<br />
== Inter-trabecular angles ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Inter-trabecular Angles''.<br />
<br />
The plug-in was designed to analyse the angles between trabeculae of cancellous bone. First it calls [[Skeletonize3D]] to thin the input image (if necessary). Then it calls [[AnalyzeSkeleton]], which creates a graph of the largest skeleton (by number of nodes) in the thinned image. The graph consists of nodes and the edges that connect them. Nodes are also known as vertices, and edges as branches. Roughly speaking the edges correspond to trabeculae and the nodes to the junction points, where trabeuculae meet.<br />
<br />
The graph is often not a perfect representation of the trabecular network in the input image. ''Inter-trabecular angles'' offers many options to adjust the graph's topology and filter out artefacts that may obfuscate or skew the results. First it allows you to filter out nodes with too many or too few edges. Secondly it can be used to prune very short edges, which often do not represent actual trabeculae. <br />
<br />
[[File:Ita_types.png|left|150 px|Types of edges in pruning]]<br />
Pruning works differently for different types of edges. There are four kinds: outer, dead-end, inner and short. An outer edge doesn't interconnect different parts of a graph. In other words, one (and only one) of its endpoints connects to only one branch, i.e. the edge itself. In the figure the outer edge is colored black. A dead-end (blue) is an outer edge whose length is less than the minimum set by the user, i.e. it's a short, outer edge. An inner edge (green) connects to end points with more than one branch. A short edge is an inner edge, whose length is less than the set minimum. When a dead-end is pruned, it with its "lonely" end-point are removed from the graph. When a short edge is pruned, it and it's endpoints are removed, and a new node is placed at the midpoint of the former. This new node connects to all the branches the previous nodes connected to.<br />
<br />
''Inter-trabecular angles'' offers two further options to control pruning: ''iteration'' and ''clustering''. Iteration repeats pruning until no new short edges are found. Sometimes pruning can create new short edges, and thus the graph may still have them after one iteration. However, iteration can alter the structure of the graph too dramatically. Clustering searches for all nodes connected by short edges, before removing any. In the figure, clustering pruning would remove the four nodes and the red edges between them in one go. It would create a new node at the center of the previous four, and connect it to the blue and green edges. When pruning is not clustering, it removes edges one-by-one. This changes the end result depending on the order the edges are traversed. Clustering creates the same result each time. <br />
<br />
Pruning also removes loops and redundant parallel edges. The former connects to the same node on both ends, and the latter connects two nodes that are already connected by another edge. <br />
<br />
The pruning and filtering features were added so that we can replicate and continue from the research of [https://doi.org/10.1016/j.actbio.2016.08.040 Reznikov et al.]<br />
<br />
==== Suitable images ====<br />
An 8-bit, binary 2D or 3D image. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
*'''Minimum valence''': minimum number of branches for a node to be included in the analysis.<br />
*'''Maximum valence''': maximum number of branches for a node to be included in the analysis.<br />
*'''Minimum trabecular length (px)''': minimum length for a branch to be preserved in the pruning. Length is calculated as the distance between the endpoints of a branch.<br />
** This length is also displayed in the units of the image calibration<br />
*'''Margin (px)''': minimum distance of a node from image stack edges to be included in the analysis. Having nodes too close to the edges can make the results less accurate, because you get more branches that do not terminate to a node at the other end.<br />
*'''Iterate pruning''': repeat pruning until no more new short branches are discovered. When true, the topology of the graph is likely to change more in the pruning.<br />
*'''Use clusters''': if true then the pruning result is independent of the order in which the graph is traversed. False corresponds with methodology in Reznikov's article. See above for more details.<br />
*'''Print centroids''': Print the centroids (center coordinates) of the node pairs at the ends of each edge.<br />
*'''Print % culled edges''': Print statistics of different types of edges pruned.<br />
<br />
==== Results ====<br />
*'''Inter-trabecular angles''': angles between each branch of each node included in the analysis. Sorted into columns according to the number of branches per node. For example, column ''"3"'' shows the angles between branches of nodes with three branches.<br />
*'''Centroids''' (optional): A table of the center coordinates of the node pairs at the ends of each edge.<br />
*'''Culled edge percentages''' (optional): A table showing the percentages of different kinds of edges pruned, compared to the total number of edges in the analysed graph.<br />
*'''Skeleton''' (optional): if the plug-in had to skeletonise the input image, it displays the result of the thinning.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Inter-trabecular angles generalizes the idea of ''Triple point angles'' for any types of points. It also provides more tools for adjusting the graph for analysis.<br />
<br />
==== Related publications ====<br />
Reznikov, N et al. (2016), ''Inter-trabecular angle: A parameter of trabecular bone architecture in the human proximal femur that reveals underlying topological motifs'', Acta Biomaterialia, 44: 65--72, [https://doi.org/10.1016/j.actbio.2016.08.040 doi:j.actbio.2016.08.040].<br />
<br />
== Local thickness ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Thickness''.<br />
<br />
This plug-in includes [[Local_Thickness]] in BoneJ, and provides some additional options &amp; results. Local thickness measures ''the diameter of the largest sphere that fits inside the object and contains the point'' for each point i.e. foreground voxel in an image. The plug-in calculates mean and standard deviation of the trabecular thickness (Tb.Th) or trabecular spacing (Tb.Sp) directly from pixel values in the resulting thickness map. Foreground voxels are considered trabeculae, and background voxels are the spacing. Processing time is heavily dependent on feature size (in pixels); large features can take a very long time to process.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
* '''Calculate''': chooses which thickness maps to calculate - trabecular thickness, trabecular spacing, or both. In order to calculate trabecular spacing, the image voxels are inverted.<br />
* '''Show thickness maps''': display the calculated thickness maps or not.<br />
* '''Mask thickness maps''': remove artifacts from the thickness maps. Artifacts are foreground voxels not present in the original image.<br />
* '''Crop to ROI manager''': create thickness maps only from the area bounded by the ROIs in the ROI manager. Checking this option requires you've added ROIs to the ROI manager.<br />
<br />
==== Results ====<br />
* The mean and standard deviation for each thickness map calculated.<br />
* Displays thickness map images if ''Show thickness maps'' was selected. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Calls the latest version of [[Local_Thickness]].<br />
* Thickness values for background voxels are marked ''NaN'' instead of ''0''.<br />
<br />
==== Related publications ====<br />
* Dougherty R, Kunzelmann K (2007), ''Computing local thickness of 3D structures with ImageJ'', Microsc. Microanal., 13: 1678-1679, [http://dx.doi.org/10.1017/S1431927607074430 doi:10.1017/S1431927607074430]<br />
* Hildebrand T, Rüegsegger P (1997), ''A new method for the model-independent assessment of thickness in three-dimensional images'', J. Microsc., 185: 67-75, [http://dx.doi.org/10.1046/j.1365-2818.1997.1340694.x doi:10.1046/j.1365-2818.1997.1340694.x]<br />
<br />
== Moments of inertia (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Moments of Inertia''<br />
<br />
Calculates the three orthogonal principal axes and moments of inertia around those axes. It includes pixels with values between upper and lower limits, which can be defined in terms of unitless grey values or Hounsfield units (HU). It optionally creates a new stack with the image centred and rotated so that the principal axes are parallel to the image stack's x, y and z axes. Calculations are limited to a rectangular ROI if one is drawn. The plugin will guess whether the image is HU calibrated, and if so, apply HU limits of bone (0-4000 HU), otherwise it will calculate auto-thresholds based on the stack's histogram. If a calibration curve is known, the coefficients can be added to get weighted calculations. Aligning a bone with Moments of Inertia may be a useful step prior to Slice Geometry if bones are not aligned with the image z axis.<br />
<br />
==== Suitable images ====<br />
An 8-bit or 16-bit image.<br />
<br />
==== Parameters ====<br />
* '''Start slice''': First slice to include in calculations<br />
* '''End slice''': Last slice to include in calculations<br />
* '''HU Calibrated''': Plugin will guess whether the image is HU calibrated. If image is HU calibrated, make sure the box is checked and enter HU calibrated numeric values in the following fields<br />
* '''Bone Min''': Lower threshold, in either uncalibrated greys or HU<br />
* '''Bone Max''': Upper threshold, in either uncalibrated greys or HU<br />
* '''Slope''': m where physical density = m × pixel value + c<br />
* '''Y Intercept''': c where physical density = m × pixel value + c<br />
* '''Align result''': Draw a new stack with the principal axes parallel to the image axes<br />
* '''Show axes (2D)''': Draw the axes in white on the aligned image<br />
* '''Show axes (3D)''': Display the stack and its principal axes in a 3D Viewer window<br />
<br />
==== Results ====<br />
* '''Image (optional)''': a copy of the input image centered and aligned with the principal axes<br />
* '''Xc''': Centroid x-coordinate (mass-weighted by calibrated density)<br />
* '''Yc''': Centroid y-coordinate<br />
* '''Zc''': Centroid z-coordinate<br />
* '''Vol''': Total volume of thresholded voxels<br />
* '''Mass''': Mass of bone, from pixel values and density calibration coefficients<br />
* '''Icxx''': Moment around x axis passing through centroid<br />
* '''Icyy''': Moment around y axis passing through centroid<br />
* '''Iczz''': Moment around z axis passing through centroid<br />
* '''Icxy''': Off-axis term for constructing inertia tensor<br />
* '''Icxz''': Off-axis term for constructing inertia tensor<br />
* '''Icyz''': Off-axis term for constructing inertia tensor<br />
* '''I1''': Moment around the shortest principal axis<br />
* '''I2''': Moment around the middle principal axis<br />
* '''I3''': Moment around the longest principal axis<br />
* '''Verbose output in Log window'''<br />
** '''Eigenvalues''': Result of of eigenvalue decomposition. Moments of inertia<br />
** '''Eigenvectors of principal axes''': orientation of input image<br />
** '''Inverse eigenvector matrix''': used to map voxel positions in the aligned image back to voxel positions in the original image<br />
* Optional 3D display of principal axes<br />
<br />
== Optimise threshold (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Optimise Threshold''<br />
<br />
Several histogram-based methods exist for automatic determination of threshold for binary segmentation, but in ImageJ these are currently limited to pixel values in a single slice. The result can be excluding high values in a stack that are higher than the highest value in the current slice. This plugin uses all the pixels in a stack to construct a histogram and uses ImageJ's built-in isodata algorithm to determine the threshold. It optionally tests values either side of the initial auto-threshold for connectivity, because connectivity is very sensitive to image noise. The plugin attempts to find the threshold that results in minimal connectivity. Purification, erosion and dilation can improve the connectivity estimate, so Purify is always called, and erosion and dilation are applied as part of a sequence: purify, erode, purify, dilate.<br />
<br />
==== Suitable images ====<br />
An 8-bit of 16-bit image<br />
<br />
==== Parameters ====<br />
* '''Threshold Only''': Determine the threshold from the stack histogram only<br />
* '''Apply Threshold''': Replace the input image with a thresholded version<br />
* '''Show Plot''': Display a graph showing connectivity versus threshold<br />
* '''Tests''': Number of different thresholds to test for connectivity<br />
* '''Range''': Proportion of the initial threshold to test above and below initial thresholds<br />
* '''Subvolume Size''': Size of the volume to test for connectivity. Set small for a faster run and large to test the whole stack<br />
* '''Erosion Cycles''': Number of times to erode the stack after initial purification<br />
* '''Dilation Cycles''': Number of times to dilate the stack after secondary purification<br />
<br />
==== Results ====<br />
* '''Thresholded stack (optional)'''<br />
* '''Plot of connectivity versus threshold (optional)'''<br />
* '''Log of optimal threshold value'''<br />
<br />
== Orientation (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Orientation''<br />
<br />
Sets the direction in a 2D image, without rotating the image or changing it in any way. ''Slice Geometry'' (see below) uses ''Orientation'' to calculate diameter, second moments of area and section moduli around anatomic axes set by the user.<br />
<br />
==== Suitable images ====<br />
A 2D image.<br />
<br />
==== Parameters ====<br />
* '''Orientation''': input field displays current orientation (clockwise from 12 o'clock) and takes keyboard input<br />
* '''deg / rad''': display and set orientation in degrees or radians<br />
* '''Principal direction''': the main direction, the head of which is displayed in red<br />
* '''Secondary direction''': the orthogonal direction<br />
* '''Reflect''': swap the labels on this axis<br />
<br />
==== Results ====<br />
* '''Orientation axes''': draws the axes of the orientation on the image.<br />
<br />
== Purify (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Purify''<br />
<br />
Purify locates all particles in 3D and removes all but the largest foreground and background particles.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary.<br />
<br />
==== Parameters ====<br />
* '''Labelling algorithm''':<br />
** '''Mapped''': Non-recursive, memory efficient and fast.<br />
** '''Multithreaded''': use multiple cores and job chunking to reduce recursion. Fast on small stacks and if you have many CPU cores.<br />
** '''Linear''': Non-recursive but heavy on RAM and single-threaded. Fast on big stacks, but only if you have the memory.<br />
* '''Chunk Size''': number of slices to use in each particle labelling thread. If images are large, set this to 2<br />
* '''Performance Log''': Show verbose performance information to help tune your system<br />
* '''Make copy''': If checked, shows the result in a new window; if unchecked the result replaces the original image.<br />
<br />
==== Results ====<br />
* '''Performance metrics (optional)'''<br />
** '''Threads''': Number of CPU cores used<br />
** '''Slices''': Number of slices in the input image stack<br />
** '''Chunks''': Number of chunks of slices, each chunk is processed independently<br />
** '''Chunk size''': Number of slices per chunk<br />
** '''Last chunk size''': size of the last chunk (the remainder chunk)<br />
** '''Duration''': time in seconds to complete purification<br />
* '''Purified image''': optionally in a new image window.<br />
<br />
== Skeletonise ==<br />
Menu path ''Plugins &gt; BoneJ &gt;Skeletonise''.<br />
<br />
This plug-in simply includes [[Skeletonize3D]] in BoneJ. It adds some additional validation to check that your image suits the tool.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[Skeletonize3D]].<br />
<br />
== Slice geometry (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Slice Geometry''<br />
<br />
Slice Geometry calculates cross-sectional geometric properties of shapes: cross-sectional area, centroid, mean density, second moment of area, section modulus, Feret diameter and local thickness (2D and 3D). Measurements can be limited to a rectangular ROI. If your bone is not well aligned with the image axes, you may find it useful to align the bone to its principal axes using Moments of Inertia or by exporting a transformed volume from the ImageJ 3D Viewer. Importantly, no assumption of geometry is made for any of the measurements.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Bone''': Slice Geometry will guess from your image title the bone it is working on. If it is wrong, correct it. If your bone of interest isn't listed, email me.<br />
* '''2D Thickness''': Run Thickness on a per-slice basis; this fits circles rather than spheres<br />
* '''3D Thickness''': Run Thickness on the whole stack, fitting spheres, then report results per slice<br />
* '''Draw Axes''': Draw axes on an annotated copy of the stack<br />
* '''Draw Centroids''': Draw centroids on an annotated copy of the stack<br />
* '''Annotated Copy (2D)''': Create a new stack showing the centroids and principal axes<br />
* '''3D Annotation''': Display the stack, principal axes and centroids in the 3D viewer<br />
* '''Process Stack''': Calculate parameters for all slices in the stack<br />
* '''Clear Results''': Remove all data in the results table without saving, prior to calculating parameters<br />
* '''Use Orientation''': Also calculate parameters based on directions defined in Orientation<br />
* '''HU Calibrated''': Allows you to enter your thresholds in Hounsfield units (HU) or uncalibrated units<br />
* '''Bone Min''': minimum pixel value to use in calculations<br />
* '''Bone Max''': maximum pixel value to use in calculations<br />
* '''Slope''': <math>m</math> where physical density <math>= m * pixel value + c</math><br />
* '''Y Intercept''': <math>c</math> where physical density <math>= m * pixel value + c</math><br />
* '''Note''': density-weighted calculations are only applied to centroid determination at present<br />
* '''Partial volume compensation''': Use model that assumes Gaussian blur of imaging modality and linear transform between pixel value and sample 'density' to correct for blurred and pixelated images (e.g. small bone in clinical CT)<br />
* '''Background''': pixel value that corresponds to zero bone density (could be the 'fat', 'air' or 'muscle' pixel value)<br />
* '''Foreground''': pixel value that corresponds to 100% bone density<br />
* '''A rectangular ROI (optional)''': if there's a ROI, calculations are limited to its area.<br />
<br />
==== Results ====<br />
* '''Images (optional)''': displays the result images selected in the parameters<br />
* '''Bone code''': Unique numeric identifier for the anatomic name of each bone. Further bone codes can be added to BoneJ on request<br />
* '''Slice''': slice number indicating which slice contributed image data for this row of the results<br />
* '''CSA''': cross-sectional area<br />
* '''X cent.''': Centroid x-coordinate<br />
* '''Y cent.''': Centroid y-coordinate<br />
* '''Density''': mean physical density, calculated from pixel values and calibration coefficients<br />
* '''wX cent''': Density-weighted x-coordinate of centroid<br />
* '''wY cent''': Density-weighted y-coordinate of centroid<br />
* '''Theta''': angle of minor axis (axis for Imin, the long axis of your specimen's cross section) from the horizontal, ranging from <math>-\pi/2</math> to <math>\pi/2</math>, with positive as clockwise<br />
* '''R1''': maximum chord length from minor axis<br />
* '''R2''': maximum chord length from major axis<br />
* '''Imin''': Second moment of area around major axis<br />
* '''Imax''': Second moment of area around minor axis<br />
* '''Ipm''': Product moment of area (= 0 if no errors are present, e.g. due to pixelation)<br />
* '''Zmax''': Section modulus around major axis (Imax / R2)<br />
* '''Zmin''': Section modulus around minor axis (Imin / R1)<br />
* '''Zpol''': Polar section modulus<br />
* '''Feret Min''': Minimum caliper width<br />
* '''Feret Max''': Maximum caliper width<br />
* '''Feret Angle''': Orientation of maximum caliper width<br />
* '''Perimeter''': Distance around external surface<br />
* '''Max Thick 2D''': Maximum thickness determined by local thickness in 2D<br />
* '''Mean Thick 2D''': Mean thickness determined by local thickness in 2D<br />
* '''SD Thick 2D''': Standard deviation of the mean thickness determined by local thickness in 2D<br />
* '''Max Thick 3D''': Maximum thickness in this slice determined by local thickness in 3D<br />
* '''Mean Thick 3D''': Mean thickness in this slice determined by local thickness in 3D<br />
* '''SD Thick 3D''': Standard deviation of the mean thickness in this slice determined by local thickness in 3D Directional measurements, using Orientation directions, and the specimen's slice centroid<br />
* '''A (rad)''': Principal orientation (direction A)<br />
* '''B (rad)''': Secondary orientation (direction B)<br />
* '''IAa''': Second moment of area around Aa axis<br />
* '''IBb''': Second moment of area around Bb axis<br />
* '''ZAa''': Section modulus around Aa axis<br />
* '''ZBb''': Section modulus around Bb axis<br />
* '''RAa''': maximum chord length from Aa axis<br />
* '''RBb''': maximum chord length from Bb axis<br />
* '''DAa''': Calliper diameter in direction of Aa<br />
* '''DBb''': Calliper diameter in direction of Bb<br />
<br />
== Surface area ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Surface area''<br />
<br />
''Surface area'' creates a mesh from the bone in the image, and then calculates the area of the surface of the mesh. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Export STL file(s)''': if checked, then the meshes created from the image are saved as .stl-files. A dialog opens for you to select a folder for the files.<br />
<br />
==== Results ====<br />
* '''Surface area''': the surface area of the bone mesh<br />
* '''STL-file''': the mesh created from the bone image<br />
<br />
The surface area is reported and an .stl-file saved separately for each 3D subspace in the image. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Isosurface''<br />
<br />
== Surface fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Surface fraction''<br />
<br />
''Surface fraction'' calculates the fraction of bone volume in an image by comparing meshes created from bone particles and the whole image. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone. <br />
<br />
More formally defined, ''Surface fraction'' calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary.<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the mesh created from bone voxels.<br />
* '''Total volume''': volume of the mesh created from the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Volume fraction''<br />
<br />
== Results table ==<br />
The BoneJ plug-ins print their results into a shared result table. This is because we often need to calculate several measures for the same image, so it's handy to have them on one row. Repeated measures for the same image are reported on different rows. The results persist even if the table is closed. To clear the table run ''Plugins &gt; BoneJ &gt; Table &gt; Clear BoneJ results''.<br />
<br />
Note that some of the plug-ins (marked with ''WIP'') still use a ImageJ1 style results table that works slightly differently. As they are modernized they'll move to use the same new table as the others.<br />
<br />
== Usage reporting ==<br />
Menu path '' Edit &gt; Options &gt; BoneJ Usage (Modern | Legacy)''<br />
<br />
==== What is collected? ====<br />
<br />
BoneJ uses Google Analytics to report when a plugin's run() method completes successfully.<br />
<br />
<code><br />
ht<span>tp://</span>www.google-analytics.com/__utm.gif?utmwv=5.2.5&utms=0&utmn=1074354874&utmhn=bonej.org&utmt=event&utme=5(Plugin%20Usage*org.bonej.wrapperPlugins.wrapperUtils.UsageReporterOptions*0.5.1)&utmcs=UTF-8&utmsr=3840x1080&utmvp=3840x1080&utmsc=24-bit&utmul=en-gb&utmje=0&utmcn=1&utmdt=bonej.org%20Usage%20Statistics&utmhid=512699200&utmr=-&utmp=%2Fstats&utmac=UA-366405-8&utmcc=__utma%3D1589599318.1327557233.1538550102.1538550102.1538550102.2%3B%2B__utmz%3D1589599318.1538550102.79.42.utmcsr%3Dgoogle%7Cutmccn%3D(organic)%7Cutmcmd%3Dorganic%7Cutmctr%3DBoneJ%20Usage%20Reporter%3B<br />
</code><br />
<br />
A one-pixel GIF image is requested from Google, with a rather long set of parameters. Reported details are:<br />
<br />
* A unique ID which is stored in your ImageJ preferences between sessions<br />
* Your screen resolution<br />
* The name of the plugin's Java class<br />
* The version of BoneJ<br />
* The first time, last time and current time you ran a BoneJ plugin<br />
* Your system language and character map<br />
* Google also records your IP address as all webservers do in their logs<br />
* Some of these values are saved in your preferences<br />
* Your operating system and Java version are reported in the user agent ID<br />
<br />
==== What does the report look like? ====<br />
<br />
Data are collated with the Analytics report already used to track hits on bonej.org.<br />
<br />
==== For what is the data used? ====<br />
<br />
So far, BoneJ has been supported mainly by grants to scientists. We wish to create quantitative reports that detail how much BoneJ is being used in the community, so that decisions to fund further development can be made rationally.<br />
<br />
In addition, development resources are limited so it is useful to see which features are used heavily and can be consolidated, while little-used features can be abandoned or made more useful.<br />
<br />
==== That is noble but my work is top secret ====<br />
<br />
If you are uncomfortable with this level of data collection then please opt out, at the dialog which is prompted on first run, or by running '' Edit &gt; Options &gt; BoneJ Usage (Modern | Legacy) ''. Hitting Cancel (Legacy) or unchecking the box (Modern) will prevent any report from being gathered or sent and will also clear any values that were previously saved.<br />
<br />
You can opt back in by running '' Edit &gt; Options &gt; BoneJ Usage (Modern | Legacy)'', checking the box (Modern only) and hitting OK.<br />
<br />
==== Can I see the report? ====<br />
<br />
At the moment the report is kept private. If there is a strong will from the user community, who created the data in the first place, the report could be made more open. Please feel free to discuss on the user forum.<br />
<br />
==== How is it implemented? ====<br />
<br />
You can read the code on Github and in every copy of BoneJ. If you turn on ImageJ's debug mode (in '' Edit &gt; Options &gt; Misc. '') the URL and the GIF response will be logged to ImageJ's log window.<br />
<br />
== Where is my favourite plug-in? ==<br />
We have removed some plug-ins from BoneJ. ''Neck shaft angle'', ''Plateness'' and ''Structure model index'' have been discontinued. ''Interpolate ROIs'', [http://imagej.net/3D_Binary_Filters ''Dilate 3D'' and ''Erode 3D''] come pre-packaged with ImageJ, so they are no longer included in BoneJ2.<br />
<br />
Support for ''Kontron IMG'', ''Scanco ISQ'' and ''Stratec pQCT'' file formats has been moved to [[SCIFIO]]. Just run ''Edit &gt; Options &gt; ImageJ2'', and check ''Use SCIFIO when opening files''. When the option is enabled, these kinds of files can be opened from ''File > Open'' or dragging &amp; dropping them like any other format. <br />
<br />
''Distribution analysis'' and other pQCT related tools can now be downloaded independently from the [[PQCT]] update site.<br />
<br />
== Licence ==<br />
BoneJ2 is free, open-source software. You can redistribute it and/or modify it under the terms of the [https://github.com/bonej-org/BoneJ2/blob/master/LICENCE.md BSD 2-clause licence]. The software is provided "as is" and any warranties are disclaimed. In no event shall the copyright holder or contributors be liable.<br />
<br />
== Citation ==<br />
If you'd like to cite the software, we will soon publish a paper about BoneJ experimental. You can read the draft (and send us your feedback) as we're writing it [https://v1.overleaf.com/read/yxdkwpcdkjzj for Wellcome Open Research on Overleaf]. We recommend you cite the specific release used in your research.<br />
<br />
== Funding ==<br />
The redesign and porting effort to create BoneJ2 was supported by a [https://wellcome.ac.uk/what-we-do/directories/biomedical-resource-technology-development-grants-people-funded Wellcome Trust Biomedical Resource and Technology Development Grant]. Interaction with [[SciView]] was assisted by a [https://royalsociety.org/grants-schemes-awards/grants/international-exchanges/ Royal Society International Exchange grant].</div>Mdoubehttps://imagej.net/index.php?title=BoneJ2&diff=38576BoneJ22018-10-04T08:29:21Z<p>Mdoube: /* Can I see the report? */</p>
<hr />
<div>{{Infobox<br />
| name = BoneJ2<br />
| software = ImageJ<br />
| logo = [[File:Bonej-icon.png|96px]]<br />
| author = {{Person|Michaeldoube}}, {{Person|Rdom}}, {{Person|Alessandrofelder}}<br />
| maintainer = {{Person|Michaeldoube}}, {{Person|Alessandrofelder}}<br />
| source = {{GitHub|org=bonej-org|repo=BoneJ2}}, [https://doi.org/10.5281/zenodo.1427262 doi:10.5281/zenodo.1427262]<br />
| released = Dec 11<sup>th</sup>, 2017<br />
| latest version = cuneiform-experimental-patch2, Sep 24<sup>th</sup>, 2018<br />
| status = Active, Experimental<br />
}}<br />
BoneJ is a collection of skeletal biology plug-ins for ImageJ.<br />
This is the new experimental, modernized version of the software available through the ImageJ [http://imagej.net/Updater updater]. Its update site is called [http://sites.imagej.net/BoneJ BoneJ experimental]. For the old ImageJ1 version, see [[BoneJ]].<br />
<br />
This version works with the latest Fiji, and complies with the modern ImageJ [[architecture]]. Most plug-ins also now support hyperstacks, i.e. images with multiple channels or time frames.<br />
<br />
As the code is still experimental, it's still likely to change a lot. This means any scripts using the code might break, results can change, and plug-ins gain and lose parameters. Tools marked with ''WIP'' (work in progress), are more likely to undergo large changes. <br />
<br />
Below is the documentation for the plug-ins included in BoneJ experimental.<br />
<br />
== Installation ==<br />
[[File:Install-bonej.png|400 px|Installation steps]]<br />
# [http://imagej.net/Downloads Download] the latest version of Fiji for your operating system<br />
# Launch Fiji<br />
# Select in the menu ''Help'' &gt; ''Update...''<br />
# Click ''Manage update sites''<br />
# Check ''BoneJ experimental''<br />
# Click ''Close''<br />
# Click ''Apply changes''<br />
After the downloads have finished, close and restart Fiji.<br />
<br />
== Analyse skeleton ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyse skeleton''.<br />
<br />
This plug-in simply includes [[AnalyzeSkeleton]] in BoneJ. It adds some additional validation to check that your image suits the tool. It also skeletonizes your image by calling [[Skeletonize3D]] if needed.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[AnalyzeSkeleton]].<br />
<br />
== Anisotropy ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Anisotropy''.<br />
<br />
Anisotropy is used to quantify the directionality of trabecular bone. It tells whether the trabeculae have a certain orientation, or if they're randomly aligned. The method to measure anisotropy is fairly complex and consists of multiple steps:<br />
<br />
# Find mean intercept length (MIL) vectors from <math>n</math> directions<br />
# Plot MIL vectors into a point cloud<br />
# Solve the equation of an ellipsoid that best fits the point cloud<br />
# Calculate the degree of anisotropy from the radii of the ellipsoid<br />
<br />
It's important to note that algorithm is stochastic and does not guarantee exact results. Thus it's recommended to run it several times to establish the degree of anisotropy in your image.<br />
<br />
[[File:PhaseChanges.png|left|150 px|The red dots mark phase changes]]<br />
<br />
In the first step the algorithm draws parallel lines over the input image in direction <math>\mathbf{v}</math>. The direction is chosen randomly. Each line segment in the image stack is sampled to find points where it changes from background to foreground, i.e. where the line enters an object. The points are called ''phase changes'', in the adjacent figure they're marked with red dots. After the sampling is complete, the algorithm forms a ''MIL vector'', whose length is the total length of the line segments divided by the total number of phase changes found. The MIL vector has the same direction as <math>\mathbf{v}</math>. Drawing and sampling the lines is repeated for <math>n</math> directions, and the method creates <math>n</math> MIL vectors.<br />
<br />
After the MIL vectors have been calculated, they are added to a point cloud (a collection of points) around the origin. Then the method tries solve the equation of an ellipsoid that would fit the cloud. There may be no solution, especially if there are few points. That is, the fitting may fail at which point the plug-in stops. The radii of this ellipsoid determine the degree of anisotropy (see [http://imagej.net/index.php?title=BoneJ_experimental&action=submit#Results results]).<br />
<br />
[[File:MilCube.png|right|200 px|Projecting lines from a plane]]<br />
<br />
In more detail, the lines in the first step are projected from a <math>d * d</math> plane with normal <math>\mathbf{v}</math> (see the adjacent figure). The size <math>d = \sqrt{w^{2} + h^{2} + d^{2}}</math>, where <math>w, h, d</math> are the dimensions of the image stack. Each of the lines originates from a random point <math>\mathbf{o}</math> on the plane. The plane is divided into <math>m * m</math> same-sized sections, where <math>m</math> is a number selected by the user (i.e. ''Lines per dimension''). One origin <math>\mathbf{o}</math> is randomly selected from within each section. The lines are projected until they intercept the stack edges at points <math>\mathbf{o} + t_{min}\mathbf{v}</math>,<math>\mathbf{o} + t_{max}\mathbf{v}</math> (the algorithm solves for <math>t_{min}</math>, <math>t_{max}</math>). These line segments within the stack are then sampled for phase changes. In this drawing method some lines may miss the image stack completely, but conversely there aren't any areas in the stack that don't have an equal chance of being sampled.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
The plug-in is intended to analyse the "texture" of an object thus it suits samples of a larger whole, e.g. a trabecular cube that fills the whole stack. The results for whole objects such as the pre-packaged ''Bat Cochlea Volume'' ImageJ sample image are not really meaningful.<br />
<br />
==== Parameters ====<br />
* '''Directions''': number of times sampling is performed from different directions. The minimum is <math>9</math>, because that's how many independent variables the algorithm needs to solve the "shape" of the orientation in the image.<br />
* '''Lines per dimension''': controls how many parallel lines are drawn per each direction. For example, if ''lines per dimension'' is <math>2</math> then ''Anisotropy'' draws <math>4</math> lines. In this case, the origin points of the lines are randomly selected from within the <math>4</math> equal sections of the sampling plane (see above detailed explanation). The number is squared, because the location of the origins can vary in two dimensions.<br />
<br />
then the plane is divided into <math>4</math> equal sections, and a line is drawn from each. The origin point of each line is randomly located within their section.<br />
* '''Sampling increment''': controls how often each line is sampled. The default is <math>1.0</math>, which means that after each step a unit vector (a <math>1\_px</math> long line) is added to the position along a sampling line. The number of samples taken per line depends on the length of the line segment within the image stack.<br />
* '''Recommended minimum''': if checked, then the above three parameters are set to the recommended minimum values. In our tests we found that with these values the results are quite stable, and fitting unlikely to fail. However, these minimums are not guaranteed to be the best settings for your image.<br />
* '''Show radii''': if checked, then the radii of the fitted ellipsoid are shown in the results table.<br />
<br />
==== Results ====<br />
* '''Degree of anisotropy''': how much orientation there is in the structure. <math>0.0</math> means the image is completely isotropic, the sample has no directionality whatsoever. <math>1.0</math> means there is very strong orientation in the structure of the image. Note that these are theoretical minimum and maximum values. Due the stochastic nature of the algorithm, even an empty stack will have non-zero degree of anisotropy.<br />
* '''Radii of fitted ellipsoid''' (optional): the lengths of the radii <math>a \leq b \leq c</math> of the ellipsoid fitted on the MIL points. Degree of anisotropy <math>= 1.0 - a/c</math>.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* The results of this Anisotropy do not stabilize, so it's not repeated automatically like in BoneJ1. However, the results vary less between runs.<br />
* MIL vectors are drawn differently. In BoneJ1 they're drawn in sphere-shapes around random seed points. Here parallel lines from different directions are drawn through the whole stack. We think this method produces more uniform sampling, i.e. there's less chance of a directional bias.<br />
<br />
==== Related publications ====<br />
* Odgaard A (1997), ''Three-dimensional methods for quantification of cancellous bone architecture'', Bone, 20, 315-328, [http://dx.doi.org/10.1016/S8756-3282(97)00007-0 doi:10.1016/S8756-3282(97)00007-0]<br />
* Harrigan TP, Mann RW (1984), ''Characterization of microstructural anisotropy in orthotropic materials using a second rank tensor'', J Mater Sci, 19, 761-767, [http://dx.doi.org/10.1007/BF00540446 doi:10.1007/BF00540446]<br />
<br />
== Area/Volume fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Area/Volume fraction''<br />
<br />
''Area/Volume fraction'' calculates the fraction of bone in an image by it to the whole image. It counts all the foreground voxels, which it assumes represent bone, and compares them to the total number of voxels in the image. More formally defined, the plug-in calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''. In case of a 2D image, it calculates the fraction ''BA/TA'', which is the area of bone per unit area of the sample.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the bone voxels.<br />
* '''Total volume''': volume of the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 2D/3D subspace in the image, i.e. for each channel and time frame. Results will be for ''area'' if image is 2D.<br />
<br />
==== Differences to BoneJ1 ====<br />
* In BoneJ1 the plug-in was called ''Volume fraction''<br />
* Can process 2D images<br />
* Supports hyperstacks <br />
<br />
== Calibrate SCANCO (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyze &gt; Calibrate SCANCO''<br />
<br />
Applies the ''mg HA/ccm'' pixel value calibration, i.e. ''HU'' or Hounfield unit calibration stored in the .isq format metadata to the image.<br />
<br />
==== Suitable images ====<br />
An .isq format image generated by Scanco X-ray microtomography scanners.<br />
<br />
== Check voxel depth (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Check Voxel Depth''<br />
<br />
Checks whether slice spacing has been calibrated correctly. Some DICOM images contain slice thickness data in the header information, but thickness is not necessarily the same as the physical distance between consecutive slices' positions.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Connectivity ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Connectivity''.<br />
<br />
The Connectivity plug-in is designed to estimate the number of connected structures i.e. trabeculae in a trabecular network. This ''connectivity'' measure is related to a topological number <math>\chi</math> known as ''Euler characteristic'', ''Euler number'' or ''Euler-Poincaré characteristic''. Mathematically defined connectivity is <math>= 1 - (\chi + \Delta\chi)</math>. Roughly speaking, <math>\chi</math> describes the shape or structure of a topological space. It can also be expressed as <math>\chi = objects - handles + cavities</math>, where a handle is a hole that goes through an object (e.g the hole in a doughnut, or the ear of a coffee mug), and a cavity is enclosed inside one. When measuring trabecular cubes, you need to add <math>\Delta\chi</math> to <math>\chi</math> to get a more accurate estimate of the connectivity of the whole network. The term <math>\Delta\chi</math> corrects for the change in the topology of an object, when it's cut to pieces. <br />
<br />
NB some other Euler characteristic implementations report <math>\chi + \Delta\chi</math> as <math>\chi</math>, i.e. in them the correction <math>\Delta\chi</math> is implicit.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary. The plug-in assumes that there is only one particle in the foreground; to achieve this, run ''Purify''. Having more than one object often leads to negative connectivity.<br />
<br />
==== Results ====<br />
* '''Euler characteristic (χ)''': describes the shape of the object(s) in the image, <math>\chi = objects - handles + cavities</math>.<br />
* '''Corrected Euler (χ + Δχ)''': the Euler characteristic of the part corrected for edge effects to fit the whole.<br />
* '''Connectivity''': gives an estimate of the number of connected trabeculae in the image. Equal to <math>1 - (\chi + \Delta\chi)</math>.<br />
* '''Conn. density''': connectivity divided by unit volume. <br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* The old version reported ''Corrected Euler (χ + Δχ)'' incorrectly as ''Δχ''<br />
<br />
==== Related publications ====<br />
* Odgaard A, Gundersen HJG (1993), ''Quantification of connectivity in cancellous bone, with special emphasis on 3-D reconstructions'', Bone 14: 173-182, [http://dx.doi.org/10.1016/8756-3282(93)90245-6 doi:10.1016/8756-3282(93)90245-6.]<br />
* Toriwaki J, Yonekura T (2002), ''Euler number and connectivity indexes of a three dimensional digital picture'', [http://www.scipress.org/journals/forma/abstract/1703/17030183.html Forma 17: 183-209]<br />
<br />
== Delete slice range (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Delete slice range''<br />
<br />
Removes a range of slices from a stack, so that cropping in the Z direction is practical.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Ellipsoid factor (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Ellipsoid factor''.<br />
<br />
Ellipsoid Factor is a new method for measuring rod/plate geometry. It uses the axis lengths from prolate, oblate and intermediate elipsoids to determine how prolate or oblate the trabecular space is at a particular point. Highly prolate (javelin-shaped, rod-like) ellipsoids have a single long axis (<math>c</math>) and two short axes (<math>a, b</math>) such that <math>a < b \ll c</math> , whereas highly oblate (discus-shaped, plate-like) ellipsoids have two longer axes (<math>b, c</math>) and one much shorter axis (<math>a</math>) so that <math>a \ll b < c</math>. Calculating <math>EF</math> as the difference in ratios, <math>EF = a/b - b/c</math> leads to a useful scale ranging from <math>-1</math> (oblate, <math>a/b \approx 0, b/c \approx 1</math>) to <math>+1</math> (prolate, <math>a/b \approx 1, b/c \approx 0</math>). <math>EF</math> of <math>0</math> indicates an intermediate ellipsoid where <math>a/b = b/c</math>, which is the case for spheres (<math>a = b = c</math>) and other ellipsoids with axis ratios <math>a:qa:q^{2}a</math>. Ellipsoid Factor runs [[Skeletonize3D]] to get the medial axis of the trabeculae, which is used as the seed for sampling. Ellipsoids are seeded from each voxel on the medial axis. A combination of dilation, contraction, rotation and a small amount of translation is run iteratively until the ellipsoid increases no further in volume.<br />
<br />
The EF at a point in the structure is determined as the EF of the most voluminous ellipsoid which contains that point.<br />
<br />
If you use Ellipsoid Factor in your work, please cite:<br />
Doube M (2015), ''The Ellipsoid Factor for quantification of rods, plates and intermediate forms in 3D geometries'', Frontiers in Endocrinology, 6:15, [http://journal.frontiersin.org/Journal/10.3389/fendo.2015.00015/abstract doi: 10.3389/fendo.2015.00015]<br />
<br />
==== Suitable images ====<br />
A binary 3D image.<br />
<br />
==== Parameters ====<br />
* '''Sampling increment''': distance between sample points on each vector; should be less than the pixel spacing.<br />
* '''Vectors''': number of vectors to sample at each seed point.<br />
* '''Skeleton points per ellipsoid''': allows dense or sparse sampling, a value of <math>1</math> means that an ellipsoid is sampled at every seed point.<br />
* '''Contact sensitivity''': how many vectors must touch the background before dilation stops.<br />
* '''Maximum iterations''': how hard to try to find larger ellipsoids - fitting will stop if no improvement has been made after this number of iterations..<br />
* '''Maximum drift''': how far the centroid may be displaced from its seed point.<br />
* '''EF image''': stack containing EF values for each point contained by at least one ellipsoid and NaN elsewhere.<br />
* '''Ellipsoid ID image''': stack containing the ID of the biggest ellipsoid at each point, ranked in descending order (<math>0</math> is the largest ellipsoid).<br />
* '''Volume image''': image showing the volume of the largest ellipsoid containing that point.<br />
* '''Axis ratio images''': images showing <math>a/b</math> and <math>b/c</math> ratios foreach point containing at least one ellipsoid and NaN elsewhere.<br />
* '''Flinn peak plot''': plot of <math>a/b</math> vs <math>b/c</math> weighted by volume, so bright pixels indicate relatively more of the structure has that axis ratio.<br />
* '''Gaussian sigma:''' amount to blur the Flinn peak plot - set to <math>0</math> for a precise but less 'beautiful' result.<br />
* '''Flinn plot''': unweighted Flinn plot - every ellipsoid is represented by the same sized point regardless of ellipsoid size.<br />
<br />
==== Results ====<br />
* '''EF image''': stack containing EF values. NaN (not a number) values are used in the background. Summary statistics can be obtained by running Analyze > Histogram<br />
* '''Short-Mid image''': stack containing the <math>a/b</math> ratios<br />
* '''Mid-Long image''': stack contining the <math>b/c</math> ratios<br />
* '''Volume image''': stack containing ellipsoid volumes<br />
* '''Max id image''': stack containing the ID of the largest ellipsoid at each point; IDs relate to the sort order based on volume, so ID = 0 is the largest ellipsoid. <math>-1</math> is foreground and background is labelled with a large negative number.<br />
* '''Flinn diagram''': plot of <math>a/b</math> versus <math>b/c</math> values present in the volume<br />
* '''Weighted Flinn plot''': Flinn diagram with peaks of intensity proportional to volume occupied by each (<math>a/b</math>, <math>b/c</math>) ratio<br />
<br />
==== Related publications ====<br />
Salmon PL, Ohlsson C, Shefelbine SJ, Doube M (2015), ''Structure model index does not measure rods and plates in trabecular bone'', Frontiers in Endocrinology, 6:162, [http://dx.doi.org/10.3389/fendo.2015.00162 doi:10.3389/fendo.2015.00162].<br />
<br />
== Fit ellipsoid ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit ellipsoid''.<br />
<br />
Finds the ellipsoid that best fits a set of point or multi-point ROIs in the ROI Manager. ''Fit ellipsoid'' may fail to fit an ellipsoid. The more points you add, the more likely it is to succeed. Points are scaled to the spatial calibration (voxel widht, height &amp; depth) of the input image.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': ROIs with at least nine points in the ROI Manager.<br />
<br />
==== Results ====<br />
* '''Radii''': the radii ''a'', ''b'' and ''c'' of the fitted ellipsoid. Radius ''a'' is the shortest and ''c'' the longest.<br />
* '''Centroid''': ''x'', ''y'' and ''z'' coordinates of the ellipsoid centre point.<br />
<br />
==== Differences from BoneJ1 ====<br />
* Supports multi-point ROIs.<br />
* Plug-in cancels if an ellipsoid can't be found, instead of reporting invalid results.<br />
<br />
== Fit sphere (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit sphere''.<br />
<br />
Finds the sphere that best fits a set of point ROIs, and optionally displays the image data bounded by the sphere in a new image window. Place a set of point ROIs on structures of interest, hitting [T] to add each point to the ROI Manager. Fit Sphere takes the coordinates of the points from the ROI Manager and applies a least-squares optimisation.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': populated with at least 5 point ROI's<br />
* '''Copy Sphere''': Create a new stack containing image data from within the best-fit sphere.<br />
* '''Padding''': Number of black pixels to put between the sphere and the sides of the image<br />
* '''Inner Cube''': Create a new stack containing image data from the cube that just fits inside the best-fit sphere.<br />
* '''Outer Cube''': Create a new stack containing image data from the cube that the best-fit sphere just fits inside.<br />
* '''Crop Factor''': Radius used for generating new images is multiplied by crop factor so that a bigger or smaller volume can be produced.<br />
* '''Add to ROI Manager''': Add the sphere to the ROI Manager as a set of circular ROIs<br />
* '''Clear ROI Manager''': Clear any existing ROIs in the Manager prior to adding circles<br />
<br />
==== Results ====<br />
* '''X Centroid''': x-coordinate of sphere's centroid<br />
* '''Y Centroid''': y-coordinate of sphere's centroid<br />
* '''Z Centroid''': z-coordinate of sphere's centroid<br />
* '''Radius''': length of radius<br />
* '''Images (optional)''': images containing a copy of the original data within the sphere, or within cubes bounding or bounded by the sphere.<br />
<br />
== Fractal dimension ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fractal dimension''.<br />
<br />
This plug-in estimates the fractal dimension of an image by applying the box-counting algorithm. In this algorithm grids of diminishing size are scanned over the image, and the number of boxes containing at least one foreground voxel is counted. As the box size decreases and the grid becomes finer, the proportion of foreground boxes increases in a fractal structure. See [https://en.wikipedia.org/wiki/Box_counting Wikipedia] for further details. BoneJ uses a fixed-grid scan, with an option to try to find the optimal covering.<br />
<br />
The box counting algorithm produces a pair of <math>(log(n), -log(m))</math> values for each iteration it runs. Here n = number of boxes with foreground, and m = box size. These pairs are passed to a curve-fitting algorithm, which returns the slope of the linear function which describes them ([https://en.wikipedia.org/wiki/Linear_regression regression fit]). The coefficient of this slope is the fractal dimension.<br />
<br />
Fractal dimension is markedly influenced by the parameters selected for the box counting algorithm, so it's worth running it several times with different values to find an accurate measure for your image.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* ''Starting box size (px)'': the size (sides) in pixels of a box in the sampling grid in the first iteration of the algorithm.<br />
* ''Smallest box size (px)'': the minimum size in pixels of a box in the grid. When box size becomes smaller than this limit, the algorithm iterates one more time, and then stops.<br />
* ''Box scaling factor'': the term used to divide the box size after iteration. For example, a scaling factor of <math>2.0</math> halves the size at each step.<br />
* ''Grid translations'': how many times at each iteration the grid is moved to try to the find the optimal covering. The optimal covering covers the objects in the image with the least amount of boxes. The larger the parameter the more likely it is that optimal covering is found. However, this slows down the plug-in considerably.<br />
* ''Automatic parameters'': if checked, then the plug-in runs with default parameters.<br />
* ''Show points'': if checked, then the plug-in displays the <math>(log(n), -log(m))</math> values it calculated. <br />
<br />
==== Results ====<br />
* ''Fractal dimension'': the [https://en.wikipedia.org/wiki/Fractal_dimension fractal dimension] of the image. For example, the Koch snow flake has a fractal dimension of 1.262.<br />
* ''R²'': the [https://en.wikipedia.org/wiki/Coefficient_of_determination coefficient of determination] of the line fitted to the <math>(log(n), -log(m))</math> points.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* Algorithm parameters can be changed by the user.<br />
<br />
==== Related publications ====<br />
Fazzalari NL, Parkinson IH (1996), ''Fractal dimension and architecture of trabecular bone'', J Pathol, 178: 100-5, [http://dx.doi.org/10.1002/(SICI)1096-9896(199601)178:1%3C100::AID-PATH429%3E3.0.CO;2-K doi:10.1002/(SICI)1096-9896(199601)178:1<100::AID-PATH429>3.0.CO;2-K].<br />
<br />
== Inter-trabecular angles ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Inter-trabecular Angles''.<br />
<br />
The plug-in was designed to analyse the angles between trabeculae of cancellous bone. First it calls [[Skeletonize3D]] to thin the input image (if necessary). Then it calls [[AnalyzeSkeleton]], which creates a graph of the largest skeleton (by number of nodes) in the thinned image. The graph consists of nodes and the edges that connect them. Nodes are also known as vertices, and edges as branches. Roughly speaking the edges correspond to trabeculae and the nodes to the junction points, where trabeuculae meet.<br />
<br />
The graph is often not a perfect representation of the trabecular network in the input image. ''Inter-trabecular angles'' offers many options to adjust the graph's topology and filter out artefacts that may obfuscate or skew the results. First it allows you to filter out nodes with too many or too few edges. Secondly it can be used to prune very short edges, which often do not represent actual trabeculae. <br />
<br />
[[File:Ita_types.png|left|150 px|Types of edges in pruning]]<br />
Pruning works differently for different types of edges. There are four kinds: outer, dead-end, inner and short. An outer edge doesn't interconnect different parts of a graph. In other words, one (and only one) of its endpoints connects to only one branch, i.e. the edge itself. In the figure the outer edge is colored black. A dead-end (blue) is an outer edge whose length is less than the minimum set by the user, i.e. it's a short, outer edge. An inner edge (green) connects to end points with more than one branch. A short edge is an inner edge, whose length is less than the set minimum. When a dead-end is pruned, it with its "lonely" end-point are removed from the graph. When a short edge is pruned, it and it's endpoints are removed, and a new node is placed at the midpoint of the former. This new node connects to all the branches the previous nodes connected to.<br />
<br />
''Inter-trabecular angles'' offers two further options to control pruning: ''iteration'' and ''clustering''. Iteration repeats pruning until no new short edges are found. Sometimes pruning can create new short edges, and thus the graph may still have them after one iteration. However, iteration can alter the structure of the graph too dramatically. Clustering searches for all nodes connected by short edges, before removing any. In the figure, clustering pruning would remove the four nodes and the red edges between them in one go. It would create a new node at the center of the previous four, and connect it to the blue and green edges. When pruning is not clustering, it removes edges one-by-one. This changes the end result depending on the order the edges are traversed. Clustering creates the same result each time. <br />
<br />
Pruning also removes loops and redundant parallel edges. The former connects to the same node on both ends, and the latter connects two nodes that are already connected by another edge. <br />
<br />
The pruning and filtering features were added so that we can replicate and continue from the research of [https://doi.org/10.1016/j.actbio.2016.08.040 Reznikov et al.]<br />
<br />
==== Suitable images ====<br />
An 8-bit, binary 2D or 3D image. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
*'''Minimum valence''': minimum number of branches for a node to be included in the analysis.<br />
*'''Maximum valence''': maximum number of branches for a node to be included in the analysis.<br />
*'''Minimum trabecular length (px)''': minimum length for a branch to be preserved in the pruning. Length is calculated as the distance between the endpoints of a branch.<br />
** This length is also displayed in the units of the image calibration<br />
*'''Margin (px)''': minimum distance of a node from image stack edges to be included in the analysis. Having nodes too close to the edges can make the results less accurate, because you get more branches that do not terminate to a node at the other end.<br />
*'''Iterate pruning''': repeat pruning until no more new short branches are discovered. When true, the topology of the graph is likely to change more in the pruning.<br />
*'''Use clusters''': if true then the pruning result is independent of the order in which the graph is traversed. False corresponds with methodology in Reznikov's article. See above for more details.<br />
*'''Print centroids''': Print the centroids (center coordinates) of the node pairs at the ends of each edge.<br />
*'''Print % culled edges''': Print statistics of different types of edges pruned.<br />
<br />
==== Results ====<br />
*'''Inter-trabecular angles''': angles between each branch of each node included in the analysis. Sorted into columns according to the number of branches per node. For example, column ''"3"'' shows the angles between branches of nodes with three branches.<br />
*'''Centroids''' (optional): A table of the center coordinates of the node pairs at the ends of each edge.<br />
*'''Culled edge percentages''' (optional): A table showing the percentages of different kinds of edges pruned, compared to the total number of edges in the analysed graph.<br />
*'''Skeleton''' (optional): if the plug-in had to skeletonise the input image, it displays the result of the thinning.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Inter-trabecular angles generalizes the idea of ''Triple point angles'' for any types of points. It also provides more tools for adjusting the graph for analysis.<br />
<br />
==== Related publications ====<br />
Reznikov, N et al. (2016), ''Inter-trabecular angle: A parameter of trabecular bone architecture in the human proximal femur that reveals underlying topological motifs'', Acta Biomaterialia, 44: 65--72, [https://doi.org/10.1016/j.actbio.2016.08.040 doi:j.actbio.2016.08.040].<br />
<br />
== Local thickness ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Thickness''.<br />
<br />
This plug-in includes [[Local_Thickness]] in BoneJ, and provides some additional options &amp; results. Local thickness measures ''the diameter of the largest sphere that fits inside the object and contains the point'' for each point i.e. foreground voxel in an image. The plug-in calculates mean and standard deviation of the trabecular thickness (Tb.Th) or trabecular spacing (Tb.Sp) directly from pixel values in the resulting thickness map. Foreground voxels are considered trabeculae, and background voxels are the spacing. Processing time is heavily dependent on feature size (in pixels); large features can take a very long time to process.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
* '''Calculate''': chooses which thickness maps to calculate - trabecular thickness, trabecular spacing, or both. In order to calculate trabecular spacing, the image voxels are inverted.<br />
* '''Show thickness maps''': display the calculated thickness maps or not.<br />
* '''Mask thickness maps''': remove artifacts from the thickness maps. Artifacts are foreground voxels not present in the original image.<br />
* '''Crop to ROI manager''': create thickness maps only from the area bounded by the ROIs in the ROI manager. Checking this option requires you've added ROIs to the ROI manager.<br />
<br />
==== Results ====<br />
* The mean and standard deviation for each thickness map calculated.<br />
* Displays thickness map images if ''Show thickness maps'' was selected. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Calls the latest version of [[Local_Thickness]].<br />
* Thickness values for background voxels are marked ''NaN'' instead of ''0''.<br />
<br />
==== Related publications ====<br />
* Dougherty R, Kunzelmann K (2007), ''Computing local thickness of 3D structures with ImageJ'', Microsc. Microanal., 13: 1678-1679, [http://dx.doi.org/10.1017/S1431927607074430 doi:10.1017/S1431927607074430]<br />
* Hildebrand T, Rüegsegger P (1997), ''A new method for the model-independent assessment of thickness in three-dimensional images'', J. Microsc., 185: 67-75, [http://dx.doi.org/10.1046/j.1365-2818.1997.1340694.x doi:10.1046/j.1365-2818.1997.1340694.x]<br />
<br />
== Moments of inertia (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Moments of Inertia''<br />
<br />
Calculates the three orthogonal principal axes and moments of inertia around those axes. It includes pixels with values between upper and lower limits, which can be defined in terms of unitless grey values or Hounsfield units (HU). It optionally creates a new stack with the image centred and rotated so that the principal axes are parallel to the image stack's x, y and z axes. Calculations are limited to a rectangular ROI if one is drawn. The plugin will guess whether the image is HU calibrated, and if so, apply HU limits of bone (0-4000 HU), otherwise it will calculate auto-thresholds based on the stack's histogram. If a calibration curve is known, the coefficients can be added to get weighted calculations. Aligning a bone with Moments of Inertia may be a useful step prior to Slice Geometry if bones are not aligned with the image z axis.<br />
<br />
==== Suitable images ====<br />
An 8-bit or 16-bit image.<br />
<br />
==== Parameters ====<br />
* '''Start slice''': First slice to include in calculations<br />
* '''End slice''': Last slice to include in calculations<br />
* '''HU Calibrated''': Plugin will guess whether the image is HU calibrated. If image is HU calibrated, make sure the box is checked and enter HU calibrated numeric values in the following fields<br />
* '''Bone Min''': Lower threshold, in either uncalibrated greys or HU<br />
* '''Bone Max''': Upper threshold, in either uncalibrated greys or HU<br />
* '''Slope''': m where physical density = m × pixel value + c<br />
* '''Y Intercept''': c where physical density = m × pixel value + c<br />
* '''Align result''': Draw a new stack with the principal axes parallel to the image axes<br />
* '''Show axes (2D)''': Draw the axes in white on the aligned image<br />
* '''Show axes (3D)''': Display the stack and its principal axes in a 3D Viewer window<br />
<br />
==== Results ====<br />
* '''Image (optional)''': a copy of the input image centered and aligned with the principal axes<br />
* '''Xc''': Centroid x-coordinate (mass-weighted by calibrated density)<br />
* '''Yc''': Centroid y-coordinate<br />
* '''Zc''': Centroid z-coordinate<br />
* '''Vol''': Total volume of thresholded voxels<br />
* '''Mass''': Mass of bone, from pixel values and density calibration coefficients<br />
* '''Icxx''': Moment around x axis passing through centroid<br />
* '''Icyy''': Moment around y axis passing through centroid<br />
* '''Iczz''': Moment around z axis passing through centroid<br />
* '''Icxy''': Off-axis term for constructing inertia tensor<br />
* '''Icxz''': Off-axis term for constructing inertia tensor<br />
* '''Icyz''': Off-axis term for constructing inertia tensor<br />
* '''I1''': Moment around the shortest principal axis<br />
* '''I2''': Moment around the middle principal axis<br />
* '''I3''': Moment around the longest principal axis<br />
* '''Verbose output in Log window'''<br />
** '''Eigenvalues''': Result of of eigenvalue decomposition. Moments of inertia<br />
** '''Eigenvectors of principal axes''': orientation of input image<br />
** '''Inverse eigenvector matrix''': used to map voxel positions in the aligned image back to voxel positions in the original image<br />
* Optional 3D display of principal axes<br />
<br />
== Optimise threshold (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Optimise Threshold''<br />
<br />
Several histogram-based methods exist for automatic determination of threshold for binary segmentation, but in ImageJ these are currently limited to pixel values in a single slice. The result can be excluding high values in a stack that are higher than the highest value in the current slice. This plugin uses all the pixels in a stack to construct a histogram and uses ImageJ's built-in isodata algorithm to determine the threshold. It optionally tests values either side of the initial auto-threshold for connectivity, because connectivity is very sensitive to image noise. The plugin attempts to find the threshold that results in minimal connectivity. Purification, erosion and dilation can improve the connectivity estimate, so Purify is always called, and erosion and dilation are applied as part of a sequence: purify, erode, purify, dilate.<br />
<br />
==== Suitable images ====<br />
An 8-bit of 16-bit image<br />
<br />
==== Parameters ====<br />
* '''Threshold Only''': Determine the threshold from the stack histogram only<br />
* '''Apply Threshold''': Replace the input image with a thresholded version<br />
* '''Show Plot''': Display a graph showing connectivity versus threshold<br />
* '''Tests''': Number of different thresholds to test for connectivity<br />
* '''Range''': Proportion of the initial threshold to test above and below initial thresholds<br />
* '''Subvolume Size''': Size of the volume to test for connectivity. Set small for a faster run and large to test the whole stack<br />
* '''Erosion Cycles''': Number of times to erode the stack after initial purification<br />
* '''Dilation Cycles''': Number of times to dilate the stack after secondary purification<br />
<br />
==== Results ====<br />
* '''Thresholded stack (optional)'''<br />
* '''Plot of connectivity versus threshold (optional)'''<br />
* '''Log of optimal threshold value'''<br />
<br />
== Orientation (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Orientation''<br />
<br />
Sets the direction in a 2D image, without rotating the image or changing it in any way. ''Slice Geometry'' (see below) uses ''Orientation'' to calculate diameter, second moments of area and section moduli around anatomic axes set by the user.<br />
<br />
==== Suitable images ====<br />
A 2D image.<br />
<br />
==== Parameters ====<br />
* '''Orientation''': input field displays current orientation (clockwise from 12 o'clock) and takes keyboard input<br />
* '''deg / rad''': display and set orientation in degrees or radians<br />
* '''Principal direction''': the main direction, the head of which is displayed in red<br />
* '''Secondary direction''': the orthogonal direction<br />
* '''Reflect''': swap the labels on this axis<br />
<br />
==== Results ====<br />
* '''Orientation axes''': draws the axes of the orientation on the image.<br />
<br />
== Purify (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Purify''<br />
<br />
Purify locates all particles in 3D and removes all but the largest foreground and background particles.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary.<br />
<br />
==== Parameters ====<br />
* '''Labelling algorithm''':<br />
** '''Mapped''': Non-recursive, memory efficient and fast.<br />
** '''Multithreaded''': use multiple cores and job chunking to reduce recursion. Fast on small stacks and if you have many CPU cores.<br />
** '''Linear''': Non-recursive but heavy on RAM and single-threaded. Fast on big stacks, but only if you have the memory.<br />
* '''Chunk Size''': number of slices to use in each particle labelling thread. If images are large, set this to 2<br />
* '''Performance Log''': Show verbose performance information to help tune your system<br />
* '''Make copy''': If checked, shows the result in a new window; if unchecked the result replaces the original image.<br />
<br />
==== Results ====<br />
* '''Performance metrics (optional)'''<br />
** '''Threads''': Number of CPU cores used<br />
** '''Slices''': Number of slices in the input image stack<br />
** '''Chunks''': Number of chunks of slices, each chunk is processed independently<br />
** '''Chunk size''': Number of slices per chunk<br />
** '''Last chunk size''': size of the last chunk (the remainder chunk)<br />
** '''Duration''': time in seconds to complete purification<br />
* '''Purified image''': optionally in a new image window.<br />
<br />
== Skeletonise ==<br />
Menu path ''Plugins &gt; BoneJ &gt;Skeletonise''.<br />
<br />
This plug-in simply includes [[Skeletonize3D]] in BoneJ. It adds some additional validation to check that your image suits the tool.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[Skeletonize3D]].<br />
<br />
== Slice geometry (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Slice Geometry''<br />
<br />
Slice Geometry calculates cross-sectional geometric properties of shapes: cross-sectional area, centroid, mean density, second moment of area, section modulus, Feret diameter and local thickness (2D and 3D). Measurements can be limited to a rectangular ROI. If your bone is not well aligned with the image axes, you may find it useful to align the bone to its principal axes using Moments of Inertia or by exporting a transformed volume from the ImageJ 3D Viewer. Importantly, no assumption of geometry is made for any of the measurements.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Bone''': Slice Geometry will guess from your image title the bone it is working on. If it is wrong, correct it. If your bone of interest isn't listed, email me.<br />
* '''2D Thickness''': Run Thickness on a per-slice basis; this fits circles rather than spheres<br />
* '''3D Thickness''': Run Thickness on the whole stack, fitting spheres, then report results per slice<br />
* '''Draw Axes''': Draw axes on an annotated copy of the stack<br />
* '''Draw Centroids''': Draw centroids on an annotated copy of the stack<br />
* '''Annotated Copy (2D)''': Create a new stack showing the centroids and principal axes<br />
* '''3D Annotation''': Display the stack, principal axes and centroids in the 3D viewer<br />
* '''Process Stack''': Calculate parameters for all slices in the stack<br />
* '''Clear Results''': Remove all data in the results table without saving, prior to calculating parameters<br />
* '''Use Orientation''': Also calculate parameters based on directions defined in Orientation<br />
* '''HU Calibrated''': Allows you to enter your thresholds in Hounsfield units (HU) or uncalibrated units<br />
* '''Bone Min''': minimum pixel value to use in calculations<br />
* '''Bone Max''': maximum pixel value to use in calculations<br />
* '''Slope''': <math>m</math> where physical density <math>= m * pixel value + c</math><br />
* '''Y Intercept''': <math>c</math> where physical density <math>= m * pixel value + c</math><br />
* '''Note''': density-weighted calculations are only applied to centroid determination at present<br />
* '''Partial volume compensation''': Use model that assumes Gaussian blur of imaging modality and linear transform between pixel value and sample 'density' to correct for blurred and pixelated images (e.g. small bone in clinical CT)<br />
* '''Background''': pixel value that corresponds to zero bone density (could be the 'fat', 'air' or 'muscle' pixel value)<br />
* '''Foreground''': pixel value that corresponds to 100% bone density<br />
* '''A rectangular ROI (optional)''': if there's a ROI, calculations are limited to its area.<br />
<br />
==== Results ====<br />
* '''Images (optional)''': displays the result images selected in the parameters<br />
* '''Bone code''': Unique numeric identifier for the anatomic name of each bone. Further bone codes can be added to BoneJ on request<br />
* '''Slice''': slice number indicating which slice contributed image data for this row of the results<br />
* '''CSA''': cross-sectional area<br />
* '''X cent.''': Centroid x-coordinate<br />
* '''Y cent.''': Centroid y-coordinate<br />
* '''Density''': mean physical density, calculated from pixel values and calibration coefficients<br />
* '''wX cent''': Density-weighted x-coordinate of centroid<br />
* '''wY cent''': Density-weighted y-coordinate of centroid<br />
* '''Theta''': angle of minor axis (axis for Imin, the long axis of your specimen's cross section) from the horizontal, ranging from <math>-\pi/2</math> to <math>\pi/2</math>, with positive as clockwise<br />
* '''R1''': maximum chord length from minor axis<br />
* '''R2''': maximum chord length from major axis<br />
* '''Imin''': Second moment of area around major axis<br />
* '''Imax''': Second moment of area around minor axis<br />
* '''Ipm''': Product moment of area (= 0 if no errors are present, e.g. due to pixelation)<br />
* '''Zmax''': Section modulus around major axis (Imax / R2)<br />
* '''Zmin''': Section modulus around minor axis (Imin / R1)<br />
* '''Zpol''': Polar section modulus<br />
* '''Feret Min''': Minimum caliper width<br />
* '''Feret Max''': Maximum caliper width<br />
* '''Feret Angle''': Orientation of maximum caliper width<br />
* '''Perimeter''': Distance around external surface<br />
* '''Max Thick 2D''': Maximum thickness determined by local thickness in 2D<br />
* '''Mean Thick 2D''': Mean thickness determined by local thickness in 2D<br />
* '''SD Thick 2D''': Standard deviation of the mean thickness determined by local thickness in 2D<br />
* '''Max Thick 3D''': Maximum thickness in this slice determined by local thickness in 3D<br />
* '''Mean Thick 3D''': Mean thickness in this slice determined by local thickness in 3D<br />
* '''SD Thick 3D''': Standard deviation of the mean thickness in this slice determined by local thickness in 3D Directional measurements, using Orientation directions, and the specimen's slice centroid<br />
* '''A (rad)''': Principal orientation (direction A)<br />
* '''B (rad)''': Secondary orientation (direction B)<br />
* '''IAa''': Second moment of area around Aa axis<br />
* '''IBb''': Second moment of area around Bb axis<br />
* '''ZAa''': Section modulus around Aa axis<br />
* '''ZBb''': Section modulus around Bb axis<br />
* '''RAa''': maximum chord length from Aa axis<br />
* '''RBb''': maximum chord length from Bb axis<br />
* '''DAa''': Calliper diameter in direction of Aa<br />
* '''DBb''': Calliper diameter in direction of Bb<br />
<br />
== Surface area ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Surface area''<br />
<br />
''Surface area'' creates a mesh from the bone in the image, and then calculates the area of the surface of the mesh. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Export STL file(s)''': if checked, then the meshes created from the image are saved as .stl-files. A dialog opens for you to select a folder for the files.<br />
<br />
==== Results ====<br />
* '''Surface area''': the surface area of the bone mesh<br />
* '''STL-file''': the mesh created from the bone image<br />
<br />
The surface area is reported and an .stl-file saved separately for each 3D subspace in the image. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Isosurface''<br />
<br />
== Surface fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Surface fraction''<br />
<br />
''Surface fraction'' calculates the fraction of bone volume in an image by comparing meshes created from bone particles and the whole image. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone. <br />
<br />
More formally defined, ''Surface fraction'' calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary.<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the mesh created from bone voxels.<br />
* '''Total volume''': volume of the mesh created from the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Volume fraction''<br />
<br />
== Results table ==<br />
The BoneJ plug-ins print their results into a shared result table. This is because we often need to calculate several measures for the same image, so it's handy to have them on one row. Repeated measures for the same image are reported on different rows. The results persist even if the table is closed. To clear the table run ''Plugins &gt; BoneJ &gt; Table &gt; Clear BoneJ results''.<br />
<br />
Note that some of the plug-ins (marked with ''WIP'') still use a ImageJ1 style results table that works slightly differently. As they are modernized they'll move to use the same new table as the others.<br />
<br />
== Usage reporting ==<br />
Menu path '' Edit &gt; Options &gt; BoneJ Usage (Modern | Legacy)''<br />
<br />
==== What is collected? ====<br />
<br />
BoneJ uses Google Analytics to report when a plugin's run() method completes successfully.<br />
<br />
<code><br />
ht<span>tp://</span>www.google-analytics.com/__utm.gif?utmwv=5.2.5&utms=0&utmn=1074354874&utmhn=bonej.org&utmt=event&utme=5(Plugin%20Usage*org.bonej.wrapperPlugins.wrapperUtils.UsageReporterOptions*0.5.1)&utmcs=UTF-8&utmsr=3840x1080&utmvp=3840x1080&utmsc=24-bit&utmul=en-gb&utmje=0&utmcn=1&utmdt=bonej.org%20Usage%20Statistics&utmhid=512699200&utmr=-&utmp=%2Fstats&utmac=UA-366405-8&utmcc=__utma%3D1589599318.1327557233.1538550102.1538550102.1538550102.2%3B%2B__utmz%3D1589599318.1538550102.79.42.utmcsr%3Dgoogle%7Cutmccn%3D(organic)%7Cutmcmd%3Dorganic%7Cutmctr%3DBoneJ%20Usage%20Reporter%3B<br />
</code><br />
<br />
A one-pixel GIF image is requested from Google, with a rather long set of parameters. Reported details are:<br />
<br />
* A unique ID which is stored in your ImageJ preferences between sessions<br />
* Your screen resolution<br />
* The name of the plugin's Java class<br />
* The version of BoneJ<br />
* The first time, last time and current time you ran a BoneJ plugin<br />
* Your system language and character map<br />
* Google also records your IP address as all webservers do in their logs<br />
* Some of these values are saved in your preferences<br />
* Your operating system and Java version are reported in the user agent ID<br />
<br />
==== What does the report look like? ====<br />
<br />
Data are collated with the Analytics report already used to track hits on bonej.org.<br />
<br />
==== For what is the data used? ====<br />
<br />
So far, BoneJ has been supported mainly by grants to scientists. We wish to create quantitative reports that detail how much BoneJ is being used in the community, so that decisions to fund further development can be made rationally.<br />
<br />
In addition, development resources are limited so it is useful to see which features are used heavily and can be consolidated, while little-used features can be abandoned or made more useful.<br />
<br />
==== That is noble but my work is top secret ====<br />
<br />
If you are uncomfortable with this level of data collection then please opt out, at the dialog which is prompted on first run, or by running '' Edit &gt; Options &gt; BoneJ Usage (Modern | Legacy) ''. Hitting Cancel (Legacy) or unchecking the box (Modern) will prevent any report from being gathered or sent and will also clear any values that were previously saved.<br />
<br />
You can opt back in by running '' Edit &gt; Options &gt; BoneJ Usage (Modern | Legacy)'', checking the box (Modern only) and hitting OK.<br />
<br />
==== Can I see the report? ====<br />
<br />
At the moment the report is kept private. If there is a strong will from the user community, who created the data in the first place, the report could be made more open. Please feel free to discuss on the user forum.<br />
<br />
<br />
==== How is it implemented? ====<br />
<br />
You can read the code on Github and in every copy of BoneJ. If you turn on ImageJ's debug mode (in '' Edit &gt; Options &gt; Misc. '') the URL and the GIF response will be logged to ImageJ's log window.<br />
<br />
== Where is my favourite plug-in? ==<br />
We have removed some plug-ins from BoneJ. ''Neck shaft angle'', ''Plateness'' and ''Structure model index'' have been discontinued. ''Interpolate ROIs'', [http://imagej.net/3D_Binary_Filters ''Dilate 3D'' and ''Erode 3D''] come pre-packaged with ImageJ, so they are no longer included in BoneJ2.<br />
<br />
Support for ''Kontron IMG'', ''Scanco ISQ'' and ''Stratec pQCT'' file formats has been moved to [[SCIFIO]]. Just run ''Edit &gt; Options &gt; ImageJ2'', and check ''Use SCIFIO when opening files''. When the option is enabled, these kinds of files can be opened from ''File > Open'' or dragging &amp; dropping them like any other format. <br />
<br />
''Distribution analysis'' and other pQCT related tools can now be downloaded independently from the [[PQCT]] update site.<br />
<br />
== Licence ==<br />
BoneJ2 is free, open-source software. You can redistribute it and/or modify it under the terms of the [https://github.com/bonej-org/BoneJ2/blob/master/LICENCE.md BSD 2-clause licence]. The software is provided "as is" and any warranties are disclaimed. In no event shall the copyright holder or contributors be liable.<br />
<br />
== Citation ==<br />
If you'd like to cite the software, we will soon publish a paper about BoneJ experimental. You can read the draft (and send us your feedback) as we're writing it [https://v1.overleaf.com/read/yxdkwpcdkjzj for Wellcome Open Research on Overleaf]. We recommend you cite the specific release used in your research.<br />
<br />
== Funding ==<br />
The redesign and porting effort to create BoneJ2 was supported by a [https://wellcome.ac.uk/what-we-do/directories/biomedical-resource-technology-development-grants-people-funded Wellcome Trust Biomedical Resource and Technology Development Grant]. Interaction with [[SciView]] was assisted by a [https://royalsociety.org/grants-schemes-awards/grants/international-exchanges/ Royal Society International Exchange grant].</div>Mdoubehttps://imagej.net/index.php?title=BoneJ2&diff=38573BoneJ22018-10-03T07:28:00Z<p>Mdoube: Add info about usage reporting</p>
<hr />
<div>{{Infobox<br />
| name = BoneJ2<br />
| software = ImageJ<br />
| logo = [[File:Bonej-icon.png|96px]]<br />
| author = {{Person|Michaeldoube}}, {{Person|Rdom}}, {{Person|Alessandrofelder}}<br />
| maintainer = {{Person|Michaeldoube}}, {{Person|Alessandrofelder}}<br />
| source = {{GitHub|org=bonej-org|repo=BoneJ2}}, [https://doi.org/10.5281/zenodo.1427262 doi:10.5281/zenodo.1427262]<br />
| released = Dec 11<sup>th</sup>, 2017<br />
| latest version = cuneiform-experimental-patch2, Sep 24<sup>th</sup>, 2018<br />
| status = Active, Experimental<br />
}}<br />
BoneJ is a collection of skeletal biology plug-ins for ImageJ.<br />
This is the new experimental, modernized version of the software available through the ImageJ [http://imagej.net/Updater updater]. Its update site is called [http://sites.imagej.net/BoneJ BoneJ experimental]. For the old ImageJ1 version, see [[BoneJ]].<br />
<br />
This version works with the latest Fiji, and complies with the modern ImageJ [[architecture]]. Most plug-ins also now support hyperstacks, i.e. images with multiple channels or time frames.<br />
<br />
As the code is still experimental, it's still likely to change a lot. This means any scripts using the code might break, results can change, and plug-ins gain and lose parameters. Tools marked with ''WIP'' (work in progress), are more likely to undergo large changes. <br />
<br />
Below is the documentation for the plug-ins included in BoneJ experimental.<br />
<br />
== Installation ==<br />
[[File:Install-bonej.png|400 px|Installation steps]]<br />
# [http://imagej.net/Downloads Download] the latest version of Fiji for your operating system<br />
# Launch Fiji<br />
# Select in the menu ''Help'' &gt; ''Update...''<br />
# Click ''Manage update sites''<br />
# Check ''BoneJ experimental''<br />
# Click ''Close''<br />
# Click ''Apply changes''<br />
After the downloads have finished, close and restart Fiji.<br />
<br />
== Analyse skeleton ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyse skeleton''.<br />
<br />
This plug-in simply includes [[AnalyzeSkeleton]] in BoneJ. It adds some additional validation to check that your image suits the tool. It also skeletonizes your image by calling [[Skeletonize3D]] if needed.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[AnalyzeSkeleton]].<br />
<br />
== Anisotropy ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Anisotropy''.<br />
<br />
Anisotropy is used to quantify the directionality of trabecular bone. It tells whether the trabeculae have a certain orientation, or if they're randomly aligned. The method to measure anisotropy is fairly complex and consists of multiple steps:<br />
<br />
# Find mean intercept length (MIL) vectors from <math>n</math> directions<br />
# Plot MIL vectors into a point cloud<br />
# Solve the equation of an ellipsoid that best fits the point cloud<br />
# Calculate the degree of anisotropy from the radii of the ellipsoid<br />
<br />
It's important to note that algorithm is stochastic and does not guarantee exact results. Thus it's recommended to run it several times to establish the degree of anisotropy in your image.<br />
<br />
[[File:PhaseChanges.png|left|150 px|The red dots mark phase changes]]<br />
<br />
In the first step the algorithm draws parallel lines over the input image in direction <math>\mathbf{v}</math>. The direction is chosen randomly. Each line segment in the image stack is sampled to find points where it changes from background to foreground, i.e. where the line enters an object. The points are called ''phase changes'', in the adjacent figure they're marked with red dots. After the sampling is complete, the algorithm forms a ''MIL vector'', whose length is the total length of the line segments divided by the total number of phase changes found. The MIL vector has the same direction as <math>\mathbf{v}</math>. Drawing and sampling the lines is repeated for <math>n</math> directions, and the method creates <math>n</math> MIL vectors.<br />
<br />
After the MIL vectors have been calculated, they are added to a point cloud (a collection of points) around the origin. Then the method tries solve the equation of an ellipsoid that would fit the cloud. There may be no solution, especially if there are few points. That is, the fitting may fail at which point the plug-in stops. The radii of this ellipsoid determine the degree of anisotropy (see [http://imagej.net/index.php?title=BoneJ_experimental&action=submit#Results results]).<br />
<br />
[[File:MilCube.png|right|200 px|Projecting lines from a plane]]<br />
<br />
In more detail, the lines in the first step are projected from a <math>d * d</math> plane with normal <math>\mathbf{v}</math> (see the adjacent figure). The size <math>d = \sqrt{w^{2} + h^{2} + d^{2}}</math>, where <math>w, h, d</math> are the dimensions of the image stack. Each of the lines originates from a random point <math>\mathbf{o}</math> on the plane. The plane is divided into <math>m * m</math> same-sized sections, where <math>m</math> is a number selected by the user (i.e. ''Lines per dimension''). One origin <math>\mathbf{o}</math> is randomly selected from within each section. The lines are projected until they intercept the stack edges at points <math>\mathbf{o} + t_{min}\mathbf{v}</math>,<math>\mathbf{o} + t_{max}\mathbf{v}</math> (the algorithm solves for <math>t_{min}</math>, <math>t_{max}</math>). These line segments within the stack are then sampled for phase changes. In this drawing method some lines may miss the image stack completely, but conversely there aren't any areas in the stack that don't have an equal chance of being sampled.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
The plug-in is intended to analyse the "texture" of an object thus it suits samples of a larger whole, e.g. a trabecular cube that fills the whole stack. The results for whole objects such as the pre-packaged ''Bat Cochlea Volume'' ImageJ sample image are not really meaningful.<br />
<br />
==== Parameters ====<br />
* '''Directions''': number of times sampling is performed from different directions. The minimum is <math>9</math>, because that's how many independent variables the algorithm needs to solve the "shape" of the orientation in the image.<br />
* '''Lines per dimension''': controls how many parallel lines are drawn per each direction. For example, if ''lines per dimension'' is <math>2</math> then ''Anisotropy'' draws <math>4</math> lines. In this case, the origin points of the lines are randomly selected from within the <math>4</math> equal sections of the sampling plane (see above detailed explanation). The number is squared, because the location of the origins can vary in two dimensions.<br />
<br />
then the plane is divided into <math>4</math> equal sections, and a line is drawn from each. The origin point of each line is randomly located within their section.<br />
* '''Sampling increment''': controls how often each line is sampled. The default is <math>1.0</math>, which means that after each step a unit vector (a <math>1\_px</math> long line) is added to the position along a sampling line. The number of samples taken per line depends on the length of the line segment within the image stack.<br />
* '''Recommended minimum''': if checked, then the above three parameters are set to the recommended minimum values. In our tests we found that with these values the results are quite stable, and fitting unlikely to fail. However, these minimums are not guaranteed to be the best settings for your image.<br />
* '''Show radii''': if checked, then the radii of the fitted ellipsoid are shown in the results table.<br />
<br />
==== Results ====<br />
* '''Degree of anisotropy''': how much orientation there is in the structure. <math>0.0</math> means the image is completely isotropic, the sample has no directionality whatsoever. <math>1.0</math> means there is very strong orientation in the structure of the image. Note that these are theoretical minimum and maximum values. Due the stochastic nature of the algorithm, even an empty stack will have non-zero degree of anisotropy.<br />
* '''Radii of fitted ellipsoid''' (optional): the lengths of the radii <math>a \leq b \leq c</math> of the ellipsoid fitted on the MIL points. Degree of anisotropy <math>= 1.0 - a/c</math>.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* The results of this Anisotropy do not stabilize, so it's not repeated automatically like in BoneJ1. However, the results vary less between runs.<br />
* MIL vectors are drawn differently. In BoneJ1 they're drawn in sphere-shapes around random seed points. Here parallel lines from different directions are drawn through the whole stack. We think this method produces more uniform sampling, i.e. there's less chance of a directional bias.<br />
<br />
==== Related publications ====<br />
* Odgaard A (1997), ''Three-dimensional methods for quantification of cancellous bone architecture'', Bone, 20, 315-328, [http://dx.doi.org/10.1016/S8756-3282(97)00007-0 doi:10.1016/S8756-3282(97)00007-0]<br />
* Harrigan TP, Mann RW (1984), ''Characterization of microstructural anisotropy in orthotropic materials using a second rank tensor'', J Mater Sci, 19, 761-767, [http://dx.doi.org/10.1007/BF00540446 doi:10.1007/BF00540446]<br />
<br />
== Area/Volume fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Area/Volume fraction''<br />
<br />
''Area/Volume fraction'' calculates the fraction of bone in an image by it to the whole image. It counts all the foreground voxels, which it assumes represent bone, and compares them to the total number of voxels in the image. More formally defined, the plug-in calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''. In case of a 2D image, it calculates the fraction ''BA/TA'', which is the area of bone per unit area of the sample.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the bone voxels.<br />
* '''Total volume''': volume of the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 2D/3D subspace in the image, i.e. for each channel and time frame. Results will be for ''area'' if image is 2D.<br />
<br />
==== Differences to BoneJ1 ====<br />
* In BoneJ1 the plug-in was called ''Volume fraction''<br />
* Can process 2D images<br />
* Supports hyperstacks <br />
<br />
== Calibrate SCANCO (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyze &gt; Calibrate SCANCO''<br />
<br />
Applies the ''mg HA/ccm'' pixel value calibration, i.e. ''HU'' or Hounfield unit calibration stored in the .isq format metadata to the image.<br />
<br />
==== Suitable images ====<br />
An .isq format image generated by Scanco X-ray microtomography scanners.<br />
<br />
== Check voxel depth (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Check Voxel Depth''<br />
<br />
Checks whether slice spacing has been calibrated correctly. Some DICOM images contain slice thickness data in the header information, but thickness is not necessarily the same as the physical distance between consecutive slices' positions.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Connectivity ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Connectivity''.<br />
<br />
The Connectivity plug-in is designed to estimate the number of connected structures i.e. trabeculae in a trabecular network. This ''connectivity'' measure is related to a topological number <math>\chi</math> known as ''Euler characteristic'', ''Euler number'' or ''Euler-Poincaré characteristic''. Mathematically defined connectivity is <math>= 1 - (\chi + \Delta\chi)</math>. Roughly speaking, <math>\chi</math> describes the shape or structure of a topological space. It can also be expressed as <math>\chi = objects - handles + cavities</math>, where a handle is a hole that goes through an object (e.g the hole in a doughnut, or the ear of a coffee mug), and a cavity is enclosed inside one. When measuring trabecular cubes, you need to add <math>\Delta\chi</math> to <math>\chi</math> to get a more accurate estimate of the connectivity of the whole network. The term <math>\Delta\chi</math> corrects for the change in the topology of an object, when it's cut to pieces. <br />
<br />
NB some other Euler characteristic implementations report <math>\chi + \Delta\chi</math> as <math>\chi</math>, i.e. in them the correction <math>\Delta\chi</math> is implicit.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary. The plug-in assumes that there is only one particle in the foreground; to achieve this, run ''Purify''. Having more than one object often leads to negative connectivity.<br />
<br />
==== Results ====<br />
* '''Euler characteristic (χ)''': describes the shape of the object(s) in the image, <math>\chi = objects - handles + cavities</math>.<br />
* '''Corrected Euler (χ + Δχ)''': the Euler characteristic of the part corrected for edge effects to fit the whole.<br />
* '''Connectivity''': gives an estimate of the number of connected trabeculae in the image. Equal to <math>1 - (\chi + \Delta\chi)</math>.<br />
* '''Conn. density''': connectivity divided by unit volume. <br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* The old version reported ''Corrected Euler (χ + Δχ)'' incorrectly as ''Δχ''<br />
<br />
==== Related publications ====<br />
* Odgaard A, Gundersen HJG (1993), ''Quantification of connectivity in cancellous bone, with special emphasis on 3-D reconstructions'', Bone 14: 173-182, [http://dx.doi.org/10.1016/8756-3282(93)90245-6 doi:10.1016/8756-3282(93)90245-6.]<br />
* Toriwaki J, Yonekura T (2002), ''Euler number and connectivity indexes of a three dimensional digital picture'', [http://www.scipress.org/journals/forma/abstract/1703/17030183.html Forma 17: 183-209]<br />
<br />
== Delete slice range (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Delete slice range''<br />
<br />
Removes a range of slices from a stack, so that cropping in the Z direction is practical.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Ellipsoid factor (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Ellipsoid factor''.<br />
<br />
Ellipsoid Factor is a new method for measuring rod/plate geometry. It uses the axis lengths from prolate, oblate and intermediate elipsoids to determine how prolate or oblate the trabecular space is at a particular point. Highly prolate (javelin-shaped, rod-like) ellipsoids have a single long axis (<math>c</math>) and two short axes (<math>a, b</math>) such that <math>a < b \ll c</math> , whereas highly oblate (discus-shaped, plate-like) ellipsoids have two longer axes (<math>b, c</math>) and one much shorter axis (<math>a</math>) so that <math>a \ll b < c</math>. Calculating <math>EF</math> as the difference in ratios, <math>EF = a/b - b/c</math> leads to a useful scale ranging from <math>-1</math> (oblate, <math>a/b \approx 0, b/c \approx 1</math>) to <math>+1</math> (prolate, <math>a/b \approx 1, b/c \approx 0</math>). <math>EF</math> of <math>0</math> indicates an intermediate ellipsoid where <math>a/b = b/c</math>, which is the case for spheres (<math>a = b = c</math>) and other ellipsoids with axis ratios <math>a:qa:q^{2}a</math>. Ellipsoid Factor runs [[Skeletonize3D]] to get the medial axis of the trabeculae, which is used as the seed for sampling. Ellipsoids are seeded from each voxel on the medial axis. A combination of dilation, contraction, rotation and a small amount of translation is run iteratively until the ellipsoid increases no further in volume.<br />
<br />
The EF at a point in the structure is determined as the EF of the most voluminous ellipsoid which contains that point.<br />
<br />
If you use Ellipsoid Factor in your work, please cite:<br />
Doube M (2015), ''The Ellipsoid Factor for quantification of rods, plates and intermediate forms in 3D geometries'', Frontiers in Endocrinology, 6:15, [http://journal.frontiersin.org/Journal/10.3389/fendo.2015.00015/abstract doi: 10.3389/fendo.2015.00015]<br />
<br />
==== Suitable images ====<br />
A binary 3D image.<br />
<br />
==== Parameters ====<br />
* '''Sampling increment''': distance between sample points on each vector; should be less than the pixel spacing.<br />
* '''Vectors''': number of vectors to sample at each seed point.<br />
* '''Skeleton points per ellipsoid''': allows dense or sparse sampling, a value of <math>1</math> means that an ellipsoid is sampled at every seed point.<br />
* '''Contact sensitivity''': how many vectors must touch the background before dilation stops.<br />
* '''Maximum iterations''': how hard to try to find larger ellipsoids - fitting will stop if no improvement has been made after this number of iterations..<br />
* '''Maximum drift''': how far the centroid may be displaced from its seed point.<br />
* '''EF image''': stack containing EF values for each point contained by at least one ellipsoid and NaN elsewhere.<br />
* '''Ellipsoid ID image''': stack containing the ID of the biggest ellipsoid at each point, ranked in descending order (<math>0</math> is the largest ellipsoid).<br />
* '''Volume image''': image showing the volume of the largest ellipsoid containing that point.<br />
* '''Axis ratio images''': images showing <math>a/b</math> and <math>b/c</math> ratios foreach point containing at least one ellipsoid and NaN elsewhere.<br />
* '''Flinn peak plot''': plot of <math>a/b</math> vs <math>b/c</math> weighted by volume, so bright pixels indicate relatively more of the structure has that axis ratio.<br />
* '''Gaussian sigma:''' amount to blur the Flinn peak plot - set to <math>0</math> for a precise but less 'beautiful' result.<br />
* '''Flinn plot''': unweighted Flinn plot - every ellipsoid is represented by the same sized point regardless of ellipsoid size.<br />
<br />
==== Results ====<br />
* '''EF image''': stack containing EF values. NaN (not a number) values are used in the background. Summary statistics can be obtained by running Analyze > Histogram<br />
* '''Short-Mid image''': stack containing the <math>a/b</math> ratios<br />
* '''Mid-Long image''': stack contining the <math>b/c</math> ratios<br />
* '''Volume image''': stack containing ellipsoid volumes<br />
* '''Max id image''': stack containing the ID of the largest ellipsoid at each point; IDs relate to the sort order based on volume, so ID = 0 is the largest ellipsoid. <math>-1</math> is foreground and background is labelled with a large negative number.<br />
* '''Flinn diagram''': plot of <math>a/b</math> versus <math>b/c</math> values present in the volume<br />
* '''Weighted Flinn plot''': Flinn diagram with peaks of intensity proportional to volume occupied by each (<math>a/b</math>, <math>b/c</math>) ratio<br />
<br />
==== Related publications ====<br />
Salmon PL, Ohlsson C, Shefelbine SJ, Doube M (2015), ''Structure model index does not measure rods and plates in trabecular bone'', Frontiers in Endocrinology, 6:162, [http://dx.doi.org/10.3389/fendo.2015.00162 doi:10.3389/fendo.2015.00162].<br />
<br />
== Fit ellipsoid ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit ellipsoid''.<br />
<br />
Finds the ellipsoid that best fits a set of point or multi-point ROIs in the ROI Manager. ''Fit ellipsoid'' may fail to fit an ellipsoid. The more points you add, the more likely it is to succeed. Points are scaled to the spatial calibration (voxel widht, height &amp; depth) of the input image.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': ROIs with at least nine points in the ROI Manager.<br />
<br />
==== Results ====<br />
* '''Radii''': the radii ''a'', ''b'' and ''c'' of the fitted ellipsoid. Radius ''a'' is the shortest and ''c'' the longest.<br />
* '''Centroid''': ''x'', ''y'' and ''z'' coordinates of the ellipsoid centre point.<br />
<br />
==== Differences from BoneJ1 ====<br />
* Supports multi-point ROIs.<br />
* Plug-in cancels if an ellipsoid can't be found, instead of reporting invalid results.<br />
<br />
== Fit sphere (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit sphere''.<br />
<br />
Finds the sphere that best fits a set of point ROIs, and optionally displays the image data bounded by the sphere in a new image window. Place a set of point ROIs on structures of interest, hitting [T] to add each point to the ROI Manager. Fit Sphere takes the coordinates of the points from the ROI Manager and applies a least-squares optimisation.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': populated with at least 5 point ROI's<br />
* '''Copy Sphere''': Create a new stack containing image data from within the best-fit sphere.<br />
* '''Padding''': Number of black pixels to put between the sphere and the sides of the image<br />
* '''Inner Cube''': Create a new stack containing image data from the cube that just fits inside the best-fit sphere.<br />
* '''Outer Cube''': Create a new stack containing image data from the cube that the best-fit sphere just fits inside.<br />
* '''Crop Factor''': Radius used for generating new images is multiplied by crop factor so that a bigger or smaller volume can be produced.<br />
* '''Add to ROI Manager''': Add the sphere to the ROI Manager as a set of circular ROIs<br />
* '''Clear ROI Manager''': Clear any existing ROIs in the Manager prior to adding circles<br />
<br />
==== Results ====<br />
* '''X Centroid''': x-coordinate of sphere's centroid<br />
* '''Y Centroid''': y-coordinate of sphere's centroid<br />
* '''Z Centroid''': z-coordinate of sphere's centroid<br />
* '''Radius''': length of radius<br />
* '''Images (optional)''': images containing a copy of the original data within the sphere, or within cubes bounding or bounded by the sphere.<br />
<br />
== Fractal dimension ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fractal dimension''.<br />
<br />
This plug-in estimates the fractal dimension of an image by applying the box-counting algorithm. In this algorithm grids of diminishing size are scanned over the image, and the number of boxes containing at least one foreground voxel is counted. As the box size decreases and the grid becomes finer, the proportion of foreground boxes increases in a fractal structure. See [https://en.wikipedia.org/wiki/Box_counting Wikipedia] for further details. BoneJ uses a fixed-grid scan, with an option to try to find the optimal covering.<br />
<br />
The box counting algorithm produces a pair of <math>(log(n), -log(m))</math> values for each iteration it runs. Here n = number of boxes with foreground, and m = box size. These pairs are passed to a curve-fitting algorithm, which returns the slope of the linear function which describes them ([https://en.wikipedia.org/wiki/Linear_regression regression fit]). The coefficient of this slope is the fractal dimension.<br />
<br />
Fractal dimension is markedly influenced by the parameters selected for the box counting algorithm, so it's worth running it several times with different values to find an accurate measure for your image.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* ''Starting box size (px)'': the size (sides) in pixels of a box in the sampling grid in the first iteration of the algorithm.<br />
* ''Smallest box size (px)'': the minimum size in pixels of a box in the grid. When box size becomes smaller than this limit, the algorithm iterates one more time, and then stops.<br />
* ''Box scaling factor'': the term used to divide the box size after iteration. For example, a scaling factor of <math>2.0</math> halves the size at each step.<br />
* ''Grid translations'': how many times at each iteration the grid is moved to try to the find the optimal covering. The optimal covering covers the objects in the image with the least amount of boxes. The larger the parameter the more likely it is that optimal covering is found. However, this slows down the plug-in considerably.<br />
* ''Automatic parameters'': if checked, then the plug-in runs with default parameters.<br />
* ''Show points'': if checked, then the plug-in displays the <math>(log(n), -log(m))</math> values it calculated. <br />
<br />
==== Results ====<br />
* ''Fractal dimension'': the [https://en.wikipedia.org/wiki/Fractal_dimension fractal dimension] of the image. For example, the Koch snow flake has a fractal dimension of 1.262.<br />
* ''R²'': the [https://en.wikipedia.org/wiki/Coefficient_of_determination coefficient of determination] of the line fitted to the <math>(log(n), -log(m))</math> points.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* Algorithm parameters can be changed by the user.<br />
<br />
==== Related publications ====<br />
Fazzalari NL, Parkinson IH (1996), ''Fractal dimension and architecture of trabecular bone'', J Pathol, 178: 100-5, [http://dx.doi.org/10.1002/(SICI)1096-9896(199601)178:1%3C100::AID-PATH429%3E3.0.CO;2-K doi:10.1002/(SICI)1096-9896(199601)178:1<100::AID-PATH429>3.0.CO;2-K].<br />
<br />
== Inter-trabecular angles ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Inter-trabecular Angles''.<br />
<br />
The plug-in was designed to analyse the angles between trabeculae of cancellous bone. First it calls [[Skeletonize3D]] to thin the input image (if necessary). Then it calls [[AnalyzeSkeleton]], which creates a graph of the largest skeleton (by number of nodes) in the thinned image. The graph consists of nodes and the edges that connect them. Nodes are also known as vertices, and edges as branches. Roughly speaking the edges correspond to trabeculae and the nodes to the junction points, where trabeuculae meet.<br />
<br />
The graph is often not a perfect representation of the trabecular network in the input image. ''Inter-trabecular angles'' offers many options to adjust the graph's topology and filter out artefacts that may obfuscate or skew the results. First it allows you to filter out nodes with too many or too few edges. Secondly it can be used to prune very short edges, which often do not represent actual trabeculae. <br />
<br />
[[File:Ita_types.png|left|150 px|Types of edges in pruning]]<br />
Pruning works differently for different types of edges. There are four kinds: outer, dead-end, inner and short. An outer edge doesn't interconnect different parts of a graph. In other words, one (and only one) of its endpoints connects to only one branch, i.e. the edge itself. In the figure the outer edge is colored black. A dead-end (blue) is an outer edge whose length is less than the minimum set by the user, i.e. it's a short, outer edge. An inner edge (green) connects to end points with more than one branch. A short edge is an inner edge, whose length is less than the set minimum. When a dead-end is pruned, it with its "lonely" end-point are removed from the graph. When a short edge is pruned, it and it's endpoints are removed, and a new node is placed at the midpoint of the former. This new node connects to all the branches the previous nodes connected to.<br />
<br />
''Inter-trabecular angles'' offers two further options to control pruning: ''iteration'' and ''clustering''. Iteration repeats pruning until no new short edges are found. Sometimes pruning can create new short edges, and thus the graph may still have them after one iteration. However, iteration can alter the structure of the graph too dramatically. Clustering searches for all nodes connected by short edges, before removing any. In the figure, clustering pruning would remove the four nodes and the red edges between them in one go. It would create a new node at the center of the previous four, and connect it to the blue and green edges. When pruning is not clustering, it removes edges one-by-one. This changes the end result depending on the order the edges are traversed. Clustering creates the same result each time. <br />
<br />
Pruning also removes loops and redundant parallel edges. The former connects to the same node on both ends, and the latter connects two nodes that are already connected by another edge. <br />
<br />
The pruning and filtering features were added so that we can replicate and continue from the research of [https://doi.org/10.1016/j.actbio.2016.08.040 Reznikov et al.]<br />
<br />
==== Suitable images ====<br />
An 8-bit, binary 2D or 3D image. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
*'''Minimum valence''': minimum number of branches for a node to be included in the analysis.<br />
*'''Maximum valence''': maximum number of branches for a node to be included in the analysis.<br />
*'''Minimum trabecular length (px)''': minimum length for a branch to be preserved in the pruning. Length is calculated as the distance between the endpoints of a branch.<br />
** This length is also displayed in the units of the image calibration<br />
*'''Margin (px)''': minimum distance of a node from image stack edges to be included in the analysis. Having nodes too close to the edges can make the results less accurate, because you get more branches that do not terminate to a node at the other end.<br />
*'''Iterate pruning''': repeat pruning until no more new short branches are discovered. When true, the topology of the graph is likely to change more in the pruning.<br />
*'''Use clusters''': if true then the pruning result is independent of the order in which the graph is traversed. False corresponds with methodology in Reznikov's article. See above for more details.<br />
*'''Print centroids''': Print the centroids (center coordinates) of the node pairs at the ends of each edge.<br />
*'''Print % culled edges''': Print statistics of different types of edges pruned.<br />
<br />
==== Results ====<br />
*'''Inter-trabecular angles''': angles between each branch of each node included in the analysis. Sorted into columns according to the number of branches per node. For example, column ''"3"'' shows the angles between branches of nodes with three branches.<br />
*'''Centroids''' (optional): A table of the center coordinates of the node pairs at the ends of each edge.<br />
*'''Culled edge percentages''' (optional): A table showing the percentages of different kinds of edges pruned, compared to the total number of edges in the analysed graph.<br />
*'''Skeleton''' (optional): if the plug-in had to skeletonise the input image, it displays the result of the thinning.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Inter-trabecular angles generalizes the idea of ''Triple point angles'' for any types of points. It also provides more tools for adjusting the graph for analysis.<br />
<br />
==== Related publications ====<br />
Reznikov, N et al. (2016), ''Inter-trabecular angle: A parameter of trabecular bone architecture in the human proximal femur that reveals underlying topological motifs'', Acta Biomaterialia, 44: 65--72, [https://doi.org/10.1016/j.actbio.2016.08.040 doi:j.actbio.2016.08.040].<br />
<br />
== Local thickness ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Thickness''.<br />
<br />
This plug-in includes [[Local_Thickness]] in BoneJ, and provides some additional options &amp; results. Local thickness measures ''the diameter of the largest sphere that fits inside the object and contains the point'' for each point i.e. foreground voxel in an image. The plug-in calculates mean and standard deviation of the trabecular thickness (Tb.Th) or trabecular spacing (Tb.Sp) directly from pixel values in the resulting thickness map. Foreground voxels are considered trabeculae, and background voxels are the spacing. Processing time is heavily dependent on feature size (in pixels); large features can take a very long time to process.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
* '''Calculate''': chooses which thickness maps to calculate - trabecular thickness, trabecular spacing, or both. In order to calculate trabecular spacing, the image voxels are inverted.<br />
* '''Show thickness maps''': display the calculated thickness maps or not.<br />
* '''Mask thickness maps''': remove artifacts from the thickness maps. Artifacts are foreground voxels not present in the original image.<br />
* '''Crop to ROI manager''': create thickness maps only from the area bounded by the ROIs in the ROI manager. Checking this option requires you've added ROIs to the ROI manager.<br />
<br />
==== Results ====<br />
* The mean and standard deviation for each thickness map calculated.<br />
* Displays thickness map images if ''Show thickness maps'' was selected. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Calls the latest version of [[Local_Thickness]].<br />
* Thickness values for background voxels are marked ''NaN'' instead of ''0''.<br />
<br />
==== Related publications ====<br />
* Dougherty R, Kunzelmann K (2007), ''Computing local thickness of 3D structures with ImageJ'', Microsc. Microanal., 13: 1678-1679, [http://dx.doi.org/10.1017/S1431927607074430 doi:10.1017/S1431927607074430]<br />
* Hildebrand T, Rüegsegger P (1997), ''A new method for the model-independent assessment of thickness in three-dimensional images'', J. Microsc., 185: 67-75, [http://dx.doi.org/10.1046/j.1365-2818.1997.1340694.x doi:10.1046/j.1365-2818.1997.1340694.x]<br />
<br />
== Moments of inertia (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Moments of Inertia''<br />
<br />
Calculates the three orthogonal principal axes and moments of inertia around those axes. It includes pixels with values between upper and lower limits, which can be defined in terms of unitless grey values or Hounsfield units (HU). It optionally creates a new stack with the image centred and rotated so that the principal axes are parallel to the image stack's x, y and z axes. Calculations are limited to a rectangular ROI if one is drawn. The plugin will guess whether the image is HU calibrated, and if so, apply HU limits of bone (0-4000 HU), otherwise it will calculate auto-thresholds based on the stack's histogram. If a calibration curve is known, the coefficients can be added to get weighted calculations. Aligning a bone with Moments of Inertia may be a useful step prior to Slice Geometry if bones are not aligned with the image z axis.<br />
<br />
==== Suitable images ====<br />
An 8-bit or 16-bit image.<br />
<br />
==== Parameters ====<br />
* '''Start slice''': First slice to include in calculations<br />
* '''End slice''': Last slice to include in calculations<br />
* '''HU Calibrated''': Plugin will guess whether the image is HU calibrated. If image is HU calibrated, make sure the box is checked and enter HU calibrated numeric values in the following fields<br />
* '''Bone Min''': Lower threshold, in either uncalibrated greys or HU<br />
* '''Bone Max''': Upper threshold, in either uncalibrated greys or HU<br />
* '''Slope''': m where physical density = m × pixel value + c<br />
* '''Y Intercept''': c where physical density = m × pixel value + c<br />
* '''Align result''': Draw a new stack with the principal axes parallel to the image axes<br />
* '''Show axes (2D)''': Draw the axes in white on the aligned image<br />
* '''Show axes (3D)''': Display the stack and its principal axes in a 3D Viewer window<br />
<br />
==== Results ====<br />
* '''Image (optional)''': a copy of the input image centered and aligned with the principal axes<br />
* '''Xc''': Centroid x-coordinate (mass-weighted by calibrated density)<br />
* '''Yc''': Centroid y-coordinate<br />
* '''Zc''': Centroid z-coordinate<br />
* '''Vol''': Total volume of thresholded voxels<br />
* '''Mass''': Mass of bone, from pixel values and density calibration coefficients<br />
* '''Icxx''': Moment around x axis passing through centroid<br />
* '''Icyy''': Moment around y axis passing through centroid<br />
* '''Iczz''': Moment around z axis passing through centroid<br />
* '''Icxy''': Off-axis term for constructing inertia tensor<br />
* '''Icxz''': Off-axis term for constructing inertia tensor<br />
* '''Icyz''': Off-axis term for constructing inertia tensor<br />
* '''I1''': Moment around the shortest principal axis<br />
* '''I2''': Moment around the middle principal axis<br />
* '''I3''': Moment around the longest principal axis<br />
* '''Verbose output in Log window'''<br />
** '''Eigenvalues''': Result of of eigenvalue decomposition. Moments of inertia<br />
** '''Eigenvectors of principal axes''': orientation of input image<br />
** '''Inverse eigenvector matrix''': used to map voxel positions in the aligned image back to voxel positions in the original image<br />
* Optional 3D display of principal axes<br />
<br />
== Optimise threshold (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Optimise Threshold''<br />
<br />
Several histogram-based methods exist for automatic determination of threshold for binary segmentation, but in ImageJ these are currently limited to pixel values in a single slice. The result can be excluding high values in a stack that are higher than the highest value in the current slice. This plugin uses all the pixels in a stack to construct a histogram and uses ImageJ's built-in isodata algorithm to determine the threshold. It optionally tests values either side of the initial auto-threshold for connectivity, because connectivity is very sensitive to image noise. The plugin attempts to find the threshold that results in minimal connectivity. Purification, erosion and dilation can improve the connectivity estimate, so Purify is always called, and erosion and dilation are applied as part of a sequence: purify, erode, purify, dilate.<br />
<br />
==== Suitable images ====<br />
An 8-bit of 16-bit image<br />
<br />
==== Parameters ====<br />
* '''Threshold Only''': Determine the threshold from the stack histogram only<br />
* '''Apply Threshold''': Replace the input image with a thresholded version<br />
* '''Show Plot''': Display a graph showing connectivity versus threshold<br />
* '''Tests''': Number of different thresholds to test for connectivity<br />
* '''Range''': Proportion of the initial threshold to test above and below initial thresholds<br />
* '''Subvolume Size''': Size of the volume to test for connectivity. Set small for a faster run and large to test the whole stack<br />
* '''Erosion Cycles''': Number of times to erode the stack after initial purification<br />
* '''Dilation Cycles''': Number of times to dilate the stack after secondary purification<br />
<br />
==== Results ====<br />
* '''Thresholded stack (optional)'''<br />
* '''Plot of connectivity versus threshold (optional)'''<br />
* '''Log of optimal threshold value'''<br />
<br />
== Orientation (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Orientation''<br />
<br />
Sets the direction in a 2D image, without rotating the image or changing it in any way. ''Slice Geometry'' (see below) uses ''Orientation'' to calculate diameter, second moments of area and section moduli around anatomic axes set by the user.<br />
<br />
==== Suitable images ====<br />
A 2D image.<br />
<br />
==== Parameters ====<br />
* '''Orientation''': input field displays current orientation (clockwise from 12 o'clock) and takes keyboard input<br />
* '''deg / rad''': display and set orientation in degrees or radians<br />
* '''Principal direction''': the main direction, the head of which is displayed in red<br />
* '''Secondary direction''': the orthogonal direction<br />
* '''Reflect''': swap the labels on this axis<br />
<br />
==== Results ====<br />
* '''Orientation axes''': draws the axes of the orientation on the image.<br />
<br />
== Purify (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Purify''<br />
<br />
Purify locates all particles in 3D and removes all but the largest foreground and background particles.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary.<br />
<br />
==== Parameters ====<br />
* '''Labelling algorithm''':<br />
** '''Mapped''': Non-recursive, memory efficient and fast.<br />
** '''Multithreaded''': use multiple cores and job chunking to reduce recursion. Fast on small stacks and if you have many CPU cores.<br />
** '''Linear''': Non-recursive but heavy on RAM and single-threaded. Fast on big stacks, but only if you have the memory.<br />
* '''Chunk Size''': number of slices to use in each particle labelling thread. If images are large, set this to 2<br />
* '''Performance Log''': Show verbose performance information to help tune your system<br />
* '''Make copy''': If checked, shows the result in a new window; if unchecked the result replaces the original image.<br />
<br />
==== Results ====<br />
* '''Performance metrics (optional)'''<br />
** '''Threads''': Number of CPU cores used<br />
** '''Slices''': Number of slices in the input image stack<br />
** '''Chunks''': Number of chunks of slices, each chunk is processed independently<br />
** '''Chunk size''': Number of slices per chunk<br />
** '''Last chunk size''': size of the last chunk (the remainder chunk)<br />
** '''Duration''': time in seconds to complete purification<br />
* '''Purified image''': optionally in a new image window.<br />
<br />
== Skeletonise ==<br />
Menu path ''Plugins &gt; BoneJ &gt;Skeletonise''.<br />
<br />
This plug-in simply includes [[Skeletonize3D]] in BoneJ. It adds some additional validation to check that your image suits the tool.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[Skeletonize3D]].<br />
<br />
== Slice geometry (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Slice Geometry''<br />
<br />
Slice Geometry calculates cross-sectional geometric properties of shapes: cross-sectional area, centroid, mean density, second moment of area, section modulus, Feret diameter and local thickness (2D and 3D). Measurements can be limited to a rectangular ROI. If your bone is not well aligned with the image axes, you may find it useful to align the bone to its principal axes using Moments of Inertia or by exporting a transformed volume from the ImageJ 3D Viewer. Importantly, no assumption of geometry is made for any of the measurements.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Bone''': Slice Geometry will guess from your image title the bone it is working on. If it is wrong, correct it. If your bone of interest isn't listed, email me.<br />
* '''2D Thickness''': Run Thickness on a per-slice basis; this fits circles rather than spheres<br />
* '''3D Thickness''': Run Thickness on the whole stack, fitting spheres, then report results per slice<br />
* '''Draw Axes''': Draw axes on an annotated copy of the stack<br />
* '''Draw Centroids''': Draw centroids on an annotated copy of the stack<br />
* '''Annotated Copy (2D)''': Create a new stack showing the centroids and principal axes<br />
* '''3D Annotation''': Display the stack, principal axes and centroids in the 3D viewer<br />
* '''Process Stack''': Calculate parameters for all slices in the stack<br />
* '''Clear Results''': Remove all data in the results table without saving, prior to calculating parameters<br />
* '''Use Orientation''': Also calculate parameters based on directions defined in Orientation<br />
* '''HU Calibrated''': Allows you to enter your thresholds in Hounsfield units (HU) or uncalibrated units<br />
* '''Bone Min''': minimum pixel value to use in calculations<br />
* '''Bone Max''': maximum pixel value to use in calculations<br />
* '''Slope''': <math>m</math> where physical density <math>= m * pixel value + c</math><br />
* '''Y Intercept''': <math>c</math> where physical density <math>= m * pixel value + c</math><br />
* '''Note''': density-weighted calculations are only applied to centroid determination at present<br />
* '''Partial volume compensation''': Use model that assumes Gaussian blur of imaging modality and linear transform between pixel value and sample 'density' to correct for blurred and pixelated images (e.g. small bone in clinical CT)<br />
* '''Background''': pixel value that corresponds to zero bone density (could be the 'fat', 'air' or 'muscle' pixel value)<br />
* '''Foreground''': pixel value that corresponds to 100% bone density<br />
* '''A rectangular ROI (optional)''': if there's a ROI, calculations are limited to its area.<br />
<br />
==== Results ====<br />
* '''Images (optional)''': displays the result images selected in the parameters<br />
* '''Bone code''': Unique numeric identifier for the anatomic name of each bone. Further bone codes can be added to BoneJ on request<br />
* '''Slice''': slice number indicating which slice contributed image data for this row of the results<br />
* '''CSA''': cross-sectional area<br />
* '''X cent.''': Centroid x-coordinate<br />
* '''Y cent.''': Centroid y-coordinate<br />
* '''Density''': mean physical density, calculated from pixel values and calibration coefficients<br />
* '''wX cent''': Density-weighted x-coordinate of centroid<br />
* '''wY cent''': Density-weighted y-coordinate of centroid<br />
* '''Theta''': angle of minor axis (axis for Imin, the long axis of your specimen's cross section) from the horizontal, ranging from <math>-\pi/2</math> to <math>\pi/2</math>, with positive as clockwise<br />
* '''R1''': maximum chord length from minor axis<br />
* '''R2''': maximum chord length from major axis<br />
* '''Imin''': Second moment of area around major axis<br />
* '''Imax''': Second moment of area around minor axis<br />
* '''Ipm''': Product moment of area (= 0 if no errors are present, e.g. due to pixelation)<br />
* '''Zmax''': Section modulus around major axis (Imax / R2)<br />
* '''Zmin''': Section modulus around minor axis (Imin / R1)<br />
* '''Zpol''': Polar section modulus<br />
* '''Feret Min''': Minimum caliper width<br />
* '''Feret Max''': Maximum caliper width<br />
* '''Feret Angle''': Orientation of maximum caliper width<br />
* '''Perimeter''': Distance around external surface<br />
* '''Max Thick 2D''': Maximum thickness determined by local thickness in 2D<br />
* '''Mean Thick 2D''': Mean thickness determined by local thickness in 2D<br />
* '''SD Thick 2D''': Standard deviation of the mean thickness determined by local thickness in 2D<br />
* '''Max Thick 3D''': Maximum thickness in this slice determined by local thickness in 3D<br />
* '''Mean Thick 3D''': Mean thickness in this slice determined by local thickness in 3D<br />
* '''SD Thick 3D''': Standard deviation of the mean thickness in this slice determined by local thickness in 3D Directional measurements, using Orientation directions, and the specimen's slice centroid<br />
* '''A (rad)''': Principal orientation (direction A)<br />
* '''B (rad)''': Secondary orientation (direction B)<br />
* '''IAa''': Second moment of area around Aa axis<br />
* '''IBb''': Second moment of area around Bb axis<br />
* '''ZAa''': Section modulus around Aa axis<br />
* '''ZBb''': Section modulus around Bb axis<br />
* '''RAa''': maximum chord length from Aa axis<br />
* '''RBb''': maximum chord length from Bb axis<br />
* '''DAa''': Calliper diameter in direction of Aa<br />
* '''DBb''': Calliper diameter in direction of Bb<br />
<br />
== Surface area ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Surface area''<br />
<br />
''Surface area'' creates a mesh from the bone in the image, and then calculates the area of the surface of the mesh. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Export STL file(s)''': if checked, then the meshes created from the image are saved as .stl-files. A dialog opens for you to select a folder for the files.<br />
<br />
==== Results ====<br />
* '''Surface area''': the surface area of the bone mesh<br />
* '''STL-file''': the mesh created from the bone image<br />
<br />
The surface area is reported and an .stl-file saved separately for each 3D subspace in the image. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Isosurface''<br />
<br />
== Surface fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Surface fraction''<br />
<br />
''Surface fraction'' calculates the fraction of bone volume in an image by comparing meshes created from bone particles and the whole image. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone. <br />
<br />
More formally defined, ''Surface fraction'' calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary.<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the mesh created from bone voxels.<br />
* '''Total volume''': volume of the mesh created from the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Volume fraction''<br />
<br />
== Results table ==<br />
The BoneJ plug-ins print their results into a shared result table. This is because we often need to calculate several measures for the same image, so it's handy to have them on one row. Repeated measures for the same image are reported on different rows. The results persist even if the table is closed. To clear the table run ''Plugins &gt; BoneJ &gt; Table &gt; Clear BoneJ results''.<br />
<br />
Note that some of the plug-ins (marked with ''WIP'') still use a ImageJ1 style results table that works slightly differently. As they are modernized they'll move to use the same new table as the others.<br />
<br />
== Usage reporting ==<br />
Menu path '' Edit &gt; Options &gt; BoneJ Usage (Modern | Legacy)''<br />
<br />
==== What is collected? ====<br />
<br />
BoneJ uses Google Analytics to report when a plugin's run() method completes successfully.<br />
<br />
<code><br />
ht<span>tp://</span>www.google-analytics.com/__utm.gif?utmwv=5.2.5&utms=0&utmn=1074354874&utmhn=bonej.org&utmt=event&utme=5(Plugin%20Usage*org.bonej.wrapperPlugins.wrapperUtils.UsageReporterOptions*0.5.1)&utmcs=UTF-8&utmsr=3840x1080&utmvp=3840x1080&utmsc=24-bit&utmul=en-gb&utmje=0&utmcn=1&utmdt=bonej.org%20Usage%20Statistics&utmhid=512699200&utmr=-&utmp=%2Fstats&utmac=UA-366405-8&utmcc=__utma%3D1589599318.1327557233.1538550102.1538550102.1538550102.2%3B%2B__utmz%3D1589599318.1538550102.79.42.utmcsr%3Dgoogle%7Cutmccn%3D(organic)%7Cutmcmd%3Dorganic%7Cutmctr%3DBoneJ%20Usage%20Reporter%3B<br />
</code><br />
<br />
A one-pixel GIF image is requested from Google, with a rather long set of parameters. Reported details are:<br />
<br />
* A unique ID which is stored in your ImageJ preferences between sessions<br />
* Your screen resolution<br />
* The name of the plugin's Java class<br />
* The version of BoneJ<br />
* The first time, last time and current time you ran a BoneJ plugin<br />
* Your system language and character map<br />
* Google also records your IP address as all webservers do in their logs<br />
* Some of these values are saved in your preferences<br />
* Your operating system and Java version are reported in the user agent ID<br />
<br />
==== What does the report look like? ====<br />
<br />
Data are collated with the Analytics report already used to track hits on bonej.org.<br />
<br />
==== For what is the data used? ====<br />
<br />
So far, BoneJ has been supported mainly by grants to scientists. We wish to create quantitative reports that detail how much BoneJ is being used in the community, so that decisions to fund further development can be made rationally.<br />
<br />
In addition, development resources are limited so it is useful to see which features are used heavily and can be consolidated, while little-used features can be abandoned or made more useful.<br />
<br />
==== That is noble but my work is top secret ====<br />
<br />
If you are uncomfortable with this level of data collection then please opt out, at the dialog which is prompted on first run, or by running '' Edit &gt; Options &gt; BoneJ Usage (Modern | Legacy) ''. Hitting Cancel (Legacy) or unchecking the box (Modern) will prevent any report from being gathered or sent and will also clear any values that were previously saved.<br />
<br />
You can opt back in by running '' Edit &gt; Options &gt; BoneJ Usage (Modern | Legacy)'', checking the box (Modern only) and hitting OK.<br />
<br />
==== Can I see the report? ====<br />
<br />
At the moment the report is kept private. If there is a strong will from the user community, who created the data in the first place, the report could be made more open. Please feel free to discuss on the user forum.<br />
How is it implemented?<br />
<br />
You can read the code on Github and in every copy of BoneJ. If you turn on ImageJ's debug mode (in '' Edit &gt; Options &gt; Misc. '') the URL and the GIF response will be logged to ImageJ's log window.<br />
<br />
== Where is my favourite plug-in? ==<br />
We have removed some plug-ins from BoneJ. ''Neck shaft angle'', ''Plateness'' and ''Structure model index'' have been discontinued. ''Interpolate ROIs'', [http://imagej.net/3D_Binary_Filters ''Dilate 3D'' and ''Erode 3D''] come pre-packaged with ImageJ, so they are no longer included in BoneJ2.<br />
<br />
Support for ''Kontron IMG'', ''Scanco ISQ'' and ''Stratec pQCT'' file formats has been moved to [[SCIFIO]]. Just run ''Edit &gt; Options &gt; ImageJ2'', and check ''Use SCIFIO when opening files''. When the option is enabled, these kinds of files can be opened from ''File > Open'' or dragging &amp; dropping them like any other format. <br />
<br />
''Distribution analysis'' and other pQCT related tools can now be downloaded independently from the [[PQCT]] update site.<br />
<br />
== Licence ==<br />
BoneJ2 is free, open-source software. You can redistribute it and/or modify it under the terms of the [https://github.com/bonej-org/BoneJ2/blob/master/LICENCE.md BSD 2-clause licence]. The software is provided "as is" and any warranties are disclaimed. In no event shall the copyright holder or contributors be liable.<br />
<br />
== Citation ==<br />
If you'd like to cite the software, we will soon publish a paper about BoneJ experimental. You can read the draft (and send us your feedback) as we're writing it [https://v1.overleaf.com/read/yxdkwpcdkjzj for Wellcome Open Research on Overleaf]. We recommend you cite the specific release used in your research.<br />
<br />
== Funding ==<br />
The redesign and porting effort to create BoneJ2 was supported by a [https://wellcome.ac.uk/what-we-do/directories/biomedical-resource-technology-development-grants-people-funded Wellcome Trust Biomedical Resource and Technology Development Grant]. Interaction with [[SciView]] was assisted by a [https://royalsociety.org/grants-schemes-awards/grants/international-exchanges/ Royal Society International Exchange grant].</div>Mdoubehttps://imagej.net/index.php?title=BoneJ2&diff=38572BoneJ22018-10-02T08:42:45Z<p>Mdoube: </p>
<hr />
<div>{{Infobox<br />
| name = BoneJ2<br />
| software = ImageJ<br />
| logo = [[File:Bonej-icon.png|96px]]<br />
| author = {{Person|Michaeldoube}}, {{Person|Rdom}}, {{Person|Alessandrofelder}}<br />
| maintainer = {{Person|Michaeldoube}}, {{Person|Alessandrofelder}}<br />
| source = {{GitHub|org=bonej-org|repo=BoneJ2}}, [https://doi.org/10.5281/zenodo.1427262 doi:10.5281/zenodo.1427262]<br />
| released = Dec 11<sup>th</sup>, 2017<br />
| latest version = cuneiform-experimental-patch2, Sep 24<sup>th</sup>, 2018<br />
| status = Active, Experimental<br />
}}<br />
BoneJ is a collection of skeletal biology plug-ins for ImageJ.<br />
This is the new experimental, modernized version of the software available through the ImageJ [http://imagej.net/Updater updater]. Its update site is called [http://sites.imagej.net/BoneJ BoneJ experimental]. For the old ImageJ1 version, see [[BoneJ]].<br />
<br />
This version works with the latest Fiji, and complies with the modern ImageJ [[architecture]]. Most plug-ins also now support hyperstacks, i.e. images with multiple channels or time frames.<br />
<br />
As the code is still experimental, it's still likely to change a lot. This means any scripts using the code might break, results can change, and plug-ins gain and lose parameters. Tools marked with ''WIP'' (work in progress), are more likely to undergo large changes. <br />
<br />
Below is the documentation for the plug-ins included in BoneJ experimental.<br />
<br />
== Installation ==<br />
[[File:Install-bonej.png|400 px|Installation steps]]<br />
# [http://imagej.net/Downloads Download] the latest version of Fiji for your operating system<br />
# Launch Fiji<br />
# Select in the menu ''Help'' &gt; ''Update...''<br />
# Click ''Manage update sites''<br />
# Check ''BoneJ experimental''<br />
# Click ''Close''<br />
# Click ''Apply changes''<br />
After the downloads have finished, close and restart Fiji.<br />
<br />
== Analyse skeleton ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyse skeleton''.<br />
<br />
This plug-in simply includes [[AnalyzeSkeleton]] in BoneJ. It adds some additional validation to check that your image suits the tool. It also skeletonizes your image by calling [[Skeletonize3D]] if needed.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[AnalyzeSkeleton]].<br />
<br />
== Anisotropy ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Anisotropy''.<br />
<br />
Anisotropy is used to quantify the directionality of trabecular bone. It tells whether the trabeculae have a certain orientation, or if they're randomly aligned. The method to measure anisotropy is fairly complex and consists of multiple steps:<br />
<br />
# Find mean intercept length (MIL) vectors from <math>n</math> directions<br />
# Plot MIL vectors into a point cloud<br />
# Solve the equation of an ellipsoid that best fits the point cloud<br />
# Calculate the degree of anisotropy from the radii of the ellipsoid<br />
<br />
It's important to note that algorithm is stochastic and does not guarantee exact results. Thus it's recommended to run it several times to establish the degree of anisotropy in your image.<br />
<br />
[[File:PhaseChanges.png|left|150 px|The red dots mark phase changes]]<br />
<br />
In the first step the algorithm draws parallel lines over the input image in direction <math>\mathbf{v}</math>. The direction is chosen randomly. Each line segment in the image stack is sampled to find points where it changes from background to foreground, i.e. where the line enters an object. The points are called ''phase changes'', in the adjacent figure they're marked with red dots. After the sampling is complete, the algorithm forms a ''MIL vector'', whose length is the total length of the line segments divided by the total number of phase changes found. The MIL vector has the same direction as <math>\mathbf{v}</math>. Drawing and sampling the lines is repeated for <math>n</math> directions, and the method creates <math>n</math> MIL vectors.<br />
<br />
After the MIL vectors have been calculated, they are added to a point cloud (a collection of points) around the origin. Then the method tries solve the equation of an ellipsoid that would fit the cloud. There may be no solution, especially if there are few points. That is, the fitting may fail at which point the plug-in stops. The radii of this ellipsoid determine the degree of anisotropy (see [http://imagej.net/index.php?title=BoneJ_experimental&action=submit#Results results]).<br />
<br />
[[File:MilCube.png|right|200 px|Projecting lines from a plane]]<br />
<br />
In more detail, the lines in the first step are projected from a <math>d * d</math> plane with normal <math>\mathbf{v}</math> (see the adjacent figure). The size <math>d = \sqrt{w^{2} + h^{2} + d^{2}}</math>, where <math>w, h, d</math> are the dimensions of the image stack. Each of the lines originates from a random point <math>\mathbf{o}</math> on the plane. The plane is divided into <math>m * m</math> same-sized sections, where <math>m</math> is a number selected by the user (i.e. ''Lines per dimension''). One origin <math>\mathbf{o}</math> is randomly selected from within each section. The lines are projected until they intercept the stack edges at points <math>\mathbf{o} + t_{min}\mathbf{v}</math>,<math>\mathbf{o} + t_{max}\mathbf{v}</math> (the algorithm solves for <math>t_{min}</math>, <math>t_{max}</math>). These line segments within the stack are then sampled for phase changes. In this drawing method some lines may miss the image stack completely, but conversely there aren't any areas in the stack that don't have an equal chance of being sampled.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
The plug-in is intended to analyse the "texture" of an object thus it suits samples of a larger whole, e.g. a trabecular cube that fills the whole stack. The results for whole objects such as the pre-packaged ''Bat Cochlea Volume'' ImageJ sample image are not really meaningful.<br />
<br />
==== Parameters ====<br />
* '''Directions''': number of times sampling is performed from different directions. The minimum is <math>9</math>, because that's how many independent variables the algorithm needs to solve the "shape" of the orientation in the image.<br />
* '''Lines per dimension''': controls how many parallel lines are drawn per each direction. For example, if ''lines per dimension'' is <math>2</math> then ''Anisotropy'' draws <math>4</math> lines. In this case, the origin points of the lines are randomly selected from within the <math>4</math> equal sections of the sampling plane (see above detailed explanation). The number is squared, because the location of the origins can vary in two dimensions.<br />
<br />
then the plane is divided into <math>4</math> equal sections, and a line is drawn from each. The origin point of each line is randomly located within their section.<br />
* '''Sampling increment''': controls how often each line is sampled. The default is <math>1.0</math>, which means that after each step a unit vector (a <math>1\_px</math> long line) is added to the position along a sampling line. The number of samples taken per line depends on the length of the line segment within the image stack.<br />
* '''Recommended minimum''': if checked, then the above three parameters are set to the recommended minimum values. In our tests we found that with these values the results are quite stable, and fitting unlikely to fail. However, these minimums are not guaranteed to be the best settings for your image.<br />
* '''Show radii''': if checked, then the radii of the fitted ellipsoid are shown in the results table.<br />
<br />
==== Results ====<br />
* '''Degree of anisotropy''': how much orientation there is in the structure. <math>0.0</math> means the image is completely isotropic, the sample has no directionality whatsoever. <math>1.0</math> means there is very strong orientation in the structure of the image. Note that these are theoretical minimum and maximum values. Due the stochastic nature of the algorithm, even an empty stack will have non-zero degree of anisotropy.<br />
* '''Radii of fitted ellipsoid''' (optional): the lengths of the radii <math>a \leq b \leq c</math> of the ellipsoid fitted on the MIL points. Degree of anisotropy <math>= 1.0 - a/c</math>.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* The results of this Anisotropy do not stabilize, so it's not repeated automatically like in BoneJ1. However, the results vary less between runs.<br />
* MIL vectors are drawn differently. In BoneJ1 they're drawn in sphere-shapes around random seed points. Here parallel lines from different directions are drawn through the whole stack. We think this method produces more uniform sampling, i.e. there's less chance of a directional bias.<br />
<br />
==== Related publications ====<br />
* Odgaard A (1997), ''Three-dimensional methods for quantification of cancellous bone architecture'', Bone, 20, 315-328, [http://dx.doi.org/10.1016/S8756-3282(97)00007-0 doi:10.1016/S8756-3282(97)00007-0]<br />
* Harrigan TP, Mann RW (1984), ''Characterization of microstructural anisotropy in orthotropic materials using a second rank tensor'', J Mater Sci, 19, 761-767, [http://dx.doi.org/10.1007/BF00540446 doi:10.1007/BF00540446]<br />
<br />
== Area/Volume fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Area/Volume fraction''<br />
<br />
''Area/Volume fraction'' calculates the fraction of bone in an image by it to the whole image. It counts all the foreground voxels, which it assumes represent bone, and compares them to the total number of voxels in the image. More formally defined, the plug-in calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''. In case of a 2D image, it calculates the fraction ''BA/TA'', which is the area of bone per unit area of the sample.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the bone voxels.<br />
* '''Total volume''': volume of the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 2D/3D subspace in the image, i.e. for each channel and time frame. Results will be for ''area'' if image is 2D.<br />
<br />
==== Differences to BoneJ1 ====<br />
* In BoneJ1 the plug-in was called ''Volume fraction''<br />
* Can process 2D images<br />
* Supports hyperstacks <br />
<br />
== Calibrate SCANCO (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyze &gt; Calibrate SCANCO''<br />
<br />
Applies the ''mg HA/ccm'' pixel value calibration, i.e. ''HU'' or Hounfield unit calibration stored in the .isq format metadata to the image.<br />
<br />
==== Suitable images ====<br />
An .isq format image generated by Scanco X-ray microtomography scanners.<br />
<br />
== Check voxel depth (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Check Voxel Depth''<br />
<br />
Checks whether slice spacing has been calibrated correctly. Some DICOM images contain slice thickness data in the header information, but thickness is not necessarily the same as the physical distance between consecutive slices' positions.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Connectivity ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Connectivity''.<br />
<br />
The Connectivity plug-in is designed to estimate the number of connected structures i.e. trabeculae in a trabecular network. This ''connectivity'' measure is related to a topological number <math>\chi</math> known as ''Euler characteristic'', ''Euler number'' or ''Euler-Poincaré characteristic''. Mathematically defined connectivity is <math>= 1 - (\chi + \Delta\chi)</math>. Roughly speaking, <math>\chi</math> describes the shape or structure of a topological space. It can also be expressed as <math>\chi = objects - handles + cavities</math>, where a handle is a hole that goes through an object (e.g the hole in a doughnut, or the ear of a coffee mug), and a cavity is enclosed inside one. When measuring trabecular cubes, you need to add <math>\Delta\chi</math> to <math>\chi</math> to get a more accurate estimate of the connectivity of the whole network. The term <math>\Delta\chi</math> corrects for the change in the topology of an object, when it's cut to pieces. <br />
<br />
NB some other Euler characteristic implementations report <math>\chi + \Delta\chi</math> as <math>\chi</math>, i.e. in them the correction <math>\Delta\chi</math> is implicit.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary. The plug-in assumes that there is only one particle in the foreground; to achieve this, run ''Purify''. Having more than one object often leads to negative connectivity.<br />
<br />
==== Results ====<br />
* '''Euler characteristic (χ)''': describes the shape of the object(s) in the image, <math>\chi = objects - handles + cavities</math>.<br />
* '''Corrected Euler (χ + Δχ)''': the Euler characteristic of the part corrected for edge effects to fit the whole.<br />
* '''Connectivity''': gives an estimate of the number of connected trabeculae in the image. Equal to <math>1 - (\chi + \Delta\chi)</math>.<br />
* '''Conn. density''': connectivity divided by unit volume. <br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* The old version reported ''Corrected Euler (χ + Δχ)'' incorrectly as ''Δχ''<br />
<br />
==== Related publications ====<br />
* Odgaard A, Gundersen HJG (1993), ''Quantification of connectivity in cancellous bone, with special emphasis on 3-D reconstructions'', Bone 14: 173-182, [http://dx.doi.org/10.1016/8756-3282(93)90245-6 doi:10.1016/8756-3282(93)90245-6.]<br />
* Toriwaki J, Yonekura T (2002), ''Euler number and connectivity indexes of a three dimensional digital picture'', [http://www.scipress.org/journals/forma/abstract/1703/17030183.html Forma 17: 183-209]<br />
<br />
== Delete slice range (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Delete slice range''<br />
<br />
Removes a range of slices from a stack, so that cropping in the Z direction is practical.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Ellipsoid factor (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Ellipsoid factor''.<br />
<br />
Ellipsoid Factor is a new method for measuring rod/plate geometry. It uses the axis lengths from prolate, oblate and intermediate elipsoids to determine how prolate or oblate the trabecular space is at a particular point. Highly prolate (javelin-shaped, rod-like) ellipsoids have a single long axis (<math>c</math>) and two short axes (<math>a, b</math>) such that <math>a < b \ll c</math> , whereas highly oblate (discus-shaped, plate-like) ellipsoids have two longer axes (<math>b, c</math>) and one much shorter axis (<math>a</math>) so that <math>a \ll b < c</math>. Calculating <math>EF</math> as the difference in ratios, <math>EF = a/b - b/c</math> leads to a useful scale ranging from <math>-1</math> (oblate, <math>a/b \approx 0, b/c \approx 1</math>) to <math>+1</math> (prolate, <math>a/b \approx 1, b/c \approx 0</math>). <math>EF</math> of <math>0</math> indicates an intermediate ellipsoid where <math>a/b = b/c</math>, which is the case for spheres (<math>a = b = c</math>) and other ellipsoids with axis ratios <math>a:qa:q^{2}a</math>. Ellipsoid Factor runs [[Skeletonize3D]] to get the medial axis of the trabeculae, which is used as the seed for sampling. Ellipsoids are seeded from each voxel on the medial axis. A combination of dilation, contraction, rotation and a small amount of translation is run iteratively until the ellipsoid increases no further in volume.<br />
<br />
The EF at a point in the structure is determined as the EF of the most voluminous ellipsoid which contains that point.<br />
<br />
If you use Ellipsoid Factor in your work, please cite:<br />
Doube M (2015), ''The Ellipsoid Factor for quantification of rods, plates and intermediate forms in 3D geometries'', Frontiers in Endocrinology, 6:15, [http://journal.frontiersin.org/Journal/10.3389/fendo.2015.00015/abstract doi: 10.3389/fendo.2015.00015]<br />
<br />
==== Suitable images ====<br />
A binary 3D image.<br />
<br />
==== Parameters ====<br />
* '''Sampling increment''': distance between sample points on each vector; should be less than the pixel spacing.<br />
* '''Vectors''': number of vectors to sample at each seed point.<br />
* '''Skeleton points per ellipsoid''': allows dense or sparse sampling, a value of <math>1</math> means that an ellipsoid is sampled at every seed point.<br />
* '''Contact sensitivity''': how many vectors must touch the background before dilation stops.<br />
* '''Maximum iterations''': how hard to try to find larger ellipsoids - fitting will stop if no improvement has been made after this number of iterations..<br />
* '''Maximum drift''': how far the centroid may be displaced from its seed point.<br />
* '''EF image''': stack containing EF values for each point contained by at least one ellipsoid and NaN elsewhere.<br />
* '''Ellipsoid ID image''': stack containing the ID of the biggest ellipsoid at each point, ranked in descending order (<math>0</math> is the largest ellipsoid).<br />
* '''Volume image''': image showing the volume of the largest ellipsoid containing that point.<br />
* '''Axis ratio images''': images showing <math>a/b</math> and <math>b/c</math> ratios foreach point containing at least one ellipsoid and NaN elsewhere.<br />
* '''Flinn peak plot''': plot of <math>a/b</math> vs <math>b/c</math> weighted by volume, so bright pixels indicate relatively more of the structure has that axis ratio.<br />
* '''Gaussian sigma:''' amount to blur the Flinn peak plot - set to <math>0</math> for a precise but less 'beautiful' result.<br />
* '''Flinn plot''': unweighted Flinn plot - every ellipsoid is represented by the same sized point regardless of ellipsoid size.<br />
<br />
==== Results ====<br />
* '''EF image''': stack containing EF values. NaN (not a number) values are used in the background. Summary statistics can be obtained by running Analyze > Histogram<br />
* '''Short-Mid image''': stack containing the <math>a/b</math> ratios<br />
* '''Mid-Long image''': stack contining the <math>b/c</math> ratios<br />
* '''Volume image''': stack containing ellipsoid volumes<br />
* '''Max id image''': stack containing the ID of the largest ellipsoid at each point; IDs relate to the sort order based on volume, so ID = 0 is the largest ellipsoid. <math>-1</math> is foreground and background is labelled with a large negative number.<br />
* '''Flinn diagram''': plot of <math>a/b</math> versus <math>b/c</math> values present in the volume<br />
* '''Weighted Flinn plot''': Flinn diagram with peaks of intensity proportional to volume occupied by each (<math>a/b</math>, <math>b/c</math>) ratio<br />
<br />
==== Related publications ====<br />
Salmon PL, Ohlsson C, Shefelbine SJ, Doube M (2015), ''Structure model index does not measure rods and plates in trabecular bone'', Frontiers in Endocrinology, 6:162, [http://dx.doi.org/10.3389/fendo.2015.00162 doi:10.3389/fendo.2015.00162].<br />
<br />
== Fit ellipsoid ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit ellipsoid''.<br />
<br />
Finds the ellipsoid that best fits a set of point or multi-point ROIs in the ROI Manager. ''Fit ellipsoid'' may fail to fit an ellipsoid. The more points you add, the more likely it is to succeed. Points are scaled to the spatial calibration (voxel widht, height &amp; depth) of the input image.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': ROIs with at least nine points in the ROI Manager.<br />
<br />
==== Results ====<br />
* '''Radii''': the radii ''a'', ''b'' and ''c'' of the fitted ellipsoid. Radius ''a'' is the shortest and ''c'' the longest.<br />
* '''Centroid''': ''x'', ''y'' and ''z'' coordinates of the ellipsoid centre point.<br />
<br />
==== Differences from BoneJ1 ====<br />
* Supports multi-point ROIs.<br />
* Plug-in cancels if an ellipsoid can't be found, instead of reporting invalid results.<br />
<br />
== Fit sphere (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit sphere''.<br />
<br />
Finds the sphere that best fits a set of point ROIs, and optionally displays the image data bounded by the sphere in a new image window. Place a set of point ROIs on structures of interest, hitting [T] to add each point to the ROI Manager. Fit Sphere takes the coordinates of the points from the ROI Manager and applies a least-squares optimisation.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': populated with at least 5 point ROI's<br />
* '''Copy Sphere''': Create a new stack containing image data from within the best-fit sphere.<br />
* '''Padding''': Number of black pixels to put between the sphere and the sides of the image<br />
* '''Inner Cube''': Create a new stack containing image data from the cube that just fits inside the best-fit sphere.<br />
* '''Outer Cube''': Create a new stack containing image data from the cube that the best-fit sphere just fits inside.<br />
* '''Crop Factor''': Radius used for generating new images is multiplied by crop factor so that a bigger or smaller volume can be produced.<br />
* '''Add to ROI Manager''': Add the sphere to the ROI Manager as a set of circular ROIs<br />
* '''Clear ROI Manager''': Clear any existing ROIs in the Manager prior to adding circles<br />
<br />
==== Results ====<br />
* '''X Centroid''': x-coordinate of sphere's centroid<br />
* '''Y Centroid''': y-coordinate of sphere's centroid<br />
* '''Z Centroid''': z-coordinate of sphere's centroid<br />
* '''Radius''': length of radius<br />
* '''Images (optional)''': images containing a copy of the original data within the sphere, or within cubes bounding or bounded by the sphere.<br />
<br />
== Fractal dimension ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fractal dimension''.<br />
<br />
This plug-in estimates the fractal dimension of an image by applying the box-counting algorithm. In this algorithm grids of diminishing size are scanned over the image, and the number of boxes containing at least one foreground voxel is counted. As the box size decreases and the grid becomes finer, the proportion of foreground boxes increases in a fractal structure. See [https://en.wikipedia.org/wiki/Box_counting Wikipedia] for further details. BoneJ uses a fixed-grid scan, with an option to try to find the optimal covering.<br />
<br />
The box counting algorithm produces a pair of <math>(log(n), -log(m))</math> values for each iteration it runs. Here n = number of boxes with foreground, and m = box size. These pairs are passed to a curve-fitting algorithm, which returns the slope of the linear function which describes them ([https://en.wikipedia.org/wiki/Linear_regression regression fit]). The coefficient of this slope is the fractal dimension.<br />
<br />
Fractal dimension is markedly influenced by the parameters selected for the box counting algorithm, so it's worth running it several times with different values to find an accurate measure for your image.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* ''Starting box size (px)'': the size (sides) in pixels of a box in the sampling grid in the first iteration of the algorithm.<br />
* ''Smallest box size (px)'': the minimum size in pixels of a box in the grid. When box size becomes smaller than this limit, the algorithm iterates one more time, and then stops.<br />
* ''Box scaling factor'': the term used to divide the box size after iteration. For example, a scaling factor of <math>2.0</math> halves the size at each step.<br />
* ''Grid translations'': how many times at each iteration the grid is moved to try to the find the optimal covering. The optimal covering covers the objects in the image with the least amount of boxes. The larger the parameter the more likely it is that optimal covering is found. However, this slows down the plug-in considerably.<br />
* ''Automatic parameters'': if checked, then the plug-in runs with default parameters.<br />
* ''Show points'': if checked, then the plug-in displays the <math>(log(n), -log(m))</math> values it calculated. <br />
<br />
==== Results ====<br />
* ''Fractal dimension'': the [https://en.wikipedia.org/wiki/Fractal_dimension fractal dimension] of the image. For example, the Koch snow flake has a fractal dimension of 1.262.<br />
* ''R²'': the [https://en.wikipedia.org/wiki/Coefficient_of_determination coefficient of determination] of the line fitted to the <math>(log(n), -log(m))</math> points.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* Algorithm parameters can be changed by the user.<br />
<br />
==== Related publications ====<br />
Fazzalari NL, Parkinson IH (1996), ''Fractal dimension and architecture of trabecular bone'', J Pathol, 178: 100-5, [http://dx.doi.org/10.1002/(SICI)1096-9896(199601)178:1%3C100::AID-PATH429%3E3.0.CO;2-K doi:10.1002/(SICI)1096-9896(199601)178:1<100::AID-PATH429>3.0.CO;2-K].<br />
<br />
== Inter-trabecular angles ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Inter-trabecular Angles''.<br />
<br />
The plug-in was designed to analyse the angles between trabeculae of cancellous bone. First it calls [[Skeletonize3D]] to thin the input image (if necessary). Then it calls [[AnalyzeSkeleton]], which creates a graph of the largest skeleton (by number of nodes) in the thinned image. The graph consists of nodes and the edges that connect them. Nodes are also known as vertices, and edges as branches. Roughly speaking the edges correspond to trabeculae and the nodes to the junction points, where trabeuculae meet.<br />
<br />
The graph is often not a perfect representation of the trabecular network in the input image. ''Inter-trabecular angles'' offers many options to adjust the graph's topology and filter out artefacts that may obfuscate or skew the results. First it allows you to filter out nodes with too many or too few edges. Secondly it can be used to prune very short edges, which often do not represent actual trabeculae. <br />
<br />
[[File:Ita_types.png|left|150 px|Types of edges in pruning]]<br />
Pruning works differently for different types of edges. There are four kinds: outer, dead-end, inner and short. An outer edge doesn't interconnect different parts of a graph. In other words, one (and only one) of its endpoints connects to only one branch, i.e. the edge itself. In the figure the outer edge is colored black. A dead-end (blue) is an outer edge whose length is less than the minimum set by the user, i.e. it's a short, outer edge. An inner edge (green) connects to end points with more than one branch. A short edge is an inner edge, whose length is less than the set minimum. When a dead-end is pruned, it with its "lonely" end-point are removed from the graph. When a short edge is pruned, it and it's endpoints are removed, and a new node is placed at the midpoint of the former. This new node connects to all the branches the previous nodes connected to.<br />
<br />
''Inter-trabecular angles'' offers two further options to control pruning: ''iteration'' and ''clustering''. Iteration repeats pruning until no new short edges are found. Sometimes pruning can create new short edges, and thus the graph may still have them after one iteration. However, iteration can alter the structure of the graph too dramatically. Clustering searches for all nodes connected by short edges, before removing any. In the figure, clustering pruning would remove the four nodes and the red edges between them in one go. It would create a new node at the center of the previous four, and connect it to the blue and green edges. When pruning is not clustering, it removes edges one-by-one. This changes the end result depending on the order the edges are traversed. Clustering creates the same result each time. <br />
<br />
Pruning also removes loops and redundant parallel edges. The former connects to the same node on both ends, and the latter connects two nodes that are already connected by another edge. <br />
<br />
The pruning and filtering features were added so that we can replicate and continue from the research of [https://doi.org/10.1016/j.actbio.2016.08.040 Reznikov et al.]<br />
<br />
==== Suitable images ====<br />
An 8-bit, binary 2D or 3D image. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
*'''Minimum valence''': minimum number of branches for a node to be included in the analysis.<br />
*'''Maximum valence''': maximum number of branches for a node to be included in the analysis.<br />
*'''Minimum trabecular length (px)''': minimum length for a branch to be preserved in the pruning. Length is calculated as the distance between the endpoints of a branch.<br />
** This length is also displayed in the units of the image calibration<br />
*'''Margin (px)''': minimum distance of a node from image stack edges to be included in the analysis. Having nodes too close to the edges can make the results less accurate, because you get more branches that do not terminate to a node at the other end.<br />
*'''Iterate pruning''': repeat pruning until no more new short branches are discovered. When true, the topology of the graph is likely to change more in the pruning.<br />
*'''Use clusters''': if true then the pruning result is independent of the order in which the graph is traversed. False corresponds with methodology in Reznikov's article. See above for more details.<br />
*'''Print centroids''': Print the centroids (center coordinates) of the node pairs at the ends of each edge.<br />
*'''Print % culled edges''': Print statistics of different types of edges pruned.<br />
<br />
==== Results ====<br />
*'''Inter-trabecular angles''': angles between each branch of each node included in the analysis. Sorted into columns according to the number of branches per node. For example, column ''"3"'' shows the angles between branches of nodes with three branches.<br />
*'''Centroids''' (optional): A table of the center coordinates of the node pairs at the ends of each edge.<br />
*'''Culled edge percentages''' (optional): A table showing the percentages of different kinds of edges pruned, compared to the total number of edges in the analysed graph.<br />
*'''Skeleton''' (optional): if the plug-in had to skeletonise the input image, it displays the result of the thinning.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Inter-trabecular angles generalizes the idea of ''Triple point angles'' for any types of points. It also provides more tools for adjusting the graph for analysis.<br />
<br />
==== Related publications ====<br />
Reznikov, N et al. (2016), ''Inter-trabecular angle: A parameter of trabecular bone architecture in the human proximal femur that reveals underlying topological motifs'', Acta Biomaterialia, 44: 65--72, [https://doi.org/10.1016/j.actbio.2016.08.040 doi:j.actbio.2016.08.040].<br />
<br />
== Local thickness ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Thickness''.<br />
<br />
This plug-in includes [[Local_Thickness]] in BoneJ, and provides some additional options &amp; results. Local thickness measures ''the diameter of the largest sphere that fits inside the object and contains the point'' for each point i.e. foreground voxel in an image. The plug-in calculates mean and standard deviation of the trabecular thickness (Tb.Th) or trabecular spacing (Tb.Sp) directly from pixel values in the resulting thickness map. Foreground voxels are considered trabeculae, and background voxels are the spacing. Processing time is heavily dependent on feature size (in pixels); large features can take a very long time to process.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
* '''Calculate''': chooses which thickness maps to calculate - trabecular thickness, trabecular spacing, or both. In order to calculate trabecular spacing, the image voxels are inverted.<br />
* '''Show thickness maps''': display the calculated thickness maps or not.<br />
* '''Mask thickness maps''': remove artifacts from the thickness maps. Artifacts are foreground voxels not present in the original image.<br />
* '''Crop to ROI manager''': create thickness maps only from the area bounded by the ROIs in the ROI manager. Checking this option requires you've added ROIs to the ROI manager.<br />
<br />
==== Results ====<br />
* The mean and standard deviation for each thickness map calculated.<br />
* Displays thickness map images if ''Show thickness maps'' was selected. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Calls the latest version of [[Local_Thickness]].<br />
* Thickness values for background voxels are marked ''NaN'' instead of ''0''.<br />
<br />
==== Related publications ====<br />
* Dougherty R, Kunzelmann K (2007), ''Computing local thickness of 3D structures with ImageJ'', Microsc. Microanal., 13: 1678-1679, [http://dx.doi.org/10.1017/S1431927607074430 doi:10.1017/S1431927607074430]<br />
* Hildebrand T, Rüegsegger P (1997), ''A new method for the model-independent assessment of thickness in three-dimensional images'', J. Microsc., 185: 67-75, [http://dx.doi.org/10.1046/j.1365-2818.1997.1340694.x doi:10.1046/j.1365-2818.1997.1340694.x]<br />
<br />
== Moments of inertia (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Moments of Inertia''<br />
<br />
Calculates the three orthogonal principal axes and moments of inertia around those axes. It includes pixels with values between upper and lower limits, which can be defined in terms of unitless grey values or Hounsfield units (HU). It optionally creates a new stack with the image centred and rotated so that the principal axes are parallel to the image stack's x, y and z axes. Calculations are limited to a rectangular ROI if one is drawn. The plugin will guess whether the image is HU calibrated, and if so, apply HU limits of bone (0-4000 HU), otherwise it will calculate auto-thresholds based on the stack's histogram. If a calibration curve is known, the coefficients can be added to get weighted calculations. Aligning a bone with Moments of Inertia may be a useful step prior to Slice Geometry if bones are not aligned with the image z axis.<br />
<br />
==== Suitable images ====<br />
An 8-bit or 16-bit image.<br />
<br />
==== Parameters ====<br />
* '''Start slice''': First slice to include in calculations<br />
* '''End slice''': Last slice to include in calculations<br />
* '''HU Calibrated''': Plugin will guess whether the image is HU calibrated. If image is HU calibrated, make sure the box is checked and enter HU calibrated numeric values in the following fields<br />
* '''Bone Min''': Lower threshold, in either uncalibrated greys or HU<br />
* '''Bone Max''': Upper threshold, in either uncalibrated greys or HU<br />
* '''Slope''': m where physical density = m × pixel value + c<br />
* '''Y Intercept''': c where physical density = m × pixel value + c<br />
* '''Align result''': Draw a new stack with the principal axes parallel to the image axes<br />
* '''Show axes (2D)''': Draw the axes in white on the aligned image<br />
* '''Show axes (3D)''': Display the stack and its principal axes in a 3D Viewer window<br />
<br />
==== Results ====<br />
* '''Image (optional)''': a copy of the input image centered and aligned with the principal axes<br />
* '''Xc''': Centroid x-coordinate (mass-weighted by calibrated density)<br />
* '''Yc''': Centroid y-coordinate<br />
* '''Zc''': Centroid z-coordinate<br />
* '''Vol''': Total volume of thresholded voxels<br />
* '''Mass''': Mass of bone, from pixel values and density calibration coefficients<br />
* '''Icxx''': Moment around x axis passing through centroid<br />
* '''Icyy''': Moment around y axis passing through centroid<br />
* '''Iczz''': Moment around z axis passing through centroid<br />
* '''Icxy''': Off-axis term for constructing inertia tensor<br />
* '''Icxz''': Off-axis term for constructing inertia tensor<br />
* '''Icyz''': Off-axis term for constructing inertia tensor<br />
* '''I1''': Moment around the shortest principal axis<br />
* '''I2''': Moment around the middle principal axis<br />
* '''I3''': Moment around the longest principal axis<br />
* '''Verbose output in Log window'''<br />
** '''Eigenvalues''': Result of of eigenvalue decomposition. Moments of inertia<br />
** '''Eigenvectors of principal axes''': orientation of input image<br />
** '''Inverse eigenvector matrix''': used to map voxel positions in the aligned image back to voxel positions in the original image<br />
* Optional 3D display of principal axes<br />
<br />
== Optimise threshold (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Optimise Threshold''<br />
<br />
Several histogram-based methods exist for automatic determination of threshold for binary segmentation, but in ImageJ these are currently limited to pixel values in a single slice. The result can be excluding high values in a stack that are higher than the highest value in the current slice. This plugin uses all the pixels in a stack to construct a histogram and uses ImageJ's built-in isodata algorithm to determine the threshold. It optionally tests values either side of the initial auto-threshold for connectivity, because connectivity is very sensitive to image noise. The plugin attempts to find the threshold that results in minimal connectivity. Purification, erosion and dilation can improve the connectivity estimate, so Purify is always called, and erosion and dilation are applied as part of a sequence: purify, erode, purify, dilate.<br />
<br />
==== Suitable images ====<br />
An 8-bit of 16-bit image<br />
<br />
==== Parameters ====<br />
* '''Threshold Only''': Determine the threshold from the stack histogram only<br />
* '''Apply Threshold''': Replace the input image with a thresholded version<br />
* '''Show Plot''': Display a graph showing connectivity versus threshold<br />
* '''Tests''': Number of different thresholds to test for connectivity<br />
* '''Range''': Proportion of the initial threshold to test above and below initial thresholds<br />
* '''Subvolume Size''': Size of the volume to test for connectivity. Set small for a faster run and large to test the whole stack<br />
* '''Erosion Cycles''': Number of times to erode the stack after initial purification<br />
* '''Dilation Cycles''': Number of times to dilate the stack after secondary purification<br />
<br />
==== Results ====<br />
* '''Thresholded stack (optional)'''<br />
* '''Plot of connectivity versus threshold (optional)'''<br />
* '''Log of optimal threshold value'''<br />
<br />
== Orientation (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Orientation''<br />
<br />
Sets the direction in a 2D image, without rotating the image or changing it in any way. ''Slice Geometry'' (see below) uses ''Orientation'' to calculate diameter, second moments of area and section moduli around anatomic axes set by the user.<br />
<br />
==== Suitable images ====<br />
A 2D image.<br />
<br />
==== Parameters ====<br />
* '''Orientation''': input field displays current orientation (clockwise from 12 o'clock) and takes keyboard input<br />
* '''deg / rad''': display and set orientation in degrees or radians<br />
* '''Principal direction''': the main direction, the head of which is displayed in red<br />
* '''Secondary direction''': the orthogonal direction<br />
* '''Reflect''': swap the labels on this axis<br />
<br />
==== Results ====<br />
* '''Orientation axes''': draws the axes of the orientation on the image.<br />
<br />
== Purify (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Purify''<br />
<br />
Purify locates all particles in 3D and removes all but the largest foreground and background particles.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary.<br />
<br />
==== Parameters ====<br />
* '''Labelling algorithm''':<br />
** '''Mapped''': Non-recursive, memory efficient and fast.<br />
** '''Multithreaded''': use multiple cores and job chunking to reduce recursion. Fast on small stacks and if you have many CPU cores.<br />
** '''Linear''': Non-recursive but heavy on RAM and single-threaded. Fast on big stacks, but only if you have the memory.<br />
* '''Chunk Size''': number of slices to use in each particle labelling thread. If images are large, set this to 2<br />
* '''Performance Log''': Show verbose performance information to help tune your system<br />
* '''Make copy''': If checked, shows the result in a new window; if unchecked the result replaces the original image.<br />
<br />
==== Results ====<br />
* '''Performance metrics (optional)'''<br />
** '''Threads''': Number of CPU cores used<br />
** '''Slices''': Number of slices in the input image stack<br />
** '''Chunks''': Number of chunks of slices, each chunk is processed independently<br />
** '''Chunk size''': Number of slices per chunk<br />
** '''Last chunk size''': size of the last chunk (the remainder chunk)<br />
** '''Duration''': time in seconds to complete purification<br />
* '''Purified image''': optionally in a new image window.<br />
<br />
== Skeletonise ==<br />
Menu path ''Plugins &gt; BoneJ &gt;Skeletonise''.<br />
<br />
This plug-in simply includes [[Skeletonize3D]] in BoneJ. It adds some additional validation to check that your image suits the tool.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[Skeletonize3D]].<br />
<br />
== Slice geometry (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Slice Geometry''<br />
<br />
Slice Geometry calculates cross-sectional geometric properties of shapes: cross-sectional area, centroid, mean density, second moment of area, section modulus, Feret diameter and local thickness (2D and 3D). Measurements can be limited to a rectangular ROI. If your bone is not well aligned with the image axes, you may find it useful to align the bone to its principal axes using Moments of Inertia or by exporting a transformed volume from the ImageJ 3D Viewer. Importantly, no assumption of geometry is made for any of the measurements.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Bone''': Slice Geometry will guess from your image title the bone it is working on. If it is wrong, correct it. If your bone of interest isn't listed, email me.<br />
* '''2D Thickness''': Run Thickness on a per-slice basis; this fits circles rather than spheres<br />
* '''3D Thickness''': Run Thickness on the whole stack, fitting spheres, then report results per slice<br />
* '''Draw Axes''': Draw axes on an annotated copy of the stack<br />
* '''Draw Centroids''': Draw centroids on an annotated copy of the stack<br />
* '''Annotated Copy (2D)''': Create a new stack showing the centroids and principal axes<br />
* '''3D Annotation''': Display the stack, principal axes and centroids in the 3D viewer<br />
* '''Process Stack''': Calculate parameters for all slices in the stack<br />
* '''Clear Results''': Remove all data in the results table without saving, prior to calculating parameters<br />
* '''Use Orientation''': Also calculate parameters based on directions defined in Orientation<br />
* '''HU Calibrated''': Allows you to enter your thresholds in Hounsfield units (HU) or uncalibrated units<br />
* '''Bone Min''': minimum pixel value to use in calculations<br />
* '''Bone Max''': maximum pixel value to use in calculations<br />
* '''Slope''': <math>m</math> where physical density <math>= m * pixel value + c</math><br />
* '''Y Intercept''': <math>c</math> where physical density <math>= m * pixel value + c</math><br />
* '''Note''': density-weighted calculations are only applied to centroid determination at present<br />
* '''Partial volume compensation''': Use model that assumes Gaussian blur of imaging modality and linear transform between pixel value and sample 'density' to correct for blurred and pixelated images (e.g. small bone in clinical CT)<br />
* '''Background''': pixel value that corresponds to zero bone density (could be the 'fat', 'air' or 'muscle' pixel value)<br />
* '''Foreground''': pixel value that corresponds to 100% bone density<br />
* '''A rectangular ROI (optional)''': if there's a ROI, calculations are limited to its area.<br />
<br />
==== Results ====<br />
* '''Images (optional)''': displays the result images selected in the parameters<br />
* '''Bone code''': Unique numeric identifier for the anatomic name of each bone. Further bone codes can be added to BoneJ on request<br />
* '''Slice''': slice number indicating which slice contributed image data for this row of the results<br />
* '''CSA''': cross-sectional area<br />
* '''X cent.''': Centroid x-coordinate<br />
* '''Y cent.''': Centroid y-coordinate<br />
* '''Density''': mean physical density, calculated from pixel values and calibration coefficients<br />
* '''wX cent''': Density-weighted x-coordinate of centroid<br />
* '''wY cent''': Density-weighted y-coordinate of centroid<br />
* '''Theta''': angle of minor axis (axis for Imin, the long axis of your specimen's cross section) from the horizontal, ranging from <math>-\pi/2</math> to <math>\pi/2</math>, with positive as clockwise<br />
* '''R1''': maximum chord length from minor axis<br />
* '''R2''': maximum chord length from major axis<br />
* '''Imin''': Second moment of area around major axis<br />
* '''Imax''': Second moment of area around minor axis<br />
* '''Ipm''': Product moment of area (= 0 if no errors are present, e.g. due to pixelation)<br />
* '''Zmax''': Section modulus around major axis (Imax / R2)<br />
* '''Zmin''': Section modulus around minor axis (Imin / R1)<br />
* '''Zpol''': Polar section modulus<br />
* '''Feret Min''': Minimum caliper width<br />
* '''Feret Max''': Maximum caliper width<br />
* '''Feret Angle''': Orientation of maximum caliper width<br />
* '''Perimeter''': Distance around external surface<br />
* '''Max Thick 2D''': Maximum thickness determined by local thickness in 2D<br />
* '''Mean Thick 2D''': Mean thickness determined by local thickness in 2D<br />
* '''SD Thick 2D''': Standard deviation of the mean thickness determined by local thickness in 2D<br />
* '''Max Thick 3D''': Maximum thickness in this slice determined by local thickness in 3D<br />
* '''Mean Thick 3D''': Mean thickness in this slice determined by local thickness in 3D<br />
* '''SD Thick 3D''': Standard deviation of the mean thickness in this slice determined by local thickness in 3D Directional measurements, using Orientation directions, and the specimen's slice centroid<br />
* '''A (rad)''': Principal orientation (direction A)<br />
* '''B (rad)''': Secondary orientation (direction B)<br />
* '''IAa''': Second moment of area around Aa axis<br />
* '''IBb''': Second moment of area around Bb axis<br />
* '''ZAa''': Section modulus around Aa axis<br />
* '''ZBb''': Section modulus around Bb axis<br />
* '''RAa''': maximum chord length from Aa axis<br />
* '''RBb''': maximum chord length from Bb axis<br />
* '''DAa''': Calliper diameter in direction of Aa<br />
* '''DBb''': Calliper diameter in direction of Bb<br />
<br />
== Surface area ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Surface area''<br />
<br />
''Surface area'' creates a mesh from the bone in the image, and then calculates the area of the surface of the mesh. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Export STL file(s)''': if checked, then the meshes created from the image are saved as .stl-files. A dialog opens for you to select a folder for the files.<br />
<br />
==== Results ====<br />
* '''Surface area''': the surface area of the bone mesh<br />
* '''STL-file''': the mesh created from the bone image<br />
<br />
The surface area is reported and an .stl-file saved separately for each 3D subspace in the image. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Isosurface''<br />
<br />
== Surface fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Surface fraction''<br />
<br />
''Surface fraction'' calculates the fraction of bone volume in an image by comparing meshes created from bone particles and the whole image. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone. <br />
<br />
More formally defined, ''Surface fraction'' calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary.<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the mesh created from bone voxels.<br />
* '''Total volume''': volume of the mesh created from the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Volume fraction''<br />
<br />
== Results table ==<br />
The BoneJ plug-ins print their results into a shared result table. This is because we often need to calculate several measures for the same image, so it's handy to have them on one row. Repeated measures for the same image are reported on different rows. The results persist even if the table is closed. To clear the table run ''Plugins &gt; BoneJ &gt; Table &gt; Clear BoneJ results''.<br />
<br />
Note that some of the plug-ins (marked with ''WIP'') still use a ImageJ1 style results table that works slightly differently. As they are modernized they'll move to use the same new table as the others.<br />
<br />
== Where is my favourite plug-in? ==<br />
We have removed some plug-ins from BoneJ. ''Neck shaft angle'', ''Plateness'' and ''Structure model index'' have been discontinued. ''Interpolate ROIs'', [http://imagej.net/3D_Binary_Filters ''Dilate 3D'' and ''Erode 3D''] come pre-packaged with ImageJ, so they are no longer included in BoneJ2.<br />
<br />
Support for ''Kontron IMG'', ''Scanco ISQ'' and ''Stratec pQCT'' file formats has been moved to [[SCIFIO]]. Just run ''Edit &gt; Options &gt; ImageJ2'', and check ''Use SCIFIO when opening files''. When the option is enabled, these kinds of files can be opened from ''File > Open'' or dragging &amp; dropping them like any other format. <br />
<br />
''Distribution analysis'' and other pQCT related tools can now be downloaded independently from the [[PQCT]] update site.<br />
<br />
== Licence ==<br />
BoneJ2 is free, open-source software. You can redistribute it and/or modify it under the terms of the [https://github.com/bonej-org/BoneJ2/blob/master/LICENCE.md BSD 2-clause licence]. The software is provided "as is" and any warranties are disclaimed. In no event shall the copyright holder or contributors be liable.<br />
<br />
== Citation ==<br />
If you'd like to cite the software, we will soon publish a paper about BoneJ experimental. You can read the draft (and send us your feedback) as we're writing it [https://v1.overleaf.com/read/yxdkwpcdkjzj for Wellcome Open Research on Overleaf]. We recommend you cite the specific release used in your research.<br />
<br />
== Funding ==<br />
The redesign and porting effort to create BoneJ2 was supported by a [https://wellcome.ac.uk/what-we-do/directories/biomedical-resource-technology-development-grants-people-funded Wellcome Trust Biomedical Resource and Technology Development Grant]. Interaction with [[SciView]] was assisted by a [https://royalsociety.org/grants-schemes-awards/grants/international-exchanges/ Royal Society International Exchange grant].</div>Mdoubehttps://imagej.net/index.php?title=BoneJ2&diff=38571BoneJ22018-10-02T08:42:26Z<p>Mdoube: </p>
<hr />
<div>{{Infobox<br />
| name = BoneJ2 (experimental release)<br />
| software = ImageJ<br />
| logo = [[File:Bonej-icon.png|96px]]<br />
| author = {{Person|Michaeldoube}}, {{Person|Rdom}}, {{Person|Alessandrofelder}}<br />
| maintainer = {{Person|Michaeldoube}}, {{Person|Alessandrofelder}}<br />
| source = {{GitHub|org=bonej-org|repo=BoneJ2}}, [https://doi.org/10.5281/zenodo.1427262 doi:10.5281/zenodo.1427262]<br />
| released = Dec 11<sup>th</sup>, 2017<br />
| latest version = cuneiform-experimental-patch2, Sep 24<sup>th</sup>, 2018<br />
| status = Active, Experimental<br />
}}<br />
BoneJ is a collection of skeletal biology plug-ins for ImageJ.<br />
This is the new experimental, modernized version of the software available through the ImageJ [http://imagej.net/Updater updater]. Its update site is called [http://sites.imagej.net/BoneJ BoneJ experimental]. For the old ImageJ1 version, see [[BoneJ]].<br />
<br />
This version works with the latest Fiji, and complies with the modern ImageJ [[architecture]]. Most plug-ins also now support hyperstacks, i.e. images with multiple channels or time frames.<br />
<br />
As the code is still experimental, it's still likely to change a lot. This means any scripts using the code might break, results can change, and plug-ins gain and lose parameters. Tools marked with ''WIP'' (work in progress), are more likely to undergo large changes. <br />
<br />
Below is the documentation for the plug-ins included in BoneJ experimental.<br />
<br />
== Installation ==<br />
[[File:Install-bonej.png|400 px|Installation steps]]<br />
# [http://imagej.net/Downloads Download] the latest version of Fiji for your operating system<br />
# Launch Fiji<br />
# Select in the menu ''Help'' &gt; ''Update...''<br />
# Click ''Manage update sites''<br />
# Check ''BoneJ experimental''<br />
# Click ''Close''<br />
# Click ''Apply changes''<br />
After the downloads have finished, close and restart Fiji.<br />
<br />
== Analyse skeleton ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyse skeleton''.<br />
<br />
This plug-in simply includes [[AnalyzeSkeleton]] in BoneJ. It adds some additional validation to check that your image suits the tool. It also skeletonizes your image by calling [[Skeletonize3D]] if needed.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[AnalyzeSkeleton]].<br />
<br />
== Anisotropy ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Anisotropy''.<br />
<br />
Anisotropy is used to quantify the directionality of trabecular bone. It tells whether the trabeculae have a certain orientation, or if they're randomly aligned. The method to measure anisotropy is fairly complex and consists of multiple steps:<br />
<br />
# Find mean intercept length (MIL) vectors from <math>n</math> directions<br />
# Plot MIL vectors into a point cloud<br />
# Solve the equation of an ellipsoid that best fits the point cloud<br />
# Calculate the degree of anisotropy from the radii of the ellipsoid<br />
<br />
It's important to note that algorithm is stochastic and does not guarantee exact results. Thus it's recommended to run it several times to establish the degree of anisotropy in your image.<br />
<br />
[[File:PhaseChanges.png|left|150 px|The red dots mark phase changes]]<br />
<br />
In the first step the algorithm draws parallel lines over the input image in direction <math>\mathbf{v}</math>. The direction is chosen randomly. Each line segment in the image stack is sampled to find points where it changes from background to foreground, i.e. where the line enters an object. The points are called ''phase changes'', in the adjacent figure they're marked with red dots. After the sampling is complete, the algorithm forms a ''MIL vector'', whose length is the total length of the line segments divided by the total number of phase changes found. The MIL vector has the same direction as <math>\mathbf{v}</math>. Drawing and sampling the lines is repeated for <math>n</math> directions, and the method creates <math>n</math> MIL vectors.<br />
<br />
After the MIL vectors have been calculated, they are added to a point cloud (a collection of points) around the origin. Then the method tries solve the equation of an ellipsoid that would fit the cloud. There may be no solution, especially if there are few points. That is, the fitting may fail at which point the plug-in stops. The radii of this ellipsoid determine the degree of anisotropy (see [http://imagej.net/index.php?title=BoneJ_experimental&action=submit#Results results]).<br />
<br />
[[File:MilCube.png|right|200 px|Projecting lines from a plane]]<br />
<br />
In more detail, the lines in the first step are projected from a <math>d * d</math> plane with normal <math>\mathbf{v}</math> (see the adjacent figure). The size <math>d = \sqrt{w^{2} + h^{2} + d^{2}}</math>, where <math>w, h, d</math> are the dimensions of the image stack. Each of the lines originates from a random point <math>\mathbf{o}</math> on the plane. The plane is divided into <math>m * m</math> same-sized sections, where <math>m</math> is a number selected by the user (i.e. ''Lines per dimension''). One origin <math>\mathbf{o}</math> is randomly selected from within each section. The lines are projected until they intercept the stack edges at points <math>\mathbf{o} + t_{min}\mathbf{v}</math>,<math>\mathbf{o} + t_{max}\mathbf{v}</math> (the algorithm solves for <math>t_{min}</math>, <math>t_{max}</math>). These line segments within the stack are then sampled for phase changes. In this drawing method some lines may miss the image stack completely, but conversely there aren't any areas in the stack that don't have an equal chance of being sampled.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
The plug-in is intended to analyse the "texture" of an object thus it suits samples of a larger whole, e.g. a trabecular cube that fills the whole stack. The results for whole objects such as the pre-packaged ''Bat Cochlea Volume'' ImageJ sample image are not really meaningful.<br />
<br />
==== Parameters ====<br />
* '''Directions''': number of times sampling is performed from different directions. The minimum is <math>9</math>, because that's how many independent variables the algorithm needs to solve the "shape" of the orientation in the image.<br />
* '''Lines per dimension''': controls how many parallel lines are drawn per each direction. For example, if ''lines per dimension'' is <math>2</math> then ''Anisotropy'' draws <math>4</math> lines. In this case, the origin points of the lines are randomly selected from within the <math>4</math> equal sections of the sampling plane (see above detailed explanation). The number is squared, because the location of the origins can vary in two dimensions.<br />
<br />
then the plane is divided into <math>4</math> equal sections, and a line is drawn from each. The origin point of each line is randomly located within their section.<br />
* '''Sampling increment''': controls how often each line is sampled. The default is <math>1.0</math>, which means that after each step a unit vector (a <math>1\_px</math> long line) is added to the position along a sampling line. The number of samples taken per line depends on the length of the line segment within the image stack.<br />
* '''Recommended minimum''': if checked, then the above three parameters are set to the recommended minimum values. In our tests we found that with these values the results are quite stable, and fitting unlikely to fail. However, these minimums are not guaranteed to be the best settings for your image.<br />
* '''Show radii''': if checked, then the radii of the fitted ellipsoid are shown in the results table.<br />
<br />
==== Results ====<br />
* '''Degree of anisotropy''': how much orientation there is in the structure. <math>0.0</math> means the image is completely isotropic, the sample has no directionality whatsoever. <math>1.0</math> means there is very strong orientation in the structure of the image. Note that these are theoretical minimum and maximum values. Due the stochastic nature of the algorithm, even an empty stack will have non-zero degree of anisotropy.<br />
* '''Radii of fitted ellipsoid''' (optional): the lengths of the radii <math>a \leq b \leq c</math> of the ellipsoid fitted on the MIL points. Degree of anisotropy <math>= 1.0 - a/c</math>.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* The results of this Anisotropy do not stabilize, so it's not repeated automatically like in BoneJ1. However, the results vary less between runs.<br />
* MIL vectors are drawn differently. In BoneJ1 they're drawn in sphere-shapes around random seed points. Here parallel lines from different directions are drawn through the whole stack. We think this method produces more uniform sampling, i.e. there's less chance of a directional bias.<br />
<br />
==== Related publications ====<br />
* Odgaard A (1997), ''Three-dimensional methods for quantification of cancellous bone architecture'', Bone, 20, 315-328, [http://dx.doi.org/10.1016/S8756-3282(97)00007-0 doi:10.1016/S8756-3282(97)00007-0]<br />
* Harrigan TP, Mann RW (1984), ''Characterization of microstructural anisotropy in orthotropic materials using a second rank tensor'', J Mater Sci, 19, 761-767, [http://dx.doi.org/10.1007/BF00540446 doi:10.1007/BF00540446]<br />
<br />
== Area/Volume fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Area/Volume fraction''<br />
<br />
''Area/Volume fraction'' calculates the fraction of bone in an image by it to the whole image. It counts all the foreground voxels, which it assumes represent bone, and compares them to the total number of voxels in the image. More formally defined, the plug-in calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''. In case of a 2D image, it calculates the fraction ''BA/TA'', which is the area of bone per unit area of the sample.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the bone voxels.<br />
* '''Total volume''': volume of the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 2D/3D subspace in the image, i.e. for each channel and time frame. Results will be for ''area'' if image is 2D.<br />
<br />
==== Differences to BoneJ1 ====<br />
* In BoneJ1 the plug-in was called ''Volume fraction''<br />
* Can process 2D images<br />
* Supports hyperstacks <br />
<br />
== Calibrate SCANCO (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyze &gt; Calibrate SCANCO''<br />
<br />
Applies the ''mg HA/ccm'' pixel value calibration, i.e. ''HU'' or Hounfield unit calibration stored in the .isq format metadata to the image.<br />
<br />
==== Suitable images ====<br />
An .isq format image generated by Scanco X-ray microtomography scanners.<br />
<br />
== Check voxel depth (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Check Voxel Depth''<br />
<br />
Checks whether slice spacing has been calibrated correctly. Some DICOM images contain slice thickness data in the header information, but thickness is not necessarily the same as the physical distance between consecutive slices' positions.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Connectivity ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Connectivity''.<br />
<br />
The Connectivity plug-in is designed to estimate the number of connected structures i.e. trabeculae in a trabecular network. This ''connectivity'' measure is related to a topological number <math>\chi</math> known as ''Euler characteristic'', ''Euler number'' or ''Euler-Poincaré characteristic''. Mathematically defined connectivity is <math>= 1 - (\chi + \Delta\chi)</math>. Roughly speaking, <math>\chi</math> describes the shape or structure of a topological space. It can also be expressed as <math>\chi = objects - handles + cavities</math>, where a handle is a hole that goes through an object (e.g the hole in a doughnut, or the ear of a coffee mug), and a cavity is enclosed inside one. When measuring trabecular cubes, you need to add <math>\Delta\chi</math> to <math>\chi</math> to get a more accurate estimate of the connectivity of the whole network. The term <math>\Delta\chi</math> corrects for the change in the topology of an object, when it's cut to pieces. <br />
<br />
NB some other Euler characteristic implementations report <math>\chi + \Delta\chi</math> as <math>\chi</math>, i.e. in them the correction <math>\Delta\chi</math> is implicit.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary. The plug-in assumes that there is only one particle in the foreground; to achieve this, run ''Purify''. Having more than one object often leads to negative connectivity.<br />
<br />
==== Results ====<br />
* '''Euler characteristic (χ)''': describes the shape of the object(s) in the image, <math>\chi = objects - handles + cavities</math>.<br />
* '''Corrected Euler (χ + Δχ)''': the Euler characteristic of the part corrected for edge effects to fit the whole.<br />
* '''Connectivity''': gives an estimate of the number of connected trabeculae in the image. Equal to <math>1 - (\chi + \Delta\chi)</math>.<br />
* '''Conn. density''': connectivity divided by unit volume. <br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* The old version reported ''Corrected Euler (χ + Δχ)'' incorrectly as ''Δχ''<br />
<br />
==== Related publications ====<br />
* Odgaard A, Gundersen HJG (1993), ''Quantification of connectivity in cancellous bone, with special emphasis on 3-D reconstructions'', Bone 14: 173-182, [http://dx.doi.org/10.1016/8756-3282(93)90245-6 doi:10.1016/8756-3282(93)90245-6.]<br />
* Toriwaki J, Yonekura T (2002), ''Euler number and connectivity indexes of a three dimensional digital picture'', [http://www.scipress.org/journals/forma/abstract/1703/17030183.html Forma 17: 183-209]<br />
<br />
== Delete slice range (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Delete slice range''<br />
<br />
Removes a range of slices from a stack, so that cropping in the Z direction is practical.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Ellipsoid factor (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Ellipsoid factor''.<br />
<br />
Ellipsoid Factor is a new method for measuring rod/plate geometry. It uses the axis lengths from prolate, oblate and intermediate elipsoids to determine how prolate or oblate the trabecular space is at a particular point. Highly prolate (javelin-shaped, rod-like) ellipsoids have a single long axis (<math>c</math>) and two short axes (<math>a, b</math>) such that <math>a < b \ll c</math> , whereas highly oblate (discus-shaped, plate-like) ellipsoids have two longer axes (<math>b, c</math>) and one much shorter axis (<math>a</math>) so that <math>a \ll b < c</math>. Calculating <math>EF</math> as the difference in ratios, <math>EF = a/b - b/c</math> leads to a useful scale ranging from <math>-1</math> (oblate, <math>a/b \approx 0, b/c \approx 1</math>) to <math>+1</math> (prolate, <math>a/b \approx 1, b/c \approx 0</math>). <math>EF</math> of <math>0</math> indicates an intermediate ellipsoid where <math>a/b = b/c</math>, which is the case for spheres (<math>a = b = c</math>) and other ellipsoids with axis ratios <math>a:qa:q^{2}a</math>. Ellipsoid Factor runs [[Skeletonize3D]] to get the medial axis of the trabeculae, which is used as the seed for sampling. Ellipsoids are seeded from each voxel on the medial axis. A combination of dilation, contraction, rotation and a small amount of translation is run iteratively until the ellipsoid increases no further in volume.<br />
<br />
The EF at a point in the structure is determined as the EF of the most voluminous ellipsoid which contains that point.<br />
<br />
If you use Ellipsoid Factor in your work, please cite:<br />
Doube M (2015), ''The Ellipsoid Factor for quantification of rods, plates and intermediate forms in 3D geometries'', Frontiers in Endocrinology, 6:15, [http://journal.frontiersin.org/Journal/10.3389/fendo.2015.00015/abstract doi: 10.3389/fendo.2015.00015]<br />
<br />
==== Suitable images ====<br />
A binary 3D image.<br />
<br />
==== Parameters ====<br />
* '''Sampling increment''': distance between sample points on each vector; should be less than the pixel spacing.<br />
* '''Vectors''': number of vectors to sample at each seed point.<br />
* '''Skeleton points per ellipsoid''': allows dense or sparse sampling, a value of <math>1</math> means that an ellipsoid is sampled at every seed point.<br />
* '''Contact sensitivity''': how many vectors must touch the background before dilation stops.<br />
* '''Maximum iterations''': how hard to try to find larger ellipsoids - fitting will stop if no improvement has been made after this number of iterations..<br />
* '''Maximum drift''': how far the centroid may be displaced from its seed point.<br />
* '''EF image''': stack containing EF values for each point contained by at least one ellipsoid and NaN elsewhere.<br />
* '''Ellipsoid ID image''': stack containing the ID of the biggest ellipsoid at each point, ranked in descending order (<math>0</math> is the largest ellipsoid).<br />
* '''Volume image''': image showing the volume of the largest ellipsoid containing that point.<br />
* '''Axis ratio images''': images showing <math>a/b</math> and <math>b/c</math> ratios foreach point containing at least one ellipsoid and NaN elsewhere.<br />
* '''Flinn peak plot''': plot of <math>a/b</math> vs <math>b/c</math> weighted by volume, so bright pixels indicate relatively more of the structure has that axis ratio.<br />
* '''Gaussian sigma:''' amount to blur the Flinn peak plot - set to <math>0</math> for a precise but less 'beautiful' result.<br />
* '''Flinn plot''': unweighted Flinn plot - every ellipsoid is represented by the same sized point regardless of ellipsoid size.<br />
<br />
==== Results ====<br />
* '''EF image''': stack containing EF values. NaN (not a number) values are used in the background. Summary statistics can be obtained by running Analyze > Histogram<br />
* '''Short-Mid image''': stack containing the <math>a/b</math> ratios<br />
* '''Mid-Long image''': stack contining the <math>b/c</math> ratios<br />
* '''Volume image''': stack containing ellipsoid volumes<br />
* '''Max id image''': stack containing the ID of the largest ellipsoid at each point; IDs relate to the sort order based on volume, so ID = 0 is the largest ellipsoid. <math>-1</math> is foreground and background is labelled with a large negative number.<br />
* '''Flinn diagram''': plot of <math>a/b</math> versus <math>b/c</math> values present in the volume<br />
* '''Weighted Flinn plot''': Flinn diagram with peaks of intensity proportional to volume occupied by each (<math>a/b</math>, <math>b/c</math>) ratio<br />
<br />
==== Related publications ====<br />
Salmon PL, Ohlsson C, Shefelbine SJ, Doube M (2015), ''Structure model index does not measure rods and plates in trabecular bone'', Frontiers in Endocrinology, 6:162, [http://dx.doi.org/10.3389/fendo.2015.00162 doi:10.3389/fendo.2015.00162].<br />
<br />
== Fit ellipsoid ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit ellipsoid''.<br />
<br />
Finds the ellipsoid that best fits a set of point or multi-point ROIs in the ROI Manager. ''Fit ellipsoid'' may fail to fit an ellipsoid. The more points you add, the more likely it is to succeed. Points are scaled to the spatial calibration (voxel widht, height &amp; depth) of the input image.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': ROIs with at least nine points in the ROI Manager.<br />
<br />
==== Results ====<br />
* '''Radii''': the radii ''a'', ''b'' and ''c'' of the fitted ellipsoid. Radius ''a'' is the shortest and ''c'' the longest.<br />
* '''Centroid''': ''x'', ''y'' and ''z'' coordinates of the ellipsoid centre point.<br />
<br />
==== Differences from BoneJ1 ====<br />
* Supports multi-point ROIs.<br />
* Plug-in cancels if an ellipsoid can't be found, instead of reporting invalid results.<br />
<br />
== Fit sphere (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit sphere''.<br />
<br />
Finds the sphere that best fits a set of point ROIs, and optionally displays the image data bounded by the sphere in a new image window. Place a set of point ROIs on structures of interest, hitting [T] to add each point to the ROI Manager. Fit Sphere takes the coordinates of the points from the ROI Manager and applies a least-squares optimisation.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': populated with at least 5 point ROI's<br />
* '''Copy Sphere''': Create a new stack containing image data from within the best-fit sphere.<br />
* '''Padding''': Number of black pixels to put between the sphere and the sides of the image<br />
* '''Inner Cube''': Create a new stack containing image data from the cube that just fits inside the best-fit sphere.<br />
* '''Outer Cube''': Create a new stack containing image data from the cube that the best-fit sphere just fits inside.<br />
* '''Crop Factor''': Radius used for generating new images is multiplied by crop factor so that a bigger or smaller volume can be produced.<br />
* '''Add to ROI Manager''': Add the sphere to the ROI Manager as a set of circular ROIs<br />
* '''Clear ROI Manager''': Clear any existing ROIs in the Manager prior to adding circles<br />
<br />
==== Results ====<br />
* '''X Centroid''': x-coordinate of sphere's centroid<br />
* '''Y Centroid''': y-coordinate of sphere's centroid<br />
* '''Z Centroid''': z-coordinate of sphere's centroid<br />
* '''Radius''': length of radius<br />
* '''Images (optional)''': images containing a copy of the original data within the sphere, or within cubes bounding or bounded by the sphere.<br />
<br />
== Fractal dimension ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fractal dimension''.<br />
<br />
This plug-in estimates the fractal dimension of an image by applying the box-counting algorithm. In this algorithm grids of diminishing size are scanned over the image, and the number of boxes containing at least one foreground voxel is counted. As the box size decreases and the grid becomes finer, the proportion of foreground boxes increases in a fractal structure. See [https://en.wikipedia.org/wiki/Box_counting Wikipedia] for further details. BoneJ uses a fixed-grid scan, with an option to try to find the optimal covering.<br />
<br />
The box counting algorithm produces a pair of <math>(log(n), -log(m))</math> values for each iteration it runs. Here n = number of boxes with foreground, and m = box size. These pairs are passed to a curve-fitting algorithm, which returns the slope of the linear function which describes them ([https://en.wikipedia.org/wiki/Linear_regression regression fit]). The coefficient of this slope is the fractal dimension.<br />
<br />
Fractal dimension is markedly influenced by the parameters selected for the box counting algorithm, so it's worth running it several times with different values to find an accurate measure for your image.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* ''Starting box size (px)'': the size (sides) in pixels of a box in the sampling grid in the first iteration of the algorithm.<br />
* ''Smallest box size (px)'': the minimum size in pixels of a box in the grid. When box size becomes smaller than this limit, the algorithm iterates one more time, and then stops.<br />
* ''Box scaling factor'': the term used to divide the box size after iteration. For example, a scaling factor of <math>2.0</math> halves the size at each step.<br />
* ''Grid translations'': how many times at each iteration the grid is moved to try to the find the optimal covering. The optimal covering covers the objects in the image with the least amount of boxes. The larger the parameter the more likely it is that optimal covering is found. However, this slows down the plug-in considerably.<br />
* ''Automatic parameters'': if checked, then the plug-in runs with default parameters.<br />
* ''Show points'': if checked, then the plug-in displays the <math>(log(n), -log(m))</math> values it calculated. <br />
<br />
==== Results ====<br />
* ''Fractal dimension'': the [https://en.wikipedia.org/wiki/Fractal_dimension fractal dimension] of the image. For example, the Koch snow flake has a fractal dimension of 1.262.<br />
* ''R²'': the [https://en.wikipedia.org/wiki/Coefficient_of_determination coefficient of determination] of the line fitted to the <math>(log(n), -log(m))</math> points.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* Algorithm parameters can be changed by the user.<br />
<br />
==== Related publications ====<br />
Fazzalari NL, Parkinson IH (1996), ''Fractal dimension and architecture of trabecular bone'', J Pathol, 178: 100-5, [http://dx.doi.org/10.1002/(SICI)1096-9896(199601)178:1%3C100::AID-PATH429%3E3.0.CO;2-K doi:10.1002/(SICI)1096-9896(199601)178:1<100::AID-PATH429>3.0.CO;2-K].<br />
<br />
== Inter-trabecular angles ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Inter-trabecular Angles''.<br />
<br />
The plug-in was designed to analyse the angles between trabeculae of cancellous bone. First it calls [[Skeletonize3D]] to thin the input image (if necessary). Then it calls [[AnalyzeSkeleton]], which creates a graph of the largest skeleton (by number of nodes) in the thinned image. The graph consists of nodes and the edges that connect them. Nodes are also known as vertices, and edges as branches. Roughly speaking the edges correspond to trabeculae and the nodes to the junction points, where trabeuculae meet.<br />
<br />
The graph is often not a perfect representation of the trabecular network in the input image. ''Inter-trabecular angles'' offers many options to adjust the graph's topology and filter out artefacts that may obfuscate or skew the results. First it allows you to filter out nodes with too many or too few edges. Secondly it can be used to prune very short edges, which often do not represent actual trabeculae. <br />
<br />
[[File:Ita_types.png|left|150 px|Types of edges in pruning]]<br />
Pruning works differently for different types of edges. There are four kinds: outer, dead-end, inner and short. An outer edge doesn't interconnect different parts of a graph. In other words, one (and only one) of its endpoints connects to only one branch, i.e. the edge itself. In the figure the outer edge is colored black. A dead-end (blue) is an outer edge whose length is less than the minimum set by the user, i.e. it's a short, outer edge. An inner edge (green) connects to end points with more than one branch. A short edge is an inner edge, whose length is less than the set minimum. When a dead-end is pruned, it with its "lonely" end-point are removed from the graph. When a short edge is pruned, it and it's endpoints are removed, and a new node is placed at the midpoint of the former. This new node connects to all the branches the previous nodes connected to.<br />
<br />
''Inter-trabecular angles'' offers two further options to control pruning: ''iteration'' and ''clustering''. Iteration repeats pruning until no new short edges are found. Sometimes pruning can create new short edges, and thus the graph may still have them after one iteration. However, iteration can alter the structure of the graph too dramatically. Clustering searches for all nodes connected by short edges, before removing any. In the figure, clustering pruning would remove the four nodes and the red edges between them in one go. It would create a new node at the center of the previous four, and connect it to the blue and green edges. When pruning is not clustering, it removes edges one-by-one. This changes the end result depending on the order the edges are traversed. Clustering creates the same result each time. <br />
<br />
Pruning also removes loops and redundant parallel edges. The former connects to the same node on both ends, and the latter connects two nodes that are already connected by another edge. <br />
<br />
The pruning and filtering features were added so that we can replicate and continue from the research of [https://doi.org/10.1016/j.actbio.2016.08.040 Reznikov et al.]<br />
<br />
==== Suitable images ====<br />
An 8-bit, binary 2D or 3D image. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
*'''Minimum valence''': minimum number of branches for a node to be included in the analysis.<br />
*'''Maximum valence''': maximum number of branches for a node to be included in the analysis.<br />
*'''Minimum trabecular length (px)''': minimum length for a branch to be preserved in the pruning. Length is calculated as the distance between the endpoints of a branch.<br />
** This length is also displayed in the units of the image calibration<br />
*'''Margin (px)''': minimum distance of a node from image stack edges to be included in the analysis. Having nodes too close to the edges can make the results less accurate, because you get more branches that do not terminate to a node at the other end.<br />
*'''Iterate pruning''': repeat pruning until no more new short branches are discovered. When true, the topology of the graph is likely to change more in the pruning.<br />
*'''Use clusters''': if true then the pruning result is independent of the order in which the graph is traversed. False corresponds with methodology in Reznikov's article. See above for more details.<br />
*'''Print centroids''': Print the centroids (center coordinates) of the node pairs at the ends of each edge.<br />
*'''Print % culled edges''': Print statistics of different types of edges pruned.<br />
<br />
==== Results ====<br />
*'''Inter-trabecular angles''': angles between each branch of each node included in the analysis. Sorted into columns according to the number of branches per node. For example, column ''"3"'' shows the angles between branches of nodes with three branches.<br />
*'''Centroids''' (optional): A table of the center coordinates of the node pairs at the ends of each edge.<br />
*'''Culled edge percentages''' (optional): A table showing the percentages of different kinds of edges pruned, compared to the total number of edges in the analysed graph.<br />
*'''Skeleton''' (optional): if the plug-in had to skeletonise the input image, it displays the result of the thinning.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Inter-trabecular angles generalizes the idea of ''Triple point angles'' for any types of points. It also provides more tools for adjusting the graph for analysis.<br />
<br />
==== Related publications ====<br />
Reznikov, N et al. (2016), ''Inter-trabecular angle: A parameter of trabecular bone architecture in the human proximal femur that reveals underlying topological motifs'', Acta Biomaterialia, 44: 65--72, [https://doi.org/10.1016/j.actbio.2016.08.040 doi:j.actbio.2016.08.040].<br />
<br />
== Local thickness ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Thickness''.<br />
<br />
This plug-in includes [[Local_Thickness]] in BoneJ, and provides some additional options &amp; results. Local thickness measures ''the diameter of the largest sphere that fits inside the object and contains the point'' for each point i.e. foreground voxel in an image. The plug-in calculates mean and standard deviation of the trabecular thickness (Tb.Th) or trabecular spacing (Tb.Sp) directly from pixel values in the resulting thickness map. Foreground voxels are considered trabeculae, and background voxels are the spacing. Processing time is heavily dependent on feature size (in pixels); large features can take a very long time to process.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
* '''Calculate''': chooses which thickness maps to calculate - trabecular thickness, trabecular spacing, or both. In order to calculate trabecular spacing, the image voxels are inverted.<br />
* '''Show thickness maps''': display the calculated thickness maps or not.<br />
* '''Mask thickness maps''': remove artifacts from the thickness maps. Artifacts are foreground voxels not present in the original image.<br />
* '''Crop to ROI manager''': create thickness maps only from the area bounded by the ROIs in the ROI manager. Checking this option requires you've added ROIs to the ROI manager.<br />
<br />
==== Results ====<br />
* The mean and standard deviation for each thickness map calculated.<br />
* Displays thickness map images if ''Show thickness maps'' was selected. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Calls the latest version of [[Local_Thickness]].<br />
* Thickness values for background voxels are marked ''NaN'' instead of ''0''.<br />
<br />
==== Related publications ====<br />
* Dougherty R, Kunzelmann K (2007), ''Computing local thickness of 3D structures with ImageJ'', Microsc. Microanal., 13: 1678-1679, [http://dx.doi.org/10.1017/S1431927607074430 doi:10.1017/S1431927607074430]<br />
* Hildebrand T, Rüegsegger P (1997), ''A new method for the model-independent assessment of thickness in three-dimensional images'', J. Microsc., 185: 67-75, [http://dx.doi.org/10.1046/j.1365-2818.1997.1340694.x doi:10.1046/j.1365-2818.1997.1340694.x]<br />
<br />
== Moments of inertia (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Moments of Inertia''<br />
<br />
Calculates the three orthogonal principal axes and moments of inertia around those axes. It includes pixels with values between upper and lower limits, which can be defined in terms of unitless grey values or Hounsfield units (HU). It optionally creates a new stack with the image centred and rotated so that the principal axes are parallel to the image stack's x, y and z axes. Calculations are limited to a rectangular ROI if one is drawn. The plugin will guess whether the image is HU calibrated, and if so, apply HU limits of bone (0-4000 HU), otherwise it will calculate auto-thresholds based on the stack's histogram. If a calibration curve is known, the coefficients can be added to get weighted calculations. Aligning a bone with Moments of Inertia may be a useful step prior to Slice Geometry if bones are not aligned with the image z axis.<br />
<br />
==== Suitable images ====<br />
An 8-bit or 16-bit image.<br />
<br />
==== Parameters ====<br />
* '''Start slice''': First slice to include in calculations<br />
* '''End slice''': Last slice to include in calculations<br />
* '''HU Calibrated''': Plugin will guess whether the image is HU calibrated. If image is HU calibrated, make sure the box is checked and enter HU calibrated numeric values in the following fields<br />
* '''Bone Min''': Lower threshold, in either uncalibrated greys or HU<br />
* '''Bone Max''': Upper threshold, in either uncalibrated greys or HU<br />
* '''Slope''': m where physical density = m × pixel value + c<br />
* '''Y Intercept''': c where physical density = m × pixel value + c<br />
* '''Align result''': Draw a new stack with the principal axes parallel to the image axes<br />
* '''Show axes (2D)''': Draw the axes in white on the aligned image<br />
* '''Show axes (3D)''': Display the stack and its principal axes in a 3D Viewer window<br />
<br />
==== Results ====<br />
* '''Image (optional)''': a copy of the input image centered and aligned with the principal axes<br />
* '''Xc''': Centroid x-coordinate (mass-weighted by calibrated density)<br />
* '''Yc''': Centroid y-coordinate<br />
* '''Zc''': Centroid z-coordinate<br />
* '''Vol''': Total volume of thresholded voxels<br />
* '''Mass''': Mass of bone, from pixel values and density calibration coefficients<br />
* '''Icxx''': Moment around x axis passing through centroid<br />
* '''Icyy''': Moment around y axis passing through centroid<br />
* '''Iczz''': Moment around z axis passing through centroid<br />
* '''Icxy''': Off-axis term for constructing inertia tensor<br />
* '''Icxz''': Off-axis term for constructing inertia tensor<br />
* '''Icyz''': Off-axis term for constructing inertia tensor<br />
* '''I1''': Moment around the shortest principal axis<br />
* '''I2''': Moment around the middle principal axis<br />
* '''I3''': Moment around the longest principal axis<br />
* '''Verbose output in Log window'''<br />
** '''Eigenvalues''': Result of of eigenvalue decomposition. Moments of inertia<br />
** '''Eigenvectors of principal axes''': orientation of input image<br />
** '''Inverse eigenvector matrix''': used to map voxel positions in the aligned image back to voxel positions in the original image<br />
* Optional 3D display of principal axes<br />
<br />
== Optimise threshold (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Optimise Threshold''<br />
<br />
Several histogram-based methods exist for automatic determination of threshold for binary segmentation, but in ImageJ these are currently limited to pixel values in a single slice. The result can be excluding high values in a stack that are higher than the highest value in the current slice. This plugin uses all the pixels in a stack to construct a histogram and uses ImageJ's built-in isodata algorithm to determine the threshold. It optionally tests values either side of the initial auto-threshold for connectivity, because connectivity is very sensitive to image noise. The plugin attempts to find the threshold that results in minimal connectivity. Purification, erosion and dilation can improve the connectivity estimate, so Purify is always called, and erosion and dilation are applied as part of a sequence: purify, erode, purify, dilate.<br />
<br />
==== Suitable images ====<br />
An 8-bit of 16-bit image<br />
<br />
==== Parameters ====<br />
* '''Threshold Only''': Determine the threshold from the stack histogram only<br />
* '''Apply Threshold''': Replace the input image with a thresholded version<br />
* '''Show Plot''': Display a graph showing connectivity versus threshold<br />
* '''Tests''': Number of different thresholds to test for connectivity<br />
* '''Range''': Proportion of the initial threshold to test above and below initial thresholds<br />
* '''Subvolume Size''': Size of the volume to test for connectivity. Set small for a faster run and large to test the whole stack<br />
* '''Erosion Cycles''': Number of times to erode the stack after initial purification<br />
* '''Dilation Cycles''': Number of times to dilate the stack after secondary purification<br />
<br />
==== Results ====<br />
* '''Thresholded stack (optional)'''<br />
* '''Plot of connectivity versus threshold (optional)'''<br />
* '''Log of optimal threshold value'''<br />
<br />
== Orientation (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Orientation''<br />
<br />
Sets the direction in a 2D image, without rotating the image or changing it in any way. ''Slice Geometry'' (see below) uses ''Orientation'' to calculate diameter, second moments of area and section moduli around anatomic axes set by the user.<br />
<br />
==== Suitable images ====<br />
A 2D image.<br />
<br />
==== Parameters ====<br />
* '''Orientation''': input field displays current orientation (clockwise from 12 o'clock) and takes keyboard input<br />
* '''deg / rad''': display and set orientation in degrees or radians<br />
* '''Principal direction''': the main direction, the head of which is displayed in red<br />
* '''Secondary direction''': the orthogonal direction<br />
* '''Reflect''': swap the labels on this axis<br />
<br />
==== Results ====<br />
* '''Orientation axes''': draws the axes of the orientation on the image.<br />
<br />
== Purify (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Purify''<br />
<br />
Purify locates all particles in 3D and removes all but the largest foreground and background particles.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary.<br />
<br />
==== Parameters ====<br />
* '''Labelling algorithm''':<br />
** '''Mapped''': Non-recursive, memory efficient and fast.<br />
** '''Multithreaded''': use multiple cores and job chunking to reduce recursion. Fast on small stacks and if you have many CPU cores.<br />
** '''Linear''': Non-recursive but heavy on RAM and single-threaded. Fast on big stacks, but only if you have the memory.<br />
* '''Chunk Size''': number of slices to use in each particle labelling thread. If images are large, set this to 2<br />
* '''Performance Log''': Show verbose performance information to help tune your system<br />
* '''Make copy''': If checked, shows the result in a new window; if unchecked the result replaces the original image.<br />
<br />
==== Results ====<br />
* '''Performance metrics (optional)'''<br />
** '''Threads''': Number of CPU cores used<br />
** '''Slices''': Number of slices in the input image stack<br />
** '''Chunks''': Number of chunks of slices, each chunk is processed independently<br />
** '''Chunk size''': Number of slices per chunk<br />
** '''Last chunk size''': size of the last chunk (the remainder chunk)<br />
** '''Duration''': time in seconds to complete purification<br />
* '''Purified image''': optionally in a new image window.<br />
<br />
== Skeletonise ==<br />
Menu path ''Plugins &gt; BoneJ &gt;Skeletonise''.<br />
<br />
This plug-in simply includes [[Skeletonize3D]] in BoneJ. It adds some additional validation to check that your image suits the tool.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[Skeletonize3D]].<br />
<br />
== Slice geometry (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Slice Geometry''<br />
<br />
Slice Geometry calculates cross-sectional geometric properties of shapes: cross-sectional area, centroid, mean density, second moment of area, section modulus, Feret diameter and local thickness (2D and 3D). Measurements can be limited to a rectangular ROI. If your bone is not well aligned with the image axes, you may find it useful to align the bone to its principal axes using Moments of Inertia or by exporting a transformed volume from the ImageJ 3D Viewer. Importantly, no assumption of geometry is made for any of the measurements.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Bone''': Slice Geometry will guess from your image title the bone it is working on. If it is wrong, correct it. If your bone of interest isn't listed, email me.<br />
* '''2D Thickness''': Run Thickness on a per-slice basis; this fits circles rather than spheres<br />
* '''3D Thickness''': Run Thickness on the whole stack, fitting spheres, then report results per slice<br />
* '''Draw Axes''': Draw axes on an annotated copy of the stack<br />
* '''Draw Centroids''': Draw centroids on an annotated copy of the stack<br />
* '''Annotated Copy (2D)''': Create a new stack showing the centroids and principal axes<br />
* '''3D Annotation''': Display the stack, principal axes and centroids in the 3D viewer<br />
* '''Process Stack''': Calculate parameters for all slices in the stack<br />
* '''Clear Results''': Remove all data in the results table without saving, prior to calculating parameters<br />
* '''Use Orientation''': Also calculate parameters based on directions defined in Orientation<br />
* '''HU Calibrated''': Allows you to enter your thresholds in Hounsfield units (HU) or uncalibrated units<br />
* '''Bone Min''': minimum pixel value to use in calculations<br />
* '''Bone Max''': maximum pixel value to use in calculations<br />
* '''Slope''': <math>m</math> where physical density <math>= m * pixel value + c</math><br />
* '''Y Intercept''': <math>c</math> where physical density <math>= m * pixel value + c</math><br />
* '''Note''': density-weighted calculations are only applied to centroid determination at present<br />
* '''Partial volume compensation''': Use model that assumes Gaussian blur of imaging modality and linear transform between pixel value and sample 'density' to correct for blurred and pixelated images (e.g. small bone in clinical CT)<br />
* '''Background''': pixel value that corresponds to zero bone density (could be the 'fat', 'air' or 'muscle' pixel value)<br />
* '''Foreground''': pixel value that corresponds to 100% bone density<br />
* '''A rectangular ROI (optional)''': if there's a ROI, calculations are limited to its area.<br />
<br />
==== Results ====<br />
* '''Images (optional)''': displays the result images selected in the parameters<br />
* '''Bone code''': Unique numeric identifier for the anatomic name of each bone. Further bone codes can be added to BoneJ on request<br />
* '''Slice''': slice number indicating which slice contributed image data for this row of the results<br />
* '''CSA''': cross-sectional area<br />
* '''X cent.''': Centroid x-coordinate<br />
* '''Y cent.''': Centroid y-coordinate<br />
* '''Density''': mean physical density, calculated from pixel values and calibration coefficients<br />
* '''wX cent''': Density-weighted x-coordinate of centroid<br />
* '''wY cent''': Density-weighted y-coordinate of centroid<br />
* '''Theta''': angle of minor axis (axis for Imin, the long axis of your specimen's cross section) from the horizontal, ranging from <math>-\pi/2</math> to <math>\pi/2</math>, with positive as clockwise<br />
* '''R1''': maximum chord length from minor axis<br />
* '''R2''': maximum chord length from major axis<br />
* '''Imin''': Second moment of area around major axis<br />
* '''Imax''': Second moment of area around minor axis<br />
* '''Ipm''': Product moment of area (= 0 if no errors are present, e.g. due to pixelation)<br />
* '''Zmax''': Section modulus around major axis (Imax / R2)<br />
* '''Zmin''': Section modulus around minor axis (Imin / R1)<br />
* '''Zpol''': Polar section modulus<br />
* '''Feret Min''': Minimum caliper width<br />
* '''Feret Max''': Maximum caliper width<br />
* '''Feret Angle''': Orientation of maximum caliper width<br />
* '''Perimeter''': Distance around external surface<br />
* '''Max Thick 2D''': Maximum thickness determined by local thickness in 2D<br />
* '''Mean Thick 2D''': Mean thickness determined by local thickness in 2D<br />
* '''SD Thick 2D''': Standard deviation of the mean thickness determined by local thickness in 2D<br />
* '''Max Thick 3D''': Maximum thickness in this slice determined by local thickness in 3D<br />
* '''Mean Thick 3D''': Mean thickness in this slice determined by local thickness in 3D<br />
* '''SD Thick 3D''': Standard deviation of the mean thickness in this slice determined by local thickness in 3D Directional measurements, using Orientation directions, and the specimen's slice centroid<br />
* '''A (rad)''': Principal orientation (direction A)<br />
* '''B (rad)''': Secondary orientation (direction B)<br />
* '''IAa''': Second moment of area around Aa axis<br />
* '''IBb''': Second moment of area around Bb axis<br />
* '''ZAa''': Section modulus around Aa axis<br />
* '''ZBb''': Section modulus around Bb axis<br />
* '''RAa''': maximum chord length from Aa axis<br />
* '''RBb''': maximum chord length from Bb axis<br />
* '''DAa''': Calliper diameter in direction of Aa<br />
* '''DBb''': Calliper diameter in direction of Bb<br />
<br />
== Surface area ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Surface area''<br />
<br />
''Surface area'' creates a mesh from the bone in the image, and then calculates the area of the surface of the mesh. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Export STL file(s)''': if checked, then the meshes created from the image are saved as .stl-files. A dialog opens for you to select a folder for the files.<br />
<br />
==== Results ====<br />
* '''Surface area''': the surface area of the bone mesh<br />
* '''STL-file''': the mesh created from the bone image<br />
<br />
The surface area is reported and an .stl-file saved separately for each 3D subspace in the image. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Isosurface''<br />
<br />
== Surface fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Surface fraction''<br />
<br />
''Surface fraction'' calculates the fraction of bone volume in an image by comparing meshes created from bone particles and the whole image. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone. <br />
<br />
More formally defined, ''Surface fraction'' calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary.<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the mesh created from bone voxels.<br />
* '''Total volume''': volume of the mesh created from the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Volume fraction''<br />
<br />
== Results table ==<br />
The BoneJ plug-ins print their results into a shared result table. This is because we often need to calculate several measures for the same image, so it's handy to have them on one row. Repeated measures for the same image are reported on different rows. The results persist even if the table is closed. To clear the table run ''Plugins &gt; BoneJ &gt; Table &gt; Clear BoneJ results''.<br />
<br />
Note that some of the plug-ins (marked with ''WIP'') still use a ImageJ1 style results table that works slightly differently. As they are modernized they'll move to use the same new table as the others.<br />
<br />
== Where is my favourite plug-in? ==<br />
We have removed some plug-ins from BoneJ. ''Neck shaft angle'', ''Plateness'' and ''Structure model index'' have been discontinued. ''Interpolate ROIs'', [http://imagej.net/3D_Binary_Filters ''Dilate 3D'' and ''Erode 3D''] come pre-packaged with ImageJ, so they are no longer included in BoneJ2.<br />
<br />
Support for ''Kontron IMG'', ''Scanco ISQ'' and ''Stratec pQCT'' file formats has been moved to [[SCIFIO]]. Just run ''Edit &gt; Options &gt; ImageJ2'', and check ''Use SCIFIO when opening files''. When the option is enabled, these kinds of files can be opened from ''File > Open'' or dragging &amp; dropping them like any other format. <br />
<br />
''Distribution analysis'' and other pQCT related tools can now be downloaded independently from the [[PQCT]] update site.<br />
<br />
== Licence ==<br />
BoneJ2 is free, open-source software. You can redistribute it and/or modify it under the terms of the [https://github.com/bonej-org/BoneJ2/blob/master/LICENCE.md BSD 2-clause licence]. The software is provided "as is" and any warranties are disclaimed. In no event shall the copyright holder or contributors be liable.<br />
<br />
== Citation ==<br />
If you'd like to cite the software, we will soon publish a paper about BoneJ experimental. You can read the draft (and send us your feedback) as we're writing it [https://v1.overleaf.com/read/yxdkwpcdkjzj for Wellcome Open Research on Overleaf]. We recommend you cite the specific release used in your research.<br />
<br />
== Funding ==<br />
The redesign and porting effort to create BoneJ2 was supported by a [https://wellcome.ac.uk/what-we-do/directories/biomedical-resource-technology-development-grants-people-funded Wellcome Trust Biomedical Resource and Technology Development Grant]. Interaction with [[SciView]] was assisted by a [https://royalsociety.org/grants-schemes-awards/grants/international-exchanges/ Royal Society International Exchange grant].</div>Mdoubehttps://imagej.net/index.php?title=BoneJ2&diff=38570BoneJ22018-10-02T05:55:51Z<p>Mdoube: </p>
<hr />
<div>{{Infobox<br />
| name = BoneJ experimental<br />
| software = ImageJ<br />
| logo = [[File:Bonej-icon.png|96px]]<br />
| author = {{Person|Michaeldoube}}, {{Person|Rdom}}, {{Person|Alessandrofelder}}<br />
| maintainer = {{Person|Michaeldoube}}, {{Person|Alessandrofelder}}<br />
| source = {{GitHub|org=bonej-org|repo=BoneJ2}}, [https://doi.org/10.5281/zenodo.1427262 doi:10.5281/zenodo.1427262]<br />
| released = Dec 11<sup>th</sup>, 2017<br />
| latest version = cuneiform-experimental-patch2, Sep 24<sup>th</sup>, 2018<br />
| status = Active, Experimental<br />
}}<br />
BoneJ is a collection of skeletal biology plug-ins for ImageJ.<br />
This is the new experimental, modernized version of the software available through the ImageJ [http://imagej.net/Updater updater]. Its update site is called [http://sites.imagej.net/BoneJ BoneJ experimental]. For the old ImageJ1 version, see [[BoneJ]].<br />
<br />
This version works with the latest Fiji, and complies with the modern ImageJ [[architecture]]. Most plug-ins also now support hyperstacks, i.e. images with multiple channels or time frames.<br />
<br />
As the code is still experimental, it's still likely to change a lot. This means any scripts using the code might break, results can change, and plug-ins gain and lose parameters. Tools marked with ''WIP'' (work in progress), are more likely to undergo large changes. <br />
<br />
Below is the documentation for the plug-ins included in BoneJ experimental.<br />
<br />
== Installation ==<br />
[[File:Install-bonej.png|400 px|Installation steps]]<br />
# [http://imagej.net/Downloads Download] the latest version of Fiji for your operating system<br />
# Launch Fiji<br />
# Select in the menu ''Help'' &gt; ''Update...''<br />
# Click ''Manage update sites''<br />
# Check ''BoneJ experimental''<br />
# Click ''Close''<br />
# Click ''Apply changes''<br />
After the downloads have finished, close and restart Fiji.<br />
<br />
== Analyse skeleton ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyse skeleton''.<br />
<br />
This plug-in simply includes [[AnalyzeSkeleton]] in BoneJ. It adds some additional validation to check that your image suits the tool. It also skeletonizes your image by calling [[Skeletonize3D]] if needed.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[AnalyzeSkeleton]].<br />
<br />
== Anisotropy ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Anisotropy''.<br />
<br />
Anisotropy is used to quantify the directionality of trabecular bone. It tells whether the trabeculae have a certain orientation, or if they're randomly aligned. The method to measure anisotropy is fairly complex and consists of multiple steps:<br />
<br />
# Find mean intercept length (MIL) vectors from <math>n</math> directions<br />
# Plot MIL vectors into a point cloud<br />
# Solve the equation of an ellipsoid that best fits the point cloud<br />
# Calculate the degree of anisotropy from the radii of the ellipsoid<br />
<br />
It's important to note that algorithm is stochastic and does not guarantee exact results. Thus it's recommended to run it several times to establish the degree of anisotropy in your image.<br />
<br />
[[File:PhaseChanges.png|left|150 px|The red dots mark phase changes]]<br />
<br />
In the first step the algorithm draws parallel lines over the input image in direction <math>\mathbf{v}</math>. The direction is chosen randomly. Each line segment in the image stack is sampled to find points where it changes from background to foreground, i.e. where the line enters an object. The points are called ''phase changes'', in the adjacent figure they're marked with red dots. After the sampling is complete, the algorithm forms a ''MIL vector'', whose length is the total length of the line segments divided by the total number of phase changes found. The MIL vector has the same direction as <math>\mathbf{v}</math>. Drawing and sampling the lines is repeated for <math>n</math> directions, and the method creates <math>n</math> MIL vectors.<br />
<br />
After the MIL vectors have been calculated, they are added to a point cloud (a collection of points) around the origin. Then the method tries solve the equation of an ellipsoid that would fit the cloud. There may be no solution, especially if there are few points. That is, the fitting may fail at which point the plug-in stops. The radii of this ellipsoid determine the degree of anisotropy (see [http://imagej.net/index.php?title=BoneJ_experimental&action=submit#Results results]).<br />
<br />
[[File:MilCube.png|right|200 px|Projecting lines from a plane]]<br />
<br />
In more detail, the lines in the first step are projected from a <math>d * d</math> plane with normal <math>\mathbf{v}</math> (see the adjacent figure). The size <math>d = \sqrt{w^{2} + h^{2} + d^{2}}</math>, where <math>w, h, d</math> are the dimensions of the image stack. Each of the lines originates from a random point <math>\mathbf{o}</math> on the plane. The plane is divided into <math>m * m</math> same-sized sections, where <math>m</math> is a number selected by the user (i.e. ''Lines per dimension''). One origin <math>\mathbf{o}</math> is randomly selected from within each section. The lines are projected until they intercept the stack edges at points <math>\mathbf{o} + t_{min}\mathbf{v}</math>,<math>\mathbf{o} + t_{max}\mathbf{v}</math> (the algorithm solves for <math>t_{min}</math>, <math>t_{max}</math>). These line segments within the stack are then sampled for phase changes. In this drawing method some lines may miss the image stack completely, but conversely there aren't any areas in the stack that don't have an equal chance of being sampled.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
The plug-in is intended to analyse the "texture" of an object thus it suits samples of a larger whole, e.g. a trabecular cube that fills the whole stack. The results for whole objects such as the pre-packaged ''Bat Cochlea Volume'' ImageJ sample image are not really meaningful.<br />
<br />
==== Parameters ====<br />
* '''Directions''': number of times sampling is performed from different directions. The minimum is <math>9</math>, because that's how many independent variables the algorithm needs to solve the "shape" of the orientation in the image.<br />
* '''Lines per dimension''': controls how many parallel lines are drawn per each direction. For example, if ''lines per dimension'' is <math>2</math> then ''Anisotropy'' draws <math>4</math> lines. In this case, the origin points of the lines are randomly selected from within the <math>4</math> equal sections of the sampling plane (see above detailed explanation). The number is squared, because the location of the origins can vary in two dimensions.<br />
<br />
then the plane is divided into <math>4</math> equal sections, and a line is drawn from each. The origin point of each line is randomly located within their section.<br />
* '''Sampling increment''': controls how often each line is sampled. The default is <math>1.0</math>, which means that after each step a unit vector (a <math>1\_px</math> long line) is added to the position along a sampling line. The number of samples taken per line depends on the length of the line segment within the image stack.<br />
* '''Recommended minimum''': if checked, then the above three parameters are set to the recommended minimum values. In our tests we found that with these values the results are quite stable, and fitting unlikely to fail. However, these minimums are not guaranteed to be the best settings for your image.<br />
* '''Show radii''': if checked, then the radii of the fitted ellipsoid are shown in the results table.<br />
<br />
==== Results ====<br />
* '''Degree of anisotropy''': how much orientation there is in the structure. <math>0.0</math> means the image is completely isotropic, the sample has no directionality whatsoever. <math>1.0</math> means there is very strong orientation in the structure of the image. Note that these are theoretical minimum and maximum values. Due the stochastic nature of the algorithm, even an empty stack will have non-zero degree of anisotropy.<br />
* '''Radii of fitted ellipsoid''' (optional): the lengths of the radii <math>a \leq b \leq c</math> of the ellipsoid fitted on the MIL points. Degree of anisotropy <math>= 1.0 - a/c</math>.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* The results of this Anisotropy do not stabilize, so it's not repeated automatically like in BoneJ1. However, the results vary less between runs.<br />
* MIL vectors are drawn differently. In BoneJ1 they're drawn in sphere-shapes around random seed points. Here parallel lines from different directions are drawn through the whole stack. We think this method produces more uniform sampling, i.e. there's less chance of a directional bias.<br />
<br />
==== Related publications ====<br />
* Odgaard A (1997), ''Three-dimensional methods for quantification of cancellous bone architecture'', Bone, 20, 315-328, [http://dx.doi.org/10.1016/S8756-3282(97)00007-0 doi:10.1016/S8756-3282(97)00007-0]<br />
* Harrigan TP, Mann RW (1984), ''Characterization of microstructural anisotropy in orthotropic materials using a second rank tensor'', J Mater Sci, 19, 761-767, [http://dx.doi.org/10.1007/BF00540446 doi:10.1007/BF00540446]<br />
<br />
== Area/Volume fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Area/Volume fraction''<br />
<br />
''Area/Volume fraction'' calculates the fraction of bone in an image by it to the whole image. It counts all the foreground voxels, which it assumes represent bone, and compares them to the total number of voxels in the image. More formally defined, the plug-in calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''. In case of a 2D image, it calculates the fraction ''BA/TA'', which is the area of bone per unit area of the sample.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the bone voxels.<br />
* '''Total volume''': volume of the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 2D/3D subspace in the image, i.e. for each channel and time frame. Results will be for ''area'' if image is 2D.<br />
<br />
==== Differences to BoneJ1 ====<br />
* In BoneJ1 the plug-in was called ''Volume fraction''<br />
* Can process 2D images<br />
* Supports hyperstacks <br />
<br />
== Calibrate SCANCO (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyze &gt; Calibrate SCANCO''<br />
<br />
Applies the ''mg HA/ccm'' pixel value calibration, i.e. ''HU'' or Hounfield unit calibration stored in the .isq format metadata to the image.<br />
<br />
==== Suitable images ====<br />
An .isq format image generated by Scanco X-ray microtomography scanners.<br />
<br />
== Check voxel depth (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Check Voxel Depth''<br />
<br />
Checks whether slice spacing has been calibrated correctly. Some DICOM images contain slice thickness data in the header information, but thickness is not necessarily the same as the physical distance between consecutive slices' positions.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Connectivity ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Connectivity''.<br />
<br />
The Connectivity plug-in is designed to estimate the number of connected structures i.e. trabeculae in a trabecular network. This ''connectivity'' measure is related to a topological number <math>\chi</math> known as ''Euler characteristic'', ''Euler number'' or ''Euler-Poincaré characteristic''. Mathematically defined connectivity is <math>= 1 - (\chi + \Delta\chi)</math>. Roughly speaking, <math>\chi</math> describes the shape or structure of a topological space. It can also be expressed as <math>\chi = objects - handles + cavities</math>, where a handle is a hole that goes through an object (e.g the hole in a doughnut, or the ear of a coffee mug), and a cavity is enclosed inside one. When measuring trabecular cubes, you need to add <math>\Delta\chi</math> to <math>\chi</math> to get a more accurate estimate of the connectivity of the whole network. The term <math>\Delta\chi</math> corrects for the change in the topology of an object, when it's cut to pieces. <br />
<br />
NB some other Euler characteristic implementations report <math>\chi + \Delta\chi</math> as <math>\chi</math>, i.e. in them the correction <math>\Delta\chi</math> is implicit.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary. The plug-in assumes that there is only one particle in the foreground; to achieve this, run ''Purify''. Having more than one object often leads to negative connectivity.<br />
<br />
==== Results ====<br />
* '''Euler characteristic (χ)''': describes the shape of the object(s) in the image, <math>\chi = objects - handles + cavities</math>.<br />
* '''Corrected Euler (χ + Δχ)''': the Euler characteristic of the part corrected for edge effects to fit the whole.<br />
* '''Connectivity''': gives an estimate of the number of connected trabeculae in the image. Equal to <math>1 - (\chi + \Delta\chi)</math>.<br />
* '''Conn. density''': connectivity divided by unit volume. <br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* The old version reported ''Corrected Euler (χ + Δχ)'' incorrectly as ''Δχ''<br />
<br />
==== Related publications ====<br />
* Odgaard A, Gundersen HJG (1993), ''Quantification of connectivity in cancellous bone, with special emphasis on 3-D reconstructions'', Bone 14: 173-182, [http://dx.doi.org/10.1016/8756-3282(93)90245-6 doi:10.1016/8756-3282(93)90245-6.]<br />
* Toriwaki J, Yonekura T (2002), ''Euler number and connectivity indexes of a three dimensional digital picture'', [http://www.scipress.org/journals/forma/abstract/1703/17030183.html Forma 17: 183-209]<br />
<br />
== Delete slice range (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Delete slice range''<br />
<br />
Removes a range of slices from a stack, so that cropping in the Z direction is practical.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Ellipsoid factor (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Ellipsoid factor''.<br />
<br />
Ellipsoid Factor is a new method for measuring rod/plate geometry. It uses the axis lengths from prolate, oblate and intermediate elipsoids to determine how prolate or oblate the trabecular space is at a particular point. Highly prolate (javelin-shaped, rod-like) ellipsoids have a single long axis (<math>c</math>) and two short axes (<math>a, b</math>) such that <math>a < b \ll c</math> , whereas highly oblate (discus-shaped, plate-like) ellipsoids have two longer axes (<math>b, c</math>) and one much shorter axis (<math>a</math>) so that <math>a \ll b < c</math>. Calculating <math>EF</math> as the difference in ratios, <math>EF = a/b - b/c</math> leads to a useful scale ranging from <math>-1</math> (oblate, <math>a/b \approx 0, b/c \approx 1</math>) to <math>+1</math> (prolate, <math>a/b \approx 1, b/c \approx 0</math>). <math>EF</math> of <math>0</math> indicates an intermediate ellipsoid where <math>a/b = b/c</math>, which is the case for spheres (<math>a = b = c</math>) and other ellipsoids with axis ratios <math>a:qa:q^{2}a</math>. Ellipsoid Factor runs [[Skeletonize3D]] to get the medial axis of the trabeculae, which is used as the seed for sampling. Ellipsoids are seeded from each voxel on the medial axis. A combination of dilation, contraction, rotation and a small amount of translation is run iteratively until the ellipsoid increases no further in volume.<br />
<br />
The EF at a point in the structure is determined as the EF of the most voluminous ellipsoid which contains that point.<br />
<br />
If you use Ellipsoid Factor in your work, please cite:<br />
Doube M (2015), ''The Ellipsoid Factor for quantification of rods, plates and intermediate forms in 3D geometries'', Frontiers in Endocrinology, 6:15, [http://journal.frontiersin.org/Journal/10.3389/fendo.2015.00015/abstract doi: 10.3389/fendo.2015.00015]<br />
<br />
==== Suitable images ====<br />
A binary 3D image.<br />
<br />
==== Parameters ====<br />
* '''Sampling increment''': distance between sample points on each vector; should be less than the pixel spacing.<br />
* '''Vectors''': number of vectors to sample at each seed point.<br />
* '''Skeleton points per ellipsoid''': allows dense or sparse sampling, a value of <math>1</math> means that an ellipsoid is sampled at every seed point.<br />
* '''Contact sensitivity''': how many vectors must touch the background before dilation stops.<br />
* '''Maximum iterations''': how hard to try to find larger ellipsoids - fitting will stop if no improvement has been made after this number of iterations..<br />
* '''Maximum drift''': how far the centroid may be displaced from its seed point.<br />
* '''EF image''': stack containing EF values for each point contained by at least one ellipsoid and NaN elsewhere.<br />
* '''Ellipsoid ID image''': stack containing the ID of the biggest ellipsoid at each point, ranked in descending order (<math>0</math> is the largest ellipsoid).<br />
* '''Volume image''': image showing the volume of the largest ellipsoid containing that point.<br />
* '''Axis ratio images''': images showing <math>a/b</math> and <math>b/c</math> ratios foreach point containing at least one ellipsoid and NaN elsewhere.<br />
* '''Flinn peak plot''': plot of <math>a/b</math> vs <math>b/c</math> weighted by volume, so bright pixels indicate relatively more of the structure has that axis ratio.<br />
* '''Gaussian sigma:''' amount to blur the Flinn peak plot - set to <math>0</math> for a precise but less 'beautiful' result.<br />
* '''Flinn plot''': unweighted Flinn plot - every ellipsoid is represented by the same sized point regardless of ellipsoid size.<br />
<br />
==== Results ====<br />
* '''EF image''': stack containing EF values. NaN (not a number) values are used in the background. Summary statistics can be obtained by running Analyze > Histogram<br />
* '''Short-Mid image''': stack containing the <math>a/b</math> ratios<br />
* '''Mid-Long image''': stack contining the <math>b/c</math> ratios<br />
* '''Volume image''': stack containing ellipsoid volumes<br />
* '''Max id image''': stack containing the ID of the largest ellipsoid at each point; IDs relate to the sort order based on volume, so ID = 0 is the largest ellipsoid. <math>-1</math> is foreground and background is labelled with a large negative number.<br />
* '''Flinn diagram''': plot of <math>a/b</math> versus <math>b/c</math> values present in the volume<br />
* '''Weighted Flinn plot''': Flinn diagram with peaks of intensity proportional to volume occupied by each (<math>a/b</math>, <math>b/c</math>) ratio<br />
<br />
==== Related publications ====<br />
Salmon PL, Ohlsson C, Shefelbine SJ, Doube M (2015), ''Structure model index does not measure rods and plates in trabecular bone'', Frontiers in Endocrinology, 6:162, [http://dx.doi.org/10.3389/fendo.2015.00162 doi:10.3389/fendo.2015.00162].<br />
<br />
== Fit ellipsoid ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit ellipsoid''.<br />
<br />
Finds the ellipsoid that best fits a set of point or multi-point ROIs in the ROI Manager. ''Fit ellipsoid'' may fail to fit an ellipsoid. The more points you add, the more likely it is to succeed. Points are scaled to the spatial calibration (voxel widht, height &amp; depth) of the input image.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': ROIs with at least nine points in the ROI Manager.<br />
<br />
==== Results ====<br />
* '''Radii''': the radii ''a'', ''b'' and ''c'' of the fitted ellipsoid. Radius ''a'' is the shortest and ''c'' the longest.<br />
* '''Centroid''': ''x'', ''y'' and ''z'' coordinates of the ellipsoid centre point.<br />
<br />
==== Differences from BoneJ1 ====<br />
* Supports multi-point ROIs.<br />
* Plug-in cancels if an ellipsoid can't be found, instead of reporting invalid results.<br />
<br />
== Fit sphere (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit sphere''.<br />
<br />
Finds the sphere that best fits a set of point ROIs, and optionally displays the image data bounded by the sphere in a new image window. Place a set of point ROIs on structures of interest, hitting [T] to add each point to the ROI Manager. Fit Sphere takes the coordinates of the points from the ROI Manager and applies a least-squares optimisation.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': populated with at least 5 point ROI's<br />
* '''Copy Sphere''': Create a new stack containing image data from within the best-fit sphere.<br />
* '''Padding''': Number of black pixels to put between the sphere and the sides of the image<br />
* '''Inner Cube''': Create a new stack containing image data from the cube that just fits inside the best-fit sphere.<br />
* '''Outer Cube''': Create a new stack containing image data from the cube that the best-fit sphere just fits inside.<br />
* '''Crop Factor''': Radius used for generating new images is multiplied by crop factor so that a bigger or smaller volume can be produced.<br />
* '''Add to ROI Manager''': Add the sphere to the ROI Manager as a set of circular ROIs<br />
* '''Clear ROI Manager''': Clear any existing ROIs in the Manager prior to adding circles<br />
<br />
==== Results ====<br />
* '''X Centroid''': x-coordinate of sphere's centroid<br />
* '''Y Centroid''': y-coordinate of sphere's centroid<br />
* '''Z Centroid''': z-coordinate of sphere's centroid<br />
* '''Radius''': length of radius<br />
* '''Images (optional)''': images containing a copy of the original data within the sphere, or within cubes bounding or bounded by the sphere.<br />
<br />
== Fractal dimension ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fractal dimension''.<br />
<br />
This plug-in estimates the fractal dimension of an image by applying the box-counting algorithm. In this algorithm grids of diminishing size are scanned over the image, and the number of boxes containing at least one foreground voxel is counted. As the box size decreases and the grid becomes finer, the proportion of foreground boxes increases in a fractal structure. See [https://en.wikipedia.org/wiki/Box_counting Wikipedia] for further details. BoneJ uses a fixed-grid scan, with an option to try to find the optimal covering.<br />
<br />
The box counting algorithm produces a pair of <math>(log(n), -log(m))</math> values for each iteration it runs. Here n = number of boxes with foreground, and m = box size. These pairs are passed to a curve-fitting algorithm, which returns the slope of the linear function which describes them ([https://en.wikipedia.org/wiki/Linear_regression regression fit]). The coefficient of this slope is the fractal dimension.<br />
<br />
Fractal dimension is markedly influenced by the parameters selected for the box counting algorithm, so it's worth running it several times with different values to find an accurate measure for your image.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* ''Starting box size (px)'': the size (sides) in pixels of a box in the sampling grid in the first iteration of the algorithm.<br />
* ''Smallest box size (px)'': the minimum size in pixels of a box in the grid. When box size becomes smaller than this limit, the algorithm iterates one more time, and then stops.<br />
* ''Box scaling factor'': the term used to divide the box size after iteration. For example, a scaling factor of <math>2.0</math> halves the size at each step.<br />
* ''Grid translations'': how many times at each iteration the grid is moved to try to the find the optimal covering. The optimal covering covers the objects in the image with the least amount of boxes. The larger the parameter the more likely it is that optimal covering is found. However, this slows down the plug-in considerably.<br />
* ''Automatic parameters'': if checked, then the plug-in runs with default parameters.<br />
* ''Show points'': if checked, then the plug-in displays the <math>(log(n), -log(m))</math> values it calculated. <br />
<br />
==== Results ====<br />
* ''Fractal dimension'': the [https://en.wikipedia.org/wiki/Fractal_dimension fractal dimension] of the image. For example, the Koch snow flake has a fractal dimension of 1.262.<br />
* ''R²'': the [https://en.wikipedia.org/wiki/Coefficient_of_determination coefficient of determination] of the line fitted to the <math>(log(n), -log(m))</math> points.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* Algorithm parameters can be changed by the user.<br />
<br />
==== Related publications ====<br />
Fazzalari NL, Parkinson IH (1996), ''Fractal dimension and architecture of trabecular bone'', J Pathol, 178: 100-5, [http://dx.doi.org/10.1002/(SICI)1096-9896(199601)178:1%3C100::AID-PATH429%3E3.0.CO;2-K doi:10.1002/(SICI)1096-9896(199601)178:1<100::AID-PATH429>3.0.CO;2-K].<br />
<br />
== Inter-trabecular angles ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Inter-trabecular Angles''.<br />
<br />
The plug-in was designed to analyse the angles between trabeculae of cancellous bone. First it calls [[Skeletonize3D]] to thin the input image (if necessary). Then it calls [[AnalyzeSkeleton]], which creates a graph of the largest skeleton (by number of nodes) in the thinned image. The graph consists of nodes and the edges that connect them. Nodes are also known as vertices, and edges as branches. Roughly speaking the edges correspond to trabeculae and the nodes to the junction points, where trabeuculae meet.<br />
<br />
The graph is often not a perfect representation of the trabecular network in the input image. ''Inter-trabecular angles'' offers many options to adjust the graph's topology and filter out artefacts that may obfuscate or skew the results. First it allows you to filter out nodes with too many or too few edges. Secondly it can be used to prune very short edges, which often do not represent actual trabeculae. <br />
<br />
[[File:Ita_types.png|left|150 px|Types of edges in pruning]]<br />
Pruning works differently for different types of edges. There are four kinds: outer, dead-end, inner and short. An outer edge doesn't interconnect different parts of a graph. In other words, one (and only one) of its endpoints connects to only one branch, i.e. the edge itself. In the figure the outer edge is colored black. A dead-end (blue) is an outer edge whose length is less than the minimum set by the user, i.e. it's a short, outer edge. An inner edge (green) connects to end points with more than one branch. A short edge is an inner edge, whose length is less than the set minimum. When a dead-end is pruned, it with its "lonely" end-point are removed from the graph. When a short edge is pruned, it and it's endpoints are removed, and a new node is placed at the midpoint of the former. This new node connects to all the branches the previous nodes connected to.<br />
<br />
''Inter-trabecular angles'' offers two further options to control pruning: ''iteration'' and ''clustering''. Iteration repeats pruning until no new short edges are found. Sometimes pruning can create new short edges, and thus the graph may still have them after one iteration. However, iteration can alter the structure of the graph too dramatically. Clustering searches for all nodes connected by short edges, before removing any. In the figure, clustering pruning would remove the four nodes and the red edges between them in one go. It would create a new node at the center of the previous four, and connect it to the blue and green edges. When pruning is not clustering, it removes edges one-by-one. This changes the end result depending on the order the edges are traversed. Clustering creates the same result each time. <br />
<br />
Pruning also removes loops and redundant parallel edges. The former connects to the same node on both ends, and the latter connects two nodes that are already connected by another edge. <br />
<br />
The pruning and filtering features were added so that we can replicate and continue from the research of [https://doi.org/10.1016/j.actbio.2016.08.040 Reznikov et al.]<br />
<br />
==== Suitable images ====<br />
An 8-bit, binary 2D or 3D image. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
*'''Minimum valence''': minimum number of branches for a node to be included in the analysis.<br />
*'''Maximum valence''': maximum number of branches for a node to be included in the analysis.<br />
*'''Minimum trabecular length (px)''': minimum length for a branch to be preserved in the pruning. Length is calculated as the distance between the endpoints of a branch.<br />
** This length is also displayed in the units of the image calibration<br />
*'''Margin (px)''': minimum distance of a node from image stack edges to be included in the analysis. Having nodes too close to the edges can make the results less accurate, because you get more branches that do not terminate to a node at the other end.<br />
*'''Iterate pruning''': repeat pruning until no more new short branches are discovered. When true, the topology of the graph is likely to change more in the pruning.<br />
*'''Use clusters''': if true then the pruning result is independent of the order in which the graph is traversed. False corresponds with methodology in Reznikov's article. See above for more details.<br />
*'''Print centroids''': Print the centroids (center coordinates) of the node pairs at the ends of each edge.<br />
*'''Print % culled edges''': Print statistics of different types of edges pruned.<br />
<br />
==== Results ====<br />
*'''Inter-trabecular angles''': angles between each branch of each node included in the analysis. Sorted into columns according to the number of branches per node. For example, column ''"3"'' shows the angles between branches of nodes with three branches.<br />
*'''Centroids''' (optional): A table of the center coordinates of the node pairs at the ends of each edge.<br />
*'''Culled edge percentages''' (optional): A table showing the percentages of different kinds of edges pruned, compared to the total number of edges in the analysed graph.<br />
*'''Skeleton''' (optional): if the plug-in had to skeletonise the input image, it displays the result of the thinning.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Inter-trabecular angles generalizes the idea of ''Triple point angles'' for any types of points. It also provides more tools for adjusting the graph for analysis.<br />
<br />
==== Related publications ====<br />
Reznikov, N et al. (2016), ''Inter-trabecular angle: A parameter of trabecular bone architecture in the human proximal femur that reveals underlying topological motifs'', Acta Biomaterialia, 44: 65--72, [https://doi.org/10.1016/j.actbio.2016.08.040 doi:j.actbio.2016.08.040].<br />
<br />
== Local thickness ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Thickness''.<br />
<br />
This plug-in includes [[Local_Thickness]] in BoneJ, and provides some additional options &amp; results. Local thickness measures ''the diameter of the largest sphere that fits inside the object and contains the point'' for each point i.e. foreground voxel in an image. The plug-in calculates mean and standard deviation of the trabecular thickness (Tb.Th) or trabecular spacing (Tb.Sp) directly from pixel values in the resulting thickness map. Foreground voxels are considered trabeculae, and background voxels are the spacing. Processing time is heavily dependent on feature size (in pixels); large features can take a very long time to process.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
* '''Calculate''': chooses which thickness maps to calculate - trabecular thickness, trabecular spacing, or both. In order to calculate trabecular spacing, the image voxels are inverted.<br />
* '''Show thickness maps''': display the calculated thickness maps or not.<br />
* '''Mask thickness maps''': remove artifacts from the thickness maps. Artifacts are foreground voxels not present in the original image.<br />
* '''Crop to ROI manager''': create thickness maps only from the area bounded by the ROIs in the ROI manager. Checking this option requires you've added ROIs to the ROI manager.<br />
<br />
==== Results ====<br />
* The mean and standard deviation for each thickness map calculated.<br />
* Displays thickness map images if ''Show thickness maps'' was selected. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Calls the latest version of [[Local_Thickness]].<br />
* Thickness values for background voxels are marked ''NaN'' instead of ''0''.<br />
<br />
==== Related publications ====<br />
* Dougherty R, Kunzelmann K (2007), ''Computing local thickness of 3D structures with ImageJ'', Microsc. Microanal., 13: 1678-1679, [http://dx.doi.org/10.1017/S1431927607074430 doi:10.1017/S1431927607074430]<br />
* Hildebrand T, Rüegsegger P (1997), ''A new method for the model-independent assessment of thickness in three-dimensional images'', J. Microsc., 185: 67-75, [http://dx.doi.org/10.1046/j.1365-2818.1997.1340694.x doi:10.1046/j.1365-2818.1997.1340694.x]<br />
<br />
== Moments of inertia (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Moments of Inertia''<br />
<br />
Calculates the three orthogonal principal axes and moments of inertia around those axes. It includes pixels with values between upper and lower limits, which can be defined in terms of unitless grey values or Hounsfield units (HU). It optionally creates a new stack with the image centred and rotated so that the principal axes are parallel to the image stack's x, y and z axes. Calculations are limited to a rectangular ROI if one is drawn. The plugin will guess whether the image is HU calibrated, and if so, apply HU limits of bone (0-4000 HU), otherwise it will calculate auto-thresholds based on the stack's histogram. If a calibration curve is known, the coefficients can be added to get weighted calculations. Aligning a bone with Moments of Inertia may be a useful step prior to Slice Geometry if bones are not aligned with the image z axis.<br />
<br />
==== Suitable images ====<br />
An 8-bit or 16-bit image.<br />
<br />
==== Parameters ====<br />
* '''Start slice''': First slice to include in calculations<br />
* '''End slice''': Last slice to include in calculations<br />
* '''HU Calibrated''': Plugin will guess whether the image is HU calibrated. If image is HU calibrated, make sure the box is checked and enter HU calibrated numeric values in the following fields<br />
* '''Bone Min''': Lower threshold, in either uncalibrated greys or HU<br />
* '''Bone Max''': Upper threshold, in either uncalibrated greys or HU<br />
* '''Slope''': m where physical density = m × pixel value + c<br />
* '''Y Intercept''': c where physical density = m × pixel value + c<br />
* '''Align result''': Draw a new stack with the principal axes parallel to the image axes<br />
* '''Show axes (2D)''': Draw the axes in white on the aligned image<br />
* '''Show axes (3D)''': Display the stack and its principal axes in a 3D Viewer window<br />
<br />
==== Results ====<br />
* '''Image (optional)''': a copy of the input image centered and aligned with the principal axes<br />
* '''Xc''': Centroid x-coordinate (mass-weighted by calibrated density)<br />
* '''Yc''': Centroid y-coordinate<br />
* '''Zc''': Centroid z-coordinate<br />
* '''Vol''': Total volume of thresholded voxels<br />
* '''Mass''': Mass of bone, from pixel values and density calibration coefficients<br />
* '''Icxx''': Moment around x axis passing through centroid<br />
* '''Icyy''': Moment around y axis passing through centroid<br />
* '''Iczz''': Moment around z axis passing through centroid<br />
* '''Icxy''': Off-axis term for constructing inertia tensor<br />
* '''Icxz''': Off-axis term for constructing inertia tensor<br />
* '''Icyz''': Off-axis term for constructing inertia tensor<br />
* '''I1''': Moment around the shortest principal axis<br />
* '''I2''': Moment around the middle principal axis<br />
* '''I3''': Moment around the longest principal axis<br />
* '''Verbose output in Log window'''<br />
** '''Eigenvalues''': Result of of eigenvalue decomposition. Moments of inertia<br />
** '''Eigenvectors of principal axes''': orientation of input image<br />
** '''Inverse eigenvector matrix''': used to map voxel positions in the aligned image back to voxel positions in the original image<br />
* Optional 3D display of principal axes<br />
<br />
== Optimise threshold (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Optimise Threshold''<br />
<br />
Several histogram-based methods exist for automatic determination of threshold for binary segmentation, but in ImageJ these are currently limited to pixel values in a single slice. The result can be excluding high values in a stack that are higher than the highest value in the current slice. This plugin uses all the pixels in a stack to construct a histogram and uses ImageJ's built-in isodata algorithm to determine the threshold. It optionally tests values either side of the initial auto-threshold for connectivity, because connectivity is very sensitive to image noise. The plugin attempts to find the threshold that results in minimal connectivity. Purification, erosion and dilation can improve the connectivity estimate, so Purify is always called, and erosion and dilation are applied as part of a sequence: purify, erode, purify, dilate.<br />
<br />
==== Suitable images ====<br />
An 8-bit of 16-bit image<br />
<br />
==== Parameters ====<br />
* '''Threshold Only''': Determine the threshold from the stack histogram only<br />
* '''Apply Threshold''': Replace the input image with a thresholded version<br />
* '''Show Plot''': Display a graph showing connectivity versus threshold<br />
* '''Tests''': Number of different thresholds to test for connectivity<br />
* '''Range''': Proportion of the initial threshold to test above and below initial thresholds<br />
* '''Subvolume Size''': Size of the volume to test for connectivity. Set small for a faster run and large to test the whole stack<br />
* '''Erosion Cycles''': Number of times to erode the stack after initial purification<br />
* '''Dilation Cycles''': Number of times to dilate the stack after secondary purification<br />
<br />
==== Results ====<br />
* '''Thresholded stack (optional)'''<br />
* '''Plot of connectivity versus threshold (optional)'''<br />
* '''Log of optimal threshold value'''<br />
<br />
== Orientation (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Orientation''<br />
<br />
Sets the direction in a 2D image, without rotating the image or changing it in any way. ''Slice Geometry'' (see below) uses ''Orientation'' to calculate diameter, second moments of area and section moduli around anatomic axes set by the user.<br />
<br />
==== Suitable images ====<br />
A 2D image.<br />
<br />
==== Parameters ====<br />
* '''Orientation''': input field displays current orientation (clockwise from 12 o'clock) and takes keyboard input<br />
* '''deg / rad''': display and set orientation in degrees or radians<br />
* '''Principal direction''': the main direction, the head of which is displayed in red<br />
* '''Secondary direction''': the orthogonal direction<br />
* '''Reflect''': swap the labels on this axis<br />
<br />
==== Results ====<br />
* '''Orientation axes''': draws the axes of the orientation on the image.<br />
<br />
== Purify (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Purify''<br />
<br />
Purify locates all particles in 3D and removes all but the largest foreground and background particles.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary.<br />
<br />
==== Parameters ====<br />
* '''Labelling algorithm''':<br />
** '''Mapped''': Non-recursive, memory efficient and fast.<br />
** '''Multithreaded''': use multiple cores and job chunking to reduce recursion. Fast on small stacks and if you have many CPU cores.<br />
** '''Linear''': Non-recursive but heavy on RAM and single-threaded. Fast on big stacks, but only if you have the memory.<br />
* '''Chunk Size''': number of slices to use in each particle labelling thread. If images are large, set this to 2<br />
* '''Performance Log''': Show verbose performance information to help tune your system<br />
* '''Make copy''': If checked, shows the result in a new window; if unchecked the result replaces the original image.<br />
<br />
==== Results ====<br />
* '''Performance metrics (optional)'''<br />
** '''Threads''': Number of CPU cores used<br />
** '''Slices''': Number of slices in the input image stack<br />
** '''Chunks''': Number of chunks of slices, each chunk is processed independently<br />
** '''Chunk size''': Number of slices per chunk<br />
** '''Last chunk size''': size of the last chunk (the remainder chunk)<br />
** '''Duration''': time in seconds to complete purification<br />
* '''Purified image''': optionally in a new image window.<br />
<br />
== Skeletonise ==<br />
Menu path ''Plugins &gt; BoneJ &gt;Skeletonise''.<br />
<br />
This plug-in simply includes [[Skeletonize3D]] in BoneJ. It adds some additional validation to check that your image suits the tool.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[Skeletonize3D]].<br />
<br />
== Slice geometry (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Slice Geometry''<br />
<br />
Slice Geometry calculates cross-sectional geometric properties of shapes: cross-sectional area, centroid, mean density, second moment of area, section modulus, Feret diameter and local thickness (2D and 3D). Measurements can be limited to a rectangular ROI. If your bone is not well aligned with the image axes, you may find it useful to align the bone to its principal axes using Moments of Inertia or by exporting a transformed volume from the ImageJ 3D Viewer. Importantly, no assumption of geometry is made for any of the measurements.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Bone''': Slice Geometry will guess from your image title the bone it is working on. If it is wrong, correct it. If your bone of interest isn't listed, email me.<br />
* '''2D Thickness''': Run Thickness on a per-slice basis; this fits circles rather than spheres<br />
* '''3D Thickness''': Run Thickness on the whole stack, fitting spheres, then report results per slice<br />
* '''Draw Axes''': Draw axes on an annotated copy of the stack<br />
* '''Draw Centroids''': Draw centroids on an annotated copy of the stack<br />
* '''Annotated Copy (2D)''': Create a new stack showing the centroids and principal axes<br />
* '''3D Annotation''': Display the stack, principal axes and centroids in the 3D viewer<br />
* '''Process Stack''': Calculate parameters for all slices in the stack<br />
* '''Clear Results''': Remove all data in the results table without saving, prior to calculating parameters<br />
* '''Use Orientation''': Also calculate parameters based on directions defined in Orientation<br />
* '''HU Calibrated''': Allows you to enter your thresholds in Hounsfield units (HU) or uncalibrated units<br />
* '''Bone Min''': minimum pixel value to use in calculations<br />
* '''Bone Max''': maximum pixel value to use in calculations<br />
* '''Slope''': <math>m</math> where physical density <math>= m * pixel value + c</math><br />
* '''Y Intercept''': <math>c</math> where physical density <math>= m * pixel value + c</math><br />
* '''Note''': density-weighted calculations are only applied to centroid determination at present<br />
* '''Partial volume compensation''': Use model that assumes Gaussian blur of imaging modality and linear transform between pixel value and sample 'density' to correct for blurred and pixelated images (e.g. small bone in clinical CT)<br />
* '''Background''': pixel value that corresponds to zero bone density (could be the 'fat', 'air' or 'muscle' pixel value)<br />
* '''Foreground''': pixel value that corresponds to 100% bone density<br />
* '''A rectangular ROI (optional)''': if there's a ROI, calculations are limited to its area.<br />
<br />
==== Results ====<br />
* '''Images (optional)''': displays the result images selected in the parameters<br />
* '''Bone code''': Unique numeric identifier for the anatomic name of each bone. Further bone codes can be added to BoneJ on request<br />
* '''Slice''': slice number indicating which slice contributed image data for this row of the results<br />
* '''CSA''': cross-sectional area<br />
* '''X cent.''': Centroid x-coordinate<br />
* '''Y cent.''': Centroid y-coordinate<br />
* '''Density''': mean physical density, calculated from pixel values and calibration coefficients<br />
* '''wX cent''': Density-weighted x-coordinate of centroid<br />
* '''wY cent''': Density-weighted y-coordinate of centroid<br />
* '''Theta''': angle of minor axis (axis for Imin, the long axis of your specimen's cross section) from the horizontal, ranging from <math>-\pi/2</math> to <math>\pi/2</math>, with positive as clockwise<br />
* '''R1''': maximum chord length from minor axis<br />
* '''R2''': maximum chord length from major axis<br />
* '''Imin''': Second moment of area around major axis<br />
* '''Imax''': Second moment of area around minor axis<br />
* '''Ipm''': Product moment of area (= 0 if no errors are present, e.g. due to pixelation)<br />
* '''Zmax''': Section modulus around major axis (Imax / R2)<br />
* '''Zmin''': Section modulus around minor axis (Imin / R1)<br />
* '''Zpol''': Polar section modulus<br />
* '''Feret Min''': Minimum caliper width<br />
* '''Feret Max''': Maximum caliper width<br />
* '''Feret Angle''': Orientation of maximum caliper width<br />
* '''Perimeter''': Distance around external surface<br />
* '''Max Thick 2D''': Maximum thickness determined by local thickness in 2D<br />
* '''Mean Thick 2D''': Mean thickness determined by local thickness in 2D<br />
* '''SD Thick 2D''': Standard deviation of the mean thickness determined by local thickness in 2D<br />
* '''Max Thick 3D''': Maximum thickness in this slice determined by local thickness in 3D<br />
* '''Mean Thick 3D''': Mean thickness in this slice determined by local thickness in 3D<br />
* '''SD Thick 3D''': Standard deviation of the mean thickness in this slice determined by local thickness in 3D Directional measurements, using Orientation directions, and the specimen's slice centroid<br />
* '''A (rad)''': Principal orientation (direction A)<br />
* '''B (rad)''': Secondary orientation (direction B)<br />
* '''IAa''': Second moment of area around Aa axis<br />
* '''IBb''': Second moment of area around Bb axis<br />
* '''ZAa''': Section modulus around Aa axis<br />
* '''ZBb''': Section modulus around Bb axis<br />
* '''RAa''': maximum chord length from Aa axis<br />
* '''RBb''': maximum chord length from Bb axis<br />
* '''DAa''': Calliper diameter in direction of Aa<br />
* '''DBb''': Calliper diameter in direction of Bb<br />
<br />
== Surface area ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Surface area''<br />
<br />
''Surface area'' creates a mesh from the bone in the image, and then calculates the area of the surface of the mesh. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Export STL file(s)''': if checked, then the meshes created from the image are saved as .stl-files. A dialog opens for you to select a folder for the files.<br />
<br />
==== Results ====<br />
* '''Surface area''': the surface area of the bone mesh<br />
* '''STL-file''': the mesh created from the bone image<br />
<br />
The surface area is reported and an .stl-file saved separately for each 3D subspace in the image. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Isosurface''<br />
<br />
== Surface fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Surface fraction''<br />
<br />
''Surface fraction'' calculates the fraction of bone volume in an image by comparing meshes created from bone particles and the whole image. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone. <br />
<br />
More formally defined, ''Surface fraction'' calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary.<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the mesh created from bone voxels.<br />
* '''Total volume''': volume of the mesh created from the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Volume fraction''<br />
<br />
== Results table ==<br />
The BoneJ plug-ins print their results into a shared result table. This is because we often need to calculate several measures for the same image, so it's handy to have them on one row. Repeated measures for the same image are reported on different rows. The results persist even if the table is closed. To clear the table run ''Plugins &gt; BoneJ &gt; Table &gt; Clear BoneJ results''.<br />
<br />
Note that some of the plug-ins (marked with ''WIP'') still use a ImageJ1 style results table that works slightly differently. As they are modernized they'll move to use the same new table as the others.<br />
<br />
== Where is my favourite plug-in? ==<br />
We have removed some plug-ins from BoneJ. ''Neck shaft angle'', ''Plateness'' and ''Structure model index'' have been discontinued. ''Interpolate ROIs'', [http://imagej.net/3D_Binary_Filters ''Dilate 3D'' and ''Erode 3D''] come pre-packaged with ImageJ, so they are no longer included in BoneJ2.<br />
<br />
Support for ''Kontron IMG'', ''Scanco ISQ'' and ''Stratec pQCT'' file formats has been moved to [[SCIFIO]]. Just run ''Edit &gt; Options &gt; ImageJ2'', and check ''Use SCIFIO when opening files''. When the option is enabled, these kinds of files can be opened from ''File > Open'' or dragging &amp; dropping them like any other format. <br />
<br />
''Distribution analysis'' and other pQCT related tools can now be downloaded independently from the [[PQCT]] update site.<br />
<br />
== Licence ==<br />
BoneJ2 is free, open-source software. You can redistribute it and/or modify it under the terms of the [https://github.com/bonej-org/BoneJ2/blob/master/LICENCE.md BSD 2-clause licence]. The software is provided "as is" and any warranties are disclaimed. In no event shall the copyright holder or contributors be liable.<br />
<br />
== Citation ==<br />
If you'd like to cite the software, we will soon publish a paper about BoneJ experimental. You can read the draft (and send us your feedback) as we're writing it [https://v1.overleaf.com/read/yxdkwpcdkjzj for Wellcome Open Research on Overleaf]. We recommend you cite the specific release used in your research.<br />
<br />
== Funding ==<br />
The redesign and porting effort to create BoneJ2 was supported by a [https://wellcome.ac.uk/what-we-do/directories/biomedical-resource-technology-development-grants-people-funded Wellcome Trust Biomedical Resource and Technology Development Grant]. Interaction with [[SciView]] was assisted by a [https://royalsociety.org/grants-schemes-awards/grants/international-exchanges/ Royal Society International Exchange grant].</div>Mdoubehttps://imagej.net/index.php?title=BoneJ&diff=38569BoneJ2018-10-02T02:54:28Z<p>Mdoube: /* Experimental release (BoneJ2) */</p>
<hr />
<div>{{Infobox<br />
| name = BoneJ 1.x<br />
| software = ImageJ<br />
| logo = [[File:Bonej-icon.png|96px]]<br />
| author = {{Person|Mdoube}}<br />
| maintainer = {{Person|Mdoube}}<br />
| source = {{GitHub|org=mdoube|repo=BoneJ}}<br />
| status = Active<br />
| website = http://bonej.org/<br />
}}BoneJ is a plugin for bone image analysis in [[ImageJ]]. It provides free, open source tools for trabecular geometry and whole bone shape analysis.<br />
<br />
== Experimental release ([[BoneJ2]]) ==<br />
<br />
There's a new modernized version of BoneJ available through the ImageJ [http://imagej.net/Updater updater]. Read more about [[BoneJ2]].<br />
<br />
== Installation ==<br />
<br />
{{Logo | ImageJ1 | size=24px}} BoneJ was designed to work with plain [[ImageJ 1.x]].<br />
<br />
{{Logo | Fiji | size=24px}} BoneJ can be installed into [[Fiji]], but you must '''use the Java-6 version of Fiji, not the current Java-8 version''':<br />
<br />
* Download the final Java-6 version of Fiji labeled “2017 May 30” from [[Fiji/Downloads#Java_6|here]].<br />
* Unpack it somewhere beneath your home folder.<br />
* Download and install <code>BoneJ_.jar</code> into that installation's <code>plugins</code> folder.<br />
* Launch Fiji and run {{bc | Plugins | 3D Viewer}} to trigger installation of the [[3D Viewer]].<br />
* Restart Fiji.<br />
<br />
For technical details about ImageJ and Fiji using Java 6 vs. Java 8, see the [[Java 8]] page.<br />
<br />
== BoneJ and pQCT ==<br />
<br />
BoneJ and pQCT plug-ins are in the process of separation. The latter have their own [http://imagej.net/PQCT| update site], and they don't need BoneJ to work. However, if you download <code>BoneJ_.jar</code> from [http://bonej.org/ http://bonej.org/] it still includes older versions of the pQCT tools. <br />
<br />
== Publication ==<br />
* {{Publication | BoneJ}}<br />
<br />
[[Category:Related Software]]<br />
[[Category:Citable]]</div>Mdoubehttps://imagej.net/index.php?title=BoneJ&diff=38568BoneJ2018-10-02T02:43:30Z<p>Mdoube: /* Experimental release */</p>
<hr />
<div>{{Infobox<br />
| name = BoneJ 1.x<br />
| software = ImageJ<br />
| logo = [[File:Bonej-icon.png|96px]]<br />
| author = {{Person|Mdoube}}<br />
| maintainer = {{Person|Mdoube}}<br />
| source = {{GitHub|org=mdoube|repo=BoneJ}}<br />
| status = Active<br />
| website = http://bonej.org/<br />
}}BoneJ is a plugin for bone image analysis in [[ImageJ]]. It provides free, open source tools for trabecular geometry and whole bone shape analysis.<br />
<br />
== Experimental release (BoneJ2) ==<br />
<br />
There's a new modernized version of BoneJ available through the ImageJ [http://imagej.net/Updater updater]. Read more about [[BoneJ2]].<br />
<br />
== Installation ==<br />
<br />
{{Logo | ImageJ1 | size=24px}} BoneJ was designed to work with plain [[ImageJ 1.x]].<br />
<br />
{{Logo | Fiji | size=24px}} BoneJ can be installed into [[Fiji]], but you must '''use the Java-6 version of Fiji, not the current Java-8 version''':<br />
<br />
* Download the final Java-6 version of Fiji labeled “2017 May 30” from [[Fiji/Downloads#Java_6|here]].<br />
* Unpack it somewhere beneath your home folder.<br />
* Download and install <code>BoneJ_.jar</code> into that installation's <code>plugins</code> folder.<br />
* Launch Fiji and run {{bc | Plugins | 3D Viewer}} to trigger installation of the [[3D Viewer]].<br />
* Restart Fiji.<br />
<br />
For technical details about ImageJ and Fiji using Java 6 vs. Java 8, see the [[Java 8]] page.<br />
<br />
== BoneJ and pQCT ==<br />
<br />
BoneJ and pQCT plug-ins are in the process of separation. The latter have their own [http://imagej.net/PQCT| update site], and they don't need BoneJ to work. However, if you download <code>BoneJ_.jar</code> from [http://bonej.org/ http://bonej.org/] it still includes older versions of the pQCT tools. <br />
<br />
== Publication ==<br />
* {{Publication | BoneJ}}<br />
<br />
[[Category:Related Software]]<br />
[[Category:Citable]]</div>Mdoubehttps://imagej.net/index.php?title=BoneJ&diff=38567BoneJ2018-10-02T02:43:01Z<p>Mdoube: /* Experimental release */</p>
<hr />
<div>{{Infobox<br />
| name = BoneJ 1.x<br />
| software = ImageJ<br />
| logo = [[File:Bonej-icon.png|96px]]<br />
| author = {{Person|Mdoube}}<br />
| maintainer = {{Person|Mdoube}}<br />
| source = {{GitHub|org=mdoube|repo=BoneJ}}<br />
| status = Active<br />
| website = http://bonej.org/<br />
}}BoneJ is a plugin for bone image analysis in [[ImageJ]]. It provides free, open source tools for trabecular geometry and whole bone shape analysis.<br />
<br />
== Experimental release ==<br />
<br />
There's a new modernized version of BoneJ available through the ImageJ [http://imagej.net/Updater updater]. Read more about [[BoneJ2]].<br />
<br />
== Installation ==<br />
<br />
{{Logo | ImageJ1 | size=24px}} BoneJ was designed to work with plain [[ImageJ 1.x]].<br />
<br />
{{Logo | Fiji | size=24px}} BoneJ can be installed into [[Fiji]], but you must '''use the Java-6 version of Fiji, not the current Java-8 version''':<br />
<br />
* Download the final Java-6 version of Fiji labeled “2017 May 30” from [[Fiji/Downloads#Java_6|here]].<br />
* Unpack it somewhere beneath your home folder.<br />
* Download and install <code>BoneJ_.jar</code> into that installation's <code>plugins</code> folder.<br />
* Launch Fiji and run {{bc | Plugins | 3D Viewer}} to trigger installation of the [[3D Viewer]].<br />
* Restart Fiji.<br />
<br />
For technical details about ImageJ and Fiji using Java 6 vs. Java 8, see the [[Java 8]] page.<br />
<br />
== BoneJ and pQCT ==<br />
<br />
BoneJ and pQCT plug-ins are in the process of separation. The latter have their own [http://imagej.net/PQCT| update site], and they don't need BoneJ to work. However, if you download <code>BoneJ_.jar</code> from [http://bonej.org/ http://bonej.org/] it still includes older versions of the pQCT tools. <br />
<br />
== Publication ==<br />
* {{Publication | BoneJ}}<br />
<br />
[[Category:Related Software]]<br />
[[Category:Citable]]</div>Mdoubehttps://imagej.net/index.php?title=User:Mdoube&diff=38566User:Mdoube2018-10-02T02:42:20Z<p>Mdoube: </p>
<hr />
<div>{{Userbox<br />
| name = Michael Doube<br />
| gravatar = 0f0ebf95574504aa4bbd4c4ad1326c63<br />
| forum = mdoube<br />
| github = mdoube<br />
| osrc = mdoube<br />
}}Michael is the project lead for the [[BoneJ]] and [[BoneJ2]] plugins for [[ImageJ]].</div>Mdoubehttps://imagej.net/index.php?title=BoneJ2&diff=38565BoneJ22018-10-02T02:40:43Z<p>Mdoube: /* Citation */</p>
<hr />
<div>{{Infobox<br />
| name = BoneJ experimental<br />
| software = ImageJ<br />
| logo = [[File:Bonej-icon.png|96px]]<br />
| author = {{Person|Michaeldoube}}, {{Person|Rdom}}, {{Person|Alessandrofelder}}<br />
| maintainer = {{Person|Michaeldoube}}, {{Person|Alessandrofelder}}<br />
| source = {{GitHub|org=bonej-org|repo=BoneJ2}}, [https://doi.org/10.5281/zenodo.1427262 doi:10.5281/zenodo.1427262]<br />
| released = Dec 11<sup>th</sup>, 2017<br />
| latest version = cuneiform-experimental-patch2, Sep 24<sup>th</sup>, 2018<br />
| status = Active, Experimental<br />
}}<br />
BoneJ is a collection of skeletal biology plug-ins for ImageJ.<br />
This is the new experimental, modernized version of the software available through the ImageJ [http://imagej.net/Updater updater]. Its update site is called [http://sites.imagej.net/BoneJ BoneJ experimental]. For the old ImageJ1 version, see [[BoneJ]].<br />
<br />
This version works with the latest Fiji, and complies with the modern ImageJ [[architecture]]. Most plug-ins also now support hyperstacks, i.e. images with multiple channels or time frames.<br />
<br />
As the code is still experimental, it's still likely to change a lot. This means any scripts using the code might break, results can change, and plug-ins gain and lose parameters. Tools marked with ''WIP'' (work in progress), are more likely to undergo large changes. <br />
<br />
Below is the documentation for the plug-ins included in BoneJ experimental.<br />
<br />
== Installation ==<br />
[[File:Install-bonej.png|400 px|Installation steps]]<br />
# [http://imagej.net/Downloads Download] the latest version of Fiji for your operating system<br />
# Launch Fiji<br />
# Select in the menu ''Help'' &gt; ''Update...''<br />
# Click ''Manage update sites''<br />
# Check ''BoneJ experimental''<br />
# Click ''Close''<br />
# Click ''Apply changes''<br />
After the downloads have finished, close and restart Fiji.<br />
<br />
== Analyse skeleton ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyse skeleton''.<br />
<br />
This plug-in simply includes [[AnalyzeSkeleton]] in BoneJ. It adds some additional validation to check that your image suits the tool. It also skeletonizes your image by calling [[Skeletonize3D]] if needed.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[AnalyzeSkeleton]].<br />
<br />
== Anisotropy ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Anisotropy''.<br />
<br />
Anisotropy is used to quantify the directionality of trabecular bone. It tells whether the trabeculae have a certain orientation, or if they're randomly aligned. The method to measure anisotropy is fairly complex and consists of multiple steps:<br />
<br />
# Find mean intercept length (MIL) vectors from <math>n</math> directions<br />
# Plot MIL vectors into a point cloud<br />
# Solve the equation of an ellipsoid that best fits the point cloud<br />
# Calculate the degree of anisotropy from the radii of the ellipsoid<br />
<br />
It's important to note that algorithm is stochastic and does not guarantee exact results. Thus it's recommended to run it several times to establish the degree of anisotropy in your image.<br />
<br />
[[File:PhaseChanges.png|left|150 px|The red dots mark phase changes]]<br />
<br />
In the first step the algorithm draws parallel lines over the input image in direction <math>\mathbf{v}</math>. The direction is chosen randomly. Each line segment in the image stack is sampled to find points where it changes from background to foreground, i.e. where the line enters an object. The points are called ''phase changes'', in the adjacent figure they're marked with red dots. After the sampling is complete, the algorithm forms a ''MIL vector'', whose length is the total length of the line segments divided by the total number of phase changes found. The MIL vector has the same direction as <math>\mathbf{v}</math>. Drawing and sampling the lines is repeated for <math>n</math> directions, and the method creates <math>n</math> MIL vectors.<br />
<br />
After the MIL vectors have been calculated, they are added to a point cloud (a collection of points) around the origin. Then the method tries solve the equation of an ellipsoid that would fit the cloud. There may be no solution, especially if there are few points. That is, the fitting may fail at which point the plug-in stops. The radii of this ellipsoid determine the degree of anisotropy (see [http://imagej.net/index.php?title=BoneJ_experimental&action=submit#Results results]).<br />
<br />
[[File:MilCube.png|right|200 px|Projecting lines from a plane]]<br />
<br />
In more detail, the lines in the first step are projected from a <math>d * d</math> plane with normal <math>\mathbf{v}</math> (see the adjacent figure). The size <math>d = \sqrt{w^{2} + h^{2} + d^{2}}</math>, where <math>w, h, d</math> are the dimensions of the image stack. Each of the lines originates from a random point <math>\mathbf{o}</math> on the plane. The plane is divided into <math>m * m</math> same-sized sections, where <math>m</math> is a number selected by the user (i.e. ''Lines per dimension''). One origin <math>\mathbf{o}</math> is randomly selected from within each section. The lines are projected until they intercept the stack edges at points <math>\mathbf{o} + t_{min}\mathbf{v}</math>,<math>\mathbf{o} + t_{max}\mathbf{v}</math> (the algorithm solves for <math>t_{min}</math>, <math>t_{max}</math>). These line segments within the stack are then sampled for phase changes. In this drawing method some lines may miss the image stack completely, but conversely there aren't any areas in the stack that don't have an equal chance of being sampled.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
The plug-in is intended to analyse the "texture" of an object thus it suits samples of a larger whole, e.g. a trabecular cube that fills the whole stack. The results for whole objects such as the pre-packaged ''Bat Cochlea Volume'' ImageJ sample image are not really meaningful.<br />
<br />
==== Parameters ====<br />
* '''Directions''': number of times sampling is performed from different directions. The minimum is <math>9</math>, because that's how many independent variables the algorithm needs to solve the "shape" of the orientation in the image.<br />
* '''Lines per dimension''': controls how many parallel lines are drawn per each direction. For example, if ''lines per dimension'' is <math>2</math> then ''Anisotropy'' draws <math>4</math> lines. In this case, the origin points of the lines are randomly selected from within the <math>4</math> equal sections of the sampling plane (see above detailed explanation). The number is squared, because the location of the origins can vary in two dimensions.<br />
<br />
then the plane is divided into <math>4</math> equal sections, and a line is drawn from each. The origin point of each line is randomly located within their section.<br />
* '''Sampling increment''': controls how often each line is sampled. The default is <math>1.0</math>, which means that after each step a unit vector (a <math>1\_px</math> long line) is added to the position along a sampling line. The number of samples taken per line depends on the length of the line segment within the image stack.<br />
* '''Recommended minimum''': if checked, then the above three parameters are set to the recommended minimum values. In our tests we found that with these values the results are quite stable, and fitting unlikely to fail. However, these minimums are not guaranteed to be the best settings for your image.<br />
* '''Show radii''': if checked, then the radii of the fitted ellipsoid are shown in the results table.<br />
<br />
==== Results ====<br />
* '''Degree of anisotropy''': how much orientation there is in the structure. <math>0.0</math> means the image is completely isotropic, the sample has no directionality whatsoever. <math>1.0</math> means there is very strong orientation in the structure of the image. Note that these are theoretical minimum and maximum values. Due the stochastic nature of the algorithm, even an empty stack will have non-zero degree of anisotropy.<br />
* '''Radii of fitted ellipsoid''' (optional): the lengths of the radii <math>a \leq b \leq c</math> of the ellipsoid fitted on the MIL points. Degree of anisotropy <math>= 1.0 - a/c</math>.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* The results of this Anisotropy do not stabilize, so it's not repeated automatically like in BoneJ1. However, the results vary less between runs.<br />
* MIL vectors are drawn differently. In BoneJ1 they're drawn in sphere-shapes around random seed points. Here parallel lines from different directions are drawn through the whole stack. We think this method produces more uniform sampling, i.e. there's less chance of a directional bias.<br />
<br />
==== Related publications ====<br />
* Odgaard A (1997), ''Three-dimensional methods for quantification of cancellous bone architecture'', Bone, 20, 315-328, [http://dx.doi.org/10.1016/S8756-3282(97)00007-0 doi:10.1016/S8756-3282(97)00007-0]<br />
* Harrigan TP, Mann RW (1984), ''Characterization of microstructural anisotropy in orthotropic materials using a second rank tensor'', J Mater Sci, 19, 761-767, [http://dx.doi.org/10.1007/BF00540446 doi:10.1007/BF00540446]<br />
<br />
== Area/Volume fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Area/Volume fraction''<br />
<br />
''Area/Volume fraction'' calculates the fraction of bone in an image by it to the whole image. It counts all the foreground voxels, which it assumes represent bone, and compares them to the total number of voxels in the image. More formally defined, the plug-in calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''. In case of a 2D image, it calculates the fraction ''BA/TA'', which is the area of bone per unit area of the sample.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the bone voxels.<br />
* '''Total volume''': volume of the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 2D/3D subspace in the image, i.e. for each channel and time frame. Results will be for ''area'' if image is 2D.<br />
<br />
==== Differences to BoneJ1 ====<br />
* In BoneJ1 the plug-in was called ''Volume fraction''<br />
* Can process 2D images<br />
* Supports hyperstacks <br />
<br />
== Calibrate SCANCO (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyze &gt; Calibrate SCANCO''<br />
<br />
Applies the ''mg HA/ccm'' pixel value calibration, i.e. ''HU'' or Hounfield unit calibration stored in the .isq format metadata to the image.<br />
<br />
==== Suitable images ====<br />
An .isq format image generated by Scanco X-ray microtomography scanners.<br />
<br />
== Check voxel depth (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Check Voxel Depth''<br />
<br />
Checks whether slice spacing has been calibrated correctly. Some DICOM images contain slice thickness data in the header information, but thickness is not necessarily the same as the physical distance between consecutive slices' positions.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Connectivity ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Connectivity''.<br />
<br />
The Connectivity plug-in is designed to estimate the number of connected structures i.e. trabeculae in a trabecular network. This ''connectivity'' measure is related to a topological number <math>\chi</math> known as ''Euler characteristic'', ''Euler number'' or ''Euler-Poincaré characteristic''. Mathematically defined connectivity is <math>= 1 - (\chi + \Delta\chi)</math>. Roughly speaking, <math>\chi</math> describes the shape or structure of a topological space. It can also be expressed as <math>\chi = objects - handles + cavities</math>, where a handle is a hole that goes through an object (e.g the hole in a doughnut, or the ear of a coffee mug), and a cavity is enclosed inside one. When measuring trabecular cubes, you need to add <math>\Delta\chi</math> to <math>\chi</math> to get a more accurate estimate of the connectivity of the whole network. The term <math>\Delta\chi</math> corrects for the change in the topology of an object, when it's cut to pieces. <br />
<br />
NB some other Euler characteristic implementations report <math>\chi + \Delta\chi</math> as <math>\chi</math>, i.e. in them the correction <math>\Delta\chi</math> is implicit.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary. The plug-in assumes that there is only one particle in the foreground; to achieve this, run ''Purify''. Having more than one object often leads to negative connectivity.<br />
<br />
==== Results ====<br />
* '''Euler characteristic (χ)''': describes the shape of the object(s) in the image, <math>\chi = objects - handles + cavities</math>.<br />
* '''Corrected Euler (χ + Δχ)''': the Euler characteristic of the part corrected for edge effects to fit the whole.<br />
* '''Connectivity''': gives an estimate of the number of connected trabeculae in the image. Equal to <math>1 - (\chi + \Delta\chi)</math>.<br />
* '''Conn. density''': connectivity divided by unit volume. <br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* The old version reported ''Corrected Euler (χ + Δχ)'' incorrectly as ''Δχ''<br />
<br />
==== Related publications ====<br />
* Odgaard A, Gundersen HJG (1993), ''Quantification of connectivity in cancellous bone, with special emphasis on 3-D reconstructions'', Bone 14: 173-182, [http://dx.doi.org/10.1016/8756-3282(93)90245-6 doi:10.1016/8756-3282(93)90245-6.]<br />
* Toriwaki J, Yonekura T (2002), ''Euler number and connectivity indexes of a three dimensional digital picture'', [http://www.scipress.org/journals/forma/abstract/1703/17030183.html Forma 17: 183-209]<br />
<br />
== Delete slice range (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Delete slice range''<br />
<br />
Removes a range of slices from a stack, so that cropping in the Z direction is practical.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Ellipsoid factor (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Ellipsoid factor''.<br />
<br />
Ellipsoid Factor is a new method for measuring rod/plate geometry. It uses the axis lengths from prolate, oblate and intermediate elipsoids to determine how prolate or oblate the trabecular space is at a particular point. Highly prolate (javelin-shaped, rod-like) ellipsoids have a single long axis (<math>c</math>) and two short axes (<math>a, b</math>) such that <math>a < b \ll c</math> , whereas highly oblate (discus-shaped, plate-like) ellipsoids have two longer axes (<math>b, c</math>) and one much shorter axis (<math>a</math>) so that <math>a \ll b < c</math>. Calculating <math>EF</math> as the difference in ratios, <math>EF = a/b - b/c</math> leads to a useful scale ranging from <math>-1</math> (oblate, <math>a/b \approx 0, b/c \approx 1</math>) to <math>+1</math> (prolate, <math>a/b \approx 1, b/c \approx 0</math>). <math>EF</math> of <math>0</math> indicates an intermediate ellipsoid where <math>a/b = b/c</math>, which is the case for spheres (<math>a = b = c</math>) and other ellipsoids with axis ratios <math>a:qa:q^{2}a</math>. Ellipsoid Factor runs [[Skeletonize3D]] to get the medial axis of the trabeculae, which is used as the seed for sampling. Ellipsoids are seeded from each voxel on the medial axis. A combination of dilation, contraction, rotation and a small amount of translation is run iteratively until the ellipsoid increases no further in volume.<br />
<br />
The EF at a point in the structure is determined as the EF of the most voluminous ellipsoid which contains that point.<br />
<br />
If you use Ellipsoid Factor in your work, please cite:<br />
Doube M (2015), ''The Ellipsoid Factor for quantification of rods, plates and intermediate forms in 3D geometries'', Frontiers in Endocrinology, 6:15, [http://journal.frontiersin.org/Journal/10.3389/fendo.2015.00015/abstract doi: 10.3389/fendo.2015.00015]<br />
<br />
==== Suitable images ====<br />
A binary 3D image.<br />
<br />
==== Parameters ====<br />
* '''Sampling increment''': distance between sample points on each vector; should be less than the pixel spacing.<br />
* '''Vectors''': number of vectors to sample at each seed point.<br />
* '''Skeleton points per ellipsoid''': allows dense or sparse sampling, a value of <math>1</math> means that an ellipsoid is sampled at every seed point.<br />
* '''Contact sensitivity''': how many vectors must touch the background before dilation stops.<br />
* '''Maximum iterations''': how hard to try to find larger ellipsoids - fitting will stop if no improvement has been made after this number of iterations..<br />
* '''Maximum drift''': how far the centroid may be displaced from its seed point.<br />
* '''EF image''': stack containing EF values for each point contained by at least one ellipsoid and NaN elsewhere.<br />
* '''Ellipsoid ID image''': stack containing the ID of the biggest ellipsoid at each point, ranked in descending order (<math>0</math> is the largest ellipsoid).<br />
* '''Volume image''': image showing the volume of the largest ellipsoid containing that point.<br />
* '''Axis ratio images''': images showing <math>a/b</math> and <math>b/c</math> ratios foreach point containing at least one ellipsoid and NaN elsewhere.<br />
* '''Flinn peak plot''': plot of <math>a/b</math> vs <math>b/c</math> weighted by volume, so bright pixels indicate relatively more of the structure has that axis ratio.<br />
* '''Gaussian sigma:''' amount to blur the Flinn peak plot - set to <math>0</math> for a precise but less 'beautiful' result.<br />
* '''Flinn plot''': unweighted Flinn plot - every ellipsoid is represented by the same sized point regardless of ellipsoid size.<br />
<br />
==== Results ====<br />
* '''EF image''': stack containing EF values. NaN (not a number) values are used in the background. Summary statistics can be obtained by running Analyze > Histogram<br />
* '''Short-Mid image''': stack containing the <math>a/b</math> ratios<br />
* '''Mid-Long image''': stack contining the <math>b/c</math> ratios<br />
* '''Volume image''': stack containing ellipsoid volumes<br />
* '''Max id image''': stack containing the ID of the largest ellipsoid at each point; IDs relate to the sort order based on volume, so ID = 0 is the largest ellipsoid. <math>-1</math> is foreground and background is labelled with a large negative number.<br />
* '''Flinn diagram''': plot of <math>a/b</math> versus <math>b/c</math> values present in the volume<br />
* '''Weighted Flinn plot''': Flinn diagram with peaks of intensity proportional to volume occupied by each (<math>a/b</math>, <math>b/c</math>) ratio<br />
<br />
==== Related publications ====<br />
Salmon PL, Ohlsson C, Shefelbine SJ, Doube M (2015), ''Structure model index does not measure rods and plates in trabecular bone'', Frontiers in Endocrinology, 6:162, [http://dx.doi.org/10.3389/fendo.2015.00162 doi:10.3389/fendo.2015.00162].<br />
<br />
== Fit ellipsoid ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit ellipsoid''.<br />
<br />
Finds the ellipsoid that best fits a set of point or multi-point ROIs in the ROI Manager. ''Fit ellipsoid'' may fail to fit an ellipsoid. The more points you add, the more likely it is to succeed. Points are scaled to the spatial calibration (voxel widht, height &amp; depth) of the input image.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': ROIs with at least nine points in the ROI Manager.<br />
<br />
==== Results ====<br />
* '''Radii''': the radii ''a'', ''b'' and ''c'' of the fitted ellipsoid. Radius ''a'' is the shortest and ''c'' the longest.<br />
* '''Centroid''': ''x'', ''y'' and ''z'' coordinates of the ellipsoid centre point.<br />
<br />
==== Differences from BoneJ1 ====<br />
* Supports multi-point ROIs.<br />
* Plug-in cancels if an ellipsoid can't be found, instead of reporting invalid results.<br />
<br />
== Fit sphere (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit sphere''.<br />
<br />
Finds the sphere that best fits a set of point ROIs, and optionally displays the image data bounded by the sphere in a new image window. Place a set of point ROIs on structures of interest, hitting [T] to add each point to the ROI Manager. Fit Sphere takes the coordinates of the points from the ROI Manager and applies a least-squares optimisation.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': populated with at least 5 point ROI's<br />
* '''Copy Sphere''': Create a new stack containing image data from within the best-fit sphere.<br />
* '''Padding''': Number of black pixels to put between the sphere and the sides of the image<br />
* '''Inner Cube''': Create a new stack containing image data from the cube that just fits inside the best-fit sphere.<br />
* '''Outer Cube''': Create a new stack containing image data from the cube that the best-fit sphere just fits inside.<br />
* '''Crop Factor''': Radius used for generating new images is multiplied by crop factor so that a bigger or smaller volume can be produced.<br />
* '''Add to ROI Manager''': Add the sphere to the ROI Manager as a set of circular ROIs<br />
* '''Clear ROI Manager''': Clear any existing ROIs in the Manager prior to adding circles<br />
<br />
==== Results ====<br />
* '''X Centroid''': x-coordinate of sphere's centroid<br />
* '''Y Centroid''': y-coordinate of sphere's centroid<br />
* '''Z Centroid''': z-coordinate of sphere's centroid<br />
* '''Radius''': length of radius<br />
* '''Images (optional)''': images containing a copy of the original data within the sphere, or within cubes bounding or bounded by the sphere.<br />
<br />
== Fractal dimension ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fractal dimension''.<br />
<br />
This plug-in estimates the fractal dimension of an image by applying the box-counting algorithm. In this algorithm grids of diminishing size are scanned over the image, and the number of boxes containing at least one foreground voxel is counted. As the box size decreases and the grid becomes finer, the proportion of foreground boxes increases in a fractal structure. See [https://en.wikipedia.org/wiki/Box_counting Wikipedia] for further details. BoneJ uses a fixed-grid scan, with an option to try to find the optimal covering.<br />
<br />
The box counting algorithm produces a pair of <math>(log(n), -log(m))</math> values for each iteration it runs. Here n = number of boxes with foreground, and m = box size. These pairs are passed to a curve-fitting algorithm, which returns the slope of the linear function which describes them ([https://en.wikipedia.org/wiki/Linear_regression regression fit]). The coefficient of this slope is the fractal dimension.<br />
<br />
Fractal dimension is markedly influenced by the parameters selected for the box counting algorithm, so it's worth running it several times with different values to find an accurate measure for your image.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* ''Starting box size (px)'': the size (sides) in pixels of a box in the sampling grid in the first iteration of the algorithm.<br />
* ''Smallest box size (px)'': the minimum size in pixels of a box in the grid. When box size becomes smaller than this limit, the algorithm iterates one more time, and then stops.<br />
* ''Box scaling factor'': the term used to divide the box size after iteration. For example, a scaling factor of <math>2.0</math> halves the size at each step.<br />
* ''Grid translations'': how many times at each iteration the grid is moved to try to the find the optimal covering. The optimal covering covers the objects in the image with the least amount of boxes. The larger the parameter the more likely it is that optimal covering is found. However, this slows down the plug-in considerably.<br />
* ''Automatic parameters'': if checked, then the plug-in runs with default parameters.<br />
* ''Show points'': if checked, then the plug-in displays the <math>(log(n), -log(m))</math> values it calculated. <br />
<br />
==== Results ====<br />
* ''Fractal dimension'': the [https://en.wikipedia.org/wiki/Fractal_dimension fractal dimension] of the image. For example, the Koch snow flake has a fractal dimension of 1.262.<br />
* ''R²'': the [https://en.wikipedia.org/wiki/Coefficient_of_determination coefficient of determination] of the line fitted to the <math>(log(n), -log(m))</math> points.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* Algorithm parameters can be changed by the user.<br />
<br />
==== Related publications ====<br />
Fazzalari NL, Parkinson IH (1996), ''Fractal dimension and architecture of trabecular bone'', J Pathol, 178: 100-5, [http://dx.doi.org/10.1002/(SICI)1096-9896(199601)178:1%3C100::AID-PATH429%3E3.0.CO;2-K doi:10.1002/(SICI)1096-9896(199601)178:1<100::AID-PATH429>3.0.CO;2-K].<br />
<br />
== Inter-trabecular angles ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Inter-trabecular Angles''.<br />
<br />
The plug-in was designed to analyse the angles between trabeculae of cancellous bone. First it calls [[Skeletonize3D]] to thin the input image (if necessary). Then it calls [[AnalyzeSkeleton]], which creates a graph of the largest skeleton (by number of nodes) in the thinned image. The graph consists of nodes and the edges that connect them. Nodes are also known as vertices, and edges as branches. Roughly speaking the edges correspond to trabeculae and the nodes to the junction points, where trabeuculae meet.<br />
<br />
The graph is often not a perfect representation of the trabecular network in the input image. ''Inter-trabecular angles'' offers many options to adjust the graph's topology and filter out artefacts that may obfuscate or skew the results. First it allows you to filter out nodes with too many or too few edges. Secondly it can be used to prune very short edges, which often do not represent actual trabeculae. <br />
<br />
[[File:Ita_types.png|left|150 px|Types of edges in pruning]]<br />
Pruning works differently for different types of edges. There are four kinds: outer, dead-end, inner and short. An outer edge doesn't interconnect different parts of a graph. In other words, one (and only one) of its endpoints connects to only one branch, i.e. the edge itself. In the figure the outer edge is colored black. A dead-end (blue) is an outer edge whose length is less than the minimum set by the user, i.e. it's a short, outer edge. An inner edge (green) connects to end points with more than one branch. A short edge is an inner edge, whose length is less than the set minimum. When a dead-end is pruned, it with its "lonely" end-point are removed from the graph. When a short edge is pruned, it and it's endpoints are removed, and a new node is placed at the midpoint of the former. This new node connects to all the branches the previous nodes connected to.<br />
<br />
''Inter-trabecular angles'' offers two further options to control pruning: ''iteration'' and ''clustering''. Iteration repeats pruning until no new short edges are found. Sometimes pruning can create new short edges, and thus the graph may still have them after one iteration. However, iteration can alter the structure of the graph too dramatically. Clustering searches for all nodes connected by short edges, before removing any. In the figure, clustering pruning would remove the four nodes and the red edges between them in one go. It would create a new node at the center of the previous four, and connect it to the blue and green edges. When pruning is not clustering, it removes edges one-by-one. This changes the end result depending on the order the edges are traversed. Clustering creates the same result each time. <br />
<br />
Pruning also removes loops and redundant parallel edges. The former connects to the same node on both ends, and the latter connects two nodes that are already connected by another edge. <br />
<br />
The pruning and filtering features were added so that we can replicate and continue from the research of [https://doi.org/10.1016/j.actbio.2016.08.040 Reznikov et al.]<br />
<br />
==== Suitable images ====<br />
An 8-bit, binary 2D or 3D image. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
*'''Minimum valence''': minimum number of branches for a node to be included in the analysis.<br />
*'''Maximum valence''': maximum number of branches for a node to be included in the analysis.<br />
*'''Minimum trabecular length (px)''': minimum length for a branch to be preserved in the pruning. Length is calculated as the distance between the endpoints of a branch.<br />
** This length is also displayed in the units of the image calibration<br />
*'''Margin (px)''': minimum distance of a node from image stack edges to be included in the analysis. Having nodes too close to the edges can make the results less accurate, because you get more branches that do not terminate to a node at the other end.<br />
*'''Iterate pruning''': repeat pruning until no more new short branches are discovered. When true, the topology of the graph is likely to change more in the pruning.<br />
*'''Use clusters''': if true then the pruning result is independent of the order in which the graph is traversed. False corresponds with methodology in Reznikov's article. See above for more details.<br />
*'''Print centroids''': Print the centroids (center coordinates) of the node pairs at the ends of each edge.<br />
*'''Print % culled edges''': Print statistics of different types of edges pruned.<br />
<br />
==== Results ====<br />
*'''Inter-trabecular angles''': angles between each branch of each node included in the analysis. Sorted into columns according to the number of branches per node. For example, column ''"3"'' shows the angles between branches of nodes with three branches.<br />
*'''Centroids''' (optional): A table of the center coordinates of the node pairs at the ends of each edge.<br />
*'''Culled edge percentages''' (optional): A table showing the percentages of different kinds of edges pruned, compared to the total number of edges in the analysed graph.<br />
*'''Skeleton''' (optional): if the plug-in had to skeletonise the input image, it displays the result of the thinning.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Inter-trabecular angles generalizes the idea of ''Triple point angles'' for any types of points. It also provides more tools for adjusting the graph for analysis.<br />
<br />
==== Related publications ====<br />
Reznikov, N et al. (2016), ''Inter-trabecular angle: A parameter of trabecular bone architecture in the human proximal femur that reveals underlying topological motifs'', Acta Biomaterialia, 44: 65--72, [https://doi.org/10.1016/j.actbio.2016.08.040 doi:j.actbio.2016.08.040].<br />
<br />
== Local thickness ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Thickness''.<br />
<br />
This plug-in includes [[Local_Thickness]] in BoneJ, and provides some additional options &amp; results. Local thickness measures ''the diameter of the largest sphere that fits inside the object and contains the point'' for each point i.e. foreground voxel in an image. The plug-in calculates mean and standard deviation of the trabecular thickness (Tb.Th) or trabecular spacing (Tb.Sp) directly from pixel values in the resulting thickness map. Foreground voxels are considered trabeculae, and background voxels are the spacing. Processing time is heavily dependent on feature size (in pixels); large features can take a very long time to process.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
* '''Calculate''': chooses which thickness maps to calculate - trabecular thickness, trabecular spacing, or both. In order to calculate trabecular spacing, the image voxels are inverted.<br />
* '''Show thickness maps''': display the calculated thickness maps or not.<br />
* '''Mask thickness maps''': remove artifacts from the thickness maps. Artifacts are foreground voxels not present in the original image.<br />
* '''Crop to ROI manager''': create thickness maps only from the area bounded by the ROIs in the ROI manager. Checking this option requires you've added ROIs to the ROI manager.<br />
<br />
==== Results ====<br />
* The mean and standard deviation for each thickness map calculated.<br />
* Displays thickness map images if ''Show thickness maps'' was selected. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Calls the latest version of [[Local_Thickness]].<br />
* Thickness values for background voxels are marked ''NaN'' instead of ''0''.<br />
<br />
==== Related publications ====<br />
* Dougherty R, Kunzelmann K (2007), ''Computing local thickness of 3D structures with ImageJ'', Microsc. Microanal., 13: 1678-1679, [http://dx.doi.org/10.1017/S1431927607074430 doi:10.1017/S1431927607074430]<br />
* Hildebrand T, Rüegsegger P (1997), ''A new method for the model-independent assessment of thickness in three-dimensional images'', J. Microsc., 185: 67-75, [http://dx.doi.org/10.1046/j.1365-2818.1997.1340694.x doi:10.1046/j.1365-2818.1997.1340694.x]<br />
<br />
== Moments of inertia (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Moments of Inertia''<br />
<br />
Calculates the three orthogonal principal axes and moments of inertia around those axes. It includes pixels with values between upper and lower limits, which can be defined in terms of unitless grey values or Hounsfield units (HU). It optionally creates a new stack with the image centred and rotated so that the principal axes are parallel to the image stack's x, y and z axes. Calculations are limited to a rectangular ROI if one is drawn. The plugin will guess whether the image is HU calibrated, and if so, apply HU limits of bone (0-4000 HU), otherwise it will calculate auto-thresholds based on the stack's histogram. If a calibration curve is known, the coefficients can be added to get weighted calculations. Aligning a bone with Moments of Inertia may be a useful step prior to Slice Geometry if bones are not aligned with the image z axis.<br />
<br />
==== Suitable images ====<br />
An 8-bit or 16-bit image.<br />
<br />
==== Parameters ====<br />
* '''Start slice''': First slice to include in calculations<br />
* '''End slice''': Last slice to include in calculations<br />
* '''HU Calibrated''': Plugin will guess whether the image is HU calibrated. If image is HU calibrated, make sure the box is checked and enter HU calibrated numeric values in the following fields<br />
* '''Bone Min''': Lower threshold, in either uncalibrated greys or HU<br />
* '''Bone Max''': Upper threshold, in either uncalibrated greys or HU<br />
* '''Slope''': m where physical density = m × pixel value + c<br />
* '''Y Intercept''': c where physical density = m × pixel value + c<br />
* '''Align result''': Draw a new stack with the principal axes parallel to the image axes<br />
* '''Show axes (2D)''': Draw the axes in white on the aligned image<br />
* '''Show axes (3D)''': Display the stack and its principal axes in a 3D Viewer window<br />
<br />
==== Results ====<br />
* '''Image (optional)''': a copy of the input image centered and aligned with the principal axes<br />
* '''Xc''': Centroid x-coordinate (mass-weighted by calibrated density)<br />
* '''Yc''': Centroid y-coordinate<br />
* '''Zc''': Centroid z-coordinate<br />
* '''Vol''': Total volume of thresholded voxels<br />
* '''Mass''': Mass of bone, from pixel values and density calibration coefficients<br />
* '''Icxx''': Moment around x axis passing through centroid<br />
* '''Icyy''': Moment around y axis passing through centroid<br />
* '''Iczz''': Moment around z axis passing through centroid<br />
* '''Icxy''': Off-axis term for constructing inertia tensor<br />
* '''Icxz''': Off-axis term for constructing inertia tensor<br />
* '''Icyz''': Off-axis term for constructing inertia tensor<br />
* '''I1''': Moment around the shortest principal axis<br />
* '''I2''': Moment around the middle principal axis<br />
* '''I3''': Moment around the longest principal axis<br />
* '''Verbose output in Log window'''<br />
** '''Eigenvalues''': Result of of eigenvalue decomposition. Moments of inertia<br />
** '''Eigenvectors of principal axes''': orientation of input image<br />
** '''Inverse eigenvector matrix''': used to map voxel positions in the aligned image back to voxel positions in the original image<br />
* Optional 3D display of principal axes<br />
<br />
== Optimise threshold (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Optimise Threshold''<br />
<br />
Several histogram-based methods exist for automatic determination of threshold for binary segmentation, but in ImageJ these are currently limited to pixel values in a single slice. The result can be excluding high values in a stack that are higher than the highest value in the current slice. This plugin uses all the pixels in a stack to construct a histogram and uses ImageJ's built-in isodata algorithm to determine the threshold. It optionally tests values either side of the initial auto-threshold for connectivity, because connectivity is very sensitive to image noise. The plugin attempts to find the threshold that results in minimal connectivity. Purification, erosion and dilation can improve the connectivity estimate, so Purify is always called, and erosion and dilation are applied as part of a sequence: purify, erode, purify, dilate.<br />
<br />
==== Suitable images ====<br />
An 8-bit of 16-bit image<br />
<br />
==== Parameters ====<br />
* '''Threshold Only''': Determine the threshold from the stack histogram only<br />
* '''Apply Threshold''': Replace the input image with a thresholded version<br />
* '''Show Plot''': Display a graph showing connectivity versus threshold<br />
* '''Tests''': Number of different thresholds to test for connectivity<br />
* '''Range''': Proportion of the initial threshold to test above and below initial thresholds<br />
* '''Subvolume Size''': Size of the volume to test for connectivity. Set small for a faster run and large to test the whole stack<br />
* '''Erosion Cycles''': Number of times to erode the stack after initial purification<br />
* '''Dilation Cycles''': Number of times to dilate the stack after secondary purification<br />
<br />
==== Results ====<br />
* '''Thresholded stack (optional)'''<br />
* '''Plot of connectivity versus threshold (optional)'''<br />
* '''Log of optimal threshold value'''<br />
<br />
== Orientation (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Orientation''<br />
<br />
Sets the direction in a 2D image, without rotating the image or changing it in any way. ''Slice Geometry'' (see below) uses ''Orientation'' to calculate diameter, second moments of area and section moduli around anatomic axes set by the user.<br />
<br />
==== Suitable images ====<br />
A 2D image.<br />
<br />
==== Parameters ====<br />
* '''Orientation''': input field displays current orientation (clockwise from 12 o'clock) and takes keyboard input<br />
* '''deg / rad''': display and set orientation in degrees or radians<br />
* '''Principal direction''': the main direction, the head of which is displayed in red<br />
* '''Secondary direction''': the orthogonal direction<br />
* '''Reflect''': swap the labels on this axis<br />
<br />
==== Results ====<br />
* '''Orientation axes''': draws the axes of the orientation on the image.<br />
<br />
== Purify (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Purify''<br />
<br />
Purify locates all particles in 3D and removes all but the largest foreground and background particles.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary.<br />
<br />
==== Parameters ====<br />
* '''Labelling algorithm''':<br />
** '''Mapped''': Non-recursive, memory efficient and fast.<br />
** '''Multithreaded''': use multiple cores and job chunking to reduce recursion. Fast on small stacks and if you have many CPU cores.<br />
** '''Linear''': Non-recursive but heavy on RAM and single-threaded. Fast on big stacks, but only if you have the memory.<br />
* '''Chunk Size''': number of slices to use in each particle labelling thread. If images are large, set this to 2<br />
* '''Performance Log''': Show verbose performance information to help tune your system<br />
* '''Make copy''': If checked, shows the result in a new window; if unchecked the result replaces the original image.<br />
<br />
==== Results ====<br />
* '''Performance metrics (optional)'''<br />
** '''Threads''': Number of CPU cores used<br />
** '''Slices''': Number of slices in the input image stack<br />
** '''Chunks''': Number of chunks of slices, each chunk is processed independently<br />
** '''Chunk size''': Number of slices per chunk<br />
** '''Last chunk size''': size of the last chunk (the remainder chunk)<br />
** '''Duration''': time in seconds to complete purification<br />
* '''Purified image''': optionally in a new image window.<br />
<br />
== Skeletonise ==<br />
Menu path ''Plugins &gt; BoneJ &gt;Skeletonise''.<br />
<br />
This plug-in simply includes [[Skeletonize3D]] in BoneJ. It adds some additional validation to check that your image suits the tool.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[Skeletonize3D]].<br />
<br />
== Slice geometry (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Slice Geometry''<br />
<br />
Slice Geometry calculates cross-sectional geometric properties of shapes: cross-sectional area, centroid, mean density, second moment of area, section modulus, Feret diameter and local thickness (2D and 3D). Measurements can be limited to a rectangular ROI. If your bone is not well aligned with the image axes, you may find it useful to align the bone to its principal axes using Moments of Inertia or by exporting a transformed volume from the ImageJ 3D Viewer. Importantly, no assumption of geometry is made for any of the measurements.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Bone''': Slice Geometry will guess from your image title the bone it is working on. If it is wrong, correct it. If your bone of interest isn't listed, email me.<br />
* '''2D Thickness''': Run Thickness on a per-slice basis; this fits circles rather than spheres<br />
* '''3D Thickness''': Run Thickness on the whole stack, fitting spheres, then report results per slice<br />
* '''Draw Axes''': Draw axes on an annotated copy of the stack<br />
* '''Draw Centroids''': Draw centroids on an annotated copy of the stack<br />
* '''Annotated Copy (2D)''': Create a new stack showing the centroids and principal axes<br />
* '''3D Annotation''': Display the stack, principal axes and centroids in the 3D viewer<br />
* '''Process Stack''': Calculate parameters for all slices in the stack<br />
* '''Clear Results''': Remove all data in the results table without saving, prior to calculating parameters<br />
* '''Use Orientation''': Also calculate parameters based on directions defined in Orientation<br />
* '''HU Calibrated''': Allows you to enter your thresholds in Hounsfield units (HU) or uncalibrated units<br />
* '''Bone Min''': minimum pixel value to use in calculations<br />
* '''Bone Max''': maximum pixel value to use in calculations<br />
* '''Slope''': <math>m</math> where physical density <math>= m * pixel value + c</math><br />
* '''Y Intercept''': <math>c</math> where physical density <math>= m * pixel value + c</math><br />
* '''Note''': density-weighted calculations are only applied to centroid determination at present<br />
* '''Partial volume compensation''': Use model that assumes Gaussian blur of imaging modality and linear transform between pixel value and sample 'density' to correct for blurred and pixelated images (e.g. small bone in clinical CT)<br />
* '''Background''': pixel value that corresponds to zero bone density (could be the 'fat', 'air' or 'muscle' pixel value)<br />
* '''Foreground''': pixel value that corresponds to 100% bone density<br />
* '''A rectangular ROI (optional)''': if there's a ROI, calculations are limited to its area.<br />
<br />
==== Results ====<br />
* '''Images (optional)''': displays the result images selected in the parameters<br />
* '''Bone code''': Unique numeric identifier for the anatomic name of each bone. Further bone codes can be added to BoneJ on request<br />
* '''Slice''': slice number indicating which slice contributed image data for this row of the results<br />
* '''CSA''': cross-sectional area<br />
* '''X cent.''': Centroid x-coordinate<br />
* '''Y cent.''': Centroid y-coordinate<br />
* '''Density''': mean physical density, calculated from pixel values and calibration coefficients<br />
* '''wX cent''': Density-weighted x-coordinate of centroid<br />
* '''wY cent''': Density-weighted y-coordinate of centroid<br />
* '''Theta''': angle of minor axis (axis for Imin, the long axis of your specimen's cross section) from the horizontal, ranging from <math>-\pi/2</math> to <math>\pi/2</math>, with positive as clockwise<br />
* '''R1''': maximum chord length from minor axis<br />
* '''R2''': maximum chord length from major axis<br />
* '''Imin''': Second moment of area around major axis<br />
* '''Imax''': Second moment of area around minor axis<br />
* '''Ipm''': Product moment of area (= 0 if no errors are present, e.g. due to pixelation)<br />
* '''Zmax''': Section modulus around major axis (Imax / R2)<br />
* '''Zmin''': Section modulus around minor axis (Imin / R1)<br />
* '''Zpol''': Polar section modulus<br />
* '''Feret Min''': Minimum caliper width<br />
* '''Feret Max''': Maximum caliper width<br />
* '''Feret Angle''': Orientation of maximum caliper width<br />
* '''Perimeter''': Distance around external surface<br />
* '''Max Thick 2D''': Maximum thickness determined by local thickness in 2D<br />
* '''Mean Thick 2D''': Mean thickness determined by local thickness in 2D<br />
* '''SD Thick 2D''': Standard deviation of the mean thickness determined by local thickness in 2D<br />
* '''Max Thick 3D''': Maximum thickness in this slice determined by local thickness in 3D<br />
* '''Mean Thick 3D''': Mean thickness in this slice determined by local thickness in 3D<br />
* '''SD Thick 3D''': Standard deviation of the mean thickness in this slice determined by local thickness in 3D Directional measurements, using Orientation directions, and the specimen's slice centroid<br />
* '''A (rad)''': Principal orientation (direction A)<br />
* '''B (rad)''': Secondary orientation (direction B)<br />
* '''IAa''': Second moment of area around Aa axis<br />
* '''IBb''': Second moment of area around Bb axis<br />
* '''ZAa''': Section modulus around Aa axis<br />
* '''ZBb''': Section modulus around Bb axis<br />
* '''RAa''': maximum chord length from Aa axis<br />
* '''RBb''': maximum chord length from Bb axis<br />
* '''DAa''': Calliper diameter in direction of Aa<br />
* '''DBb''': Calliper diameter in direction of Bb<br />
<br />
== Surface area ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Surface area''<br />
<br />
''Surface area'' creates a mesh from the bone in the image, and then calculates the area of the surface of the mesh. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Export STL file(s)''': if checked, then the meshes created from the image are saved as .stl-files. A dialog opens for you to select a folder for the files.<br />
<br />
==== Results ====<br />
* '''Surface area''': the surface area of the bone mesh<br />
* '''STL-file''': the mesh created from the bone image<br />
<br />
The surface area is reported and an .stl-file saved separately for each 3D subspace in the image. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Isosurface''<br />
<br />
== Surface fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Surface fraction''<br />
<br />
''Surface fraction'' calculates the fraction of bone volume in an image by comparing meshes created from bone particles and the whole image. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone. <br />
<br />
More formally defined, ''Surface fraction'' calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary.<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the mesh created from bone voxels.<br />
* '''Total volume''': volume of the mesh created from the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Volume fraction''<br />
<br />
== Results table ==<br />
The BoneJ plug-ins print their results into a shared result table. This is because we often need to calculate several measures for the same image, so it's handy to have them on one row. Repeated measures for the same image are reported on different rows. The results persist even if the table is closed. To clear the table run ''Plugins &gt; BoneJ &gt; Table &gt; Clear BoneJ results''.<br />
<br />
Note that some of the plug-ins (marked with ''WIP'') still use a ImageJ1 style results table that works slightly differently. As they are modernized they'll move to use the same new table than others.<br />
<br />
== Where is my favorite plug-in? ==<br />
We've decided to remove some plug-ins from BoneJ experimental. ''Neck shaft angle'', ''Plateness'' and ''Structure model index'' have been discontinued. ''Interpolate ROIs'', ''Dilate'' and ''Erode'' come pre-packaged with ImageJ, so there's no need to include them in BoneJ.<br />
<br />
Support for ''Kontron IMG'', ''Scanco ISQ'' and ''Stratec pQCT'' file formats has been moved to [[SCIFIO]]. Just run ''Edit &gt; Options &gt; ImageJ2'', and check ''Use SCIFIO when opening files''. When the option is enabled, these kinds of files can be opened from ''File > Open'' or dragging &amp; dropping them like any other format. <br />
<br />
''Distribution analysis'' and other pQCT related tools can now be downloaded independently from the [[PQCT]] update site.<br />
<br />
== Licence ==<br />
BoneJ experimental is free, open-source software. You can redistribute it and/or modify it under the terms of the [https://github.com/bonej-org/BoneJ2/blob/master/LICENCE.md BSD 2-clause license]. The software is provided "as is" and any warranties are disclaimed. In no event shall the copyright holder or contributors be liable.<br />
<br />
== Citation ==<br />
If you'd like to cite the software, we will soon publish a paper about BoneJ experimental. You can read the draft (and send us your feedback) as we're writing it [https://v1.overleaf.com/read/yxdkwpcdkjzj for Wellcome Open Research on Overleaf]. We recommend you cite the specific release used in your research.</div>Mdoubehttps://imagej.net/index.php?title=BoneJ2&diff=38563BoneJ22018-10-02T02:36:31Z<p>Mdoube: Mdoube moved page BoneJ experimental to BoneJ2</p>
<hr />
<div>{{Infobox<br />
| name = BoneJ experimental<br />
| software = ImageJ<br />
| logo = [[File:Bonej-icon.png|96px]]<br />
| author = {{Person|Michaeldoube}}, {{Person|Rdom}}, {{Person|Alessandrofelder}}<br />
| maintainer = {{Person|Michaeldoube}}, {{Person|Alessandrofelder}}<br />
| source = {{GitHub|org=bonej-org|repo=BoneJ2}}, [https://doi.org/10.5281/zenodo.1427262 doi:10.5281/zenodo.1427262]<br />
| released = Dec 11<sup>th</sup>, 2017<br />
| latest version = cuneiform-experimental-patch2, Sep 24<sup>th</sup>, 2018<br />
| status = Active, Experimental<br />
}}<br />
BoneJ is a collection of skeletal biology plug-ins for ImageJ.<br />
This is the new experimental, modernized version of the software available through the ImageJ [http://imagej.net/Updater updater]. Its update site is called [http://sites.imagej.net/BoneJ BoneJ experimental]. For the old ImageJ1 version, see [[BoneJ]].<br />
<br />
This version works with the latest Fiji, and complies with the modern ImageJ [[architecture]]. Most plug-ins also now support hyperstacks, i.e. images with multiple channels or time frames.<br />
<br />
As the code is still experimental, it's still likely to change a lot. This means any scripts using the code might break, results can change, and plug-ins gain and lose parameters. Tools marked with ''WIP'' (work in progress), are more likely to undergo large changes. <br />
<br />
Below is the documentation for the plug-ins included in BoneJ experimental.<br />
<br />
== Installation ==<br />
[[File:Install-bonej.png|400 px|Installation steps]]<br />
# [http://imagej.net/Downloads Download] the latest version of Fiji for your operating system<br />
# Launch Fiji<br />
# Select in the menu ''Help'' &gt; ''Update...''<br />
# Click ''Manage update sites''<br />
# Check ''BoneJ experimental''<br />
# Click ''Close''<br />
# Click ''Apply changes''<br />
After the downloads have finished, close and restart Fiji.<br />
<br />
== Analyse skeleton ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyse skeleton''.<br />
<br />
This plug-in simply includes [[AnalyzeSkeleton]] in BoneJ. It adds some additional validation to check that your image suits the tool. It also skeletonizes your image by calling [[Skeletonize3D]] if needed.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[AnalyzeSkeleton]].<br />
<br />
== Anisotropy ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Anisotropy''.<br />
<br />
Anisotropy is used to quantify the directionality of trabecular bone. It tells whether the trabeculae have a certain orientation, or if they're randomly aligned. The method to measure anisotropy is fairly complex and consists of multiple steps:<br />
<br />
# Find mean intercept length (MIL) vectors from <math>n</math> directions<br />
# Plot MIL vectors into a point cloud<br />
# Solve the equation of an ellipsoid that best fits the point cloud<br />
# Calculate the degree of anisotropy from the radii of the ellipsoid<br />
<br />
It's important to note that algorithm is stochastic and does not guarantee exact results. Thus it's recommended to run it several times to establish the degree of anisotropy in your image.<br />
<br />
[[File:PhaseChanges.png|left|150 px|The red dots mark phase changes]]<br />
<br />
In the first step the algorithm draws parallel lines over the input image in direction <math>\mathbf{v}</math>. The direction is chosen randomly. Each line segment in the image stack is sampled to find points where it changes from background to foreground, i.e. where the line enters an object. The points are called ''phase changes'', in the adjacent figure they're marked with red dots. After the sampling is complete, the algorithm forms a ''MIL vector'', whose length is the total length of the line segments divided by the total number of phase changes found. The MIL vector has the same direction as <math>\mathbf{v}</math>. Drawing and sampling the lines is repeated for <math>n</math> directions, and the method creates <math>n</math> MIL vectors.<br />
<br />
After the MIL vectors have been calculated, they are added to a point cloud (a collection of points) around the origin. Then the method tries solve the equation of an ellipsoid that would fit the cloud. There may be no solution, especially if there are few points. That is, the fitting may fail at which point the plug-in stops. The radii of this ellipsoid determine the degree of anisotropy (see [http://imagej.net/index.php?title=BoneJ_experimental&action=submit#Results results]).<br />
<br />
[[File:MilCube.png|right|200 px|Projecting lines from a plane]]<br />
<br />
In more detail, the lines in the first step are projected from a <math>d * d</math> plane with normal <math>\mathbf{v}</math> (see the adjacent figure). The size <math>d = \sqrt{w^{2} + h^{2} + d^{2}}</math>, where <math>w, h, d</math> are the dimensions of the image stack. Each of the lines originates from a random point <math>\mathbf{o}</math> on the plane. The plane is divided into <math>m * m</math> same-sized sections, where <math>m</math> is a number selected by the user (i.e. ''Lines per dimension''). One origin <math>\mathbf{o}</math> is randomly selected from within each section. The lines are projected until they intercept the stack edges at points <math>\mathbf{o} + t_{min}\mathbf{v}</math>,<math>\mathbf{o} + t_{max}\mathbf{v}</math> (the algorithm solves for <math>t_{min}</math>, <math>t_{max}</math>). These line segments within the stack are then sampled for phase changes. In this drawing method some lines may miss the image stack completely, but conversely there aren't any areas in the stack that don't have an equal chance of being sampled.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
The plug-in is intended to analyse the "texture" of an object thus it suits samples of a larger whole, e.g. a trabecular cube that fills the whole stack. The results for whole objects such as the pre-packaged ''Bat Cochlea Volume'' ImageJ sample image are not really meaningful.<br />
<br />
==== Parameters ====<br />
* '''Directions''': number of times sampling is performed from different directions. The minimum is <math>9</math>, because that's how many independent variables the algorithm needs to solve the "shape" of the orientation in the image.<br />
* '''Lines per dimension''': controls how many parallel lines are drawn per each direction. For example, if ''lines per dimension'' is <math>2</math> then ''Anisotropy'' draws <math>4</math> lines. In this case, the origin points of the lines are randomly selected from within the <math>4</math> equal sections of the sampling plane (see above detailed explanation). The number is squared, because the location of the origins can vary in two dimensions.<br />
<br />
then the plane is divided into <math>4</math> equal sections, and a line is drawn from each. The origin point of each line is randomly located within their section.<br />
* '''Sampling increment''': controls how often each line is sampled. The default is <math>1.0</math>, which means that after each step a unit vector (a <math>1\_px</math> long line) is added to the position along a sampling line. The number of samples taken per line depends on the length of the line segment within the image stack.<br />
* '''Recommended minimum''': if checked, then the above three parameters are set to the recommended minimum values. In our tests we found that with these values the results are quite stable, and fitting unlikely to fail. However, these minimums are not guaranteed to be the best settings for your image.<br />
* '''Show radii''': if checked, then the radii of the fitted ellipsoid are shown in the results table.<br />
<br />
==== Results ====<br />
* '''Degree of anisotropy''': how much orientation there is in the structure. <math>0.0</math> means the image is completely isotropic, the sample has no directionality whatsoever. <math>1.0</math> means there is very strong orientation in the structure of the image. Note that these are theoretical minimum and maximum values. Due the stochastic nature of the algorithm, even an empty stack will have non-zero degree of anisotropy.<br />
* '''Radii of fitted ellipsoid''' (optional): the lengths of the radii <math>a \leq b \leq c</math> of the ellipsoid fitted on the MIL points. Degree of anisotropy <math>= 1.0 - a/c</math>.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* The results of this Anisotropy do not stabilize, so it's not repeated automatically like in BoneJ1. However, the results vary less between runs.<br />
* MIL vectors are drawn differently. In BoneJ1 they're drawn in sphere-shapes around random seed points. Here parallel lines from different directions are drawn through the whole stack. We think this method produces more uniform sampling, i.e. there's less chance of a directional bias.<br />
<br />
==== Related publications ====<br />
* Odgaard A (1997), ''Three-dimensional methods for quantification of cancellous bone architecture'', Bone, 20, 315-328, [http://dx.doi.org/10.1016/S8756-3282(97)00007-0 doi:10.1016/S8756-3282(97)00007-0]<br />
* Harrigan TP, Mann RW (1984), ''Characterization of microstructural anisotropy in orthotropic materials using a second rank tensor'', J Mater Sci, 19, 761-767, [http://dx.doi.org/10.1007/BF00540446 doi:10.1007/BF00540446]<br />
<br />
== Area/Volume fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Area/Volume fraction''<br />
<br />
''Area/Volume fraction'' calculates the fraction of bone in an image by it to the whole image. It counts all the foreground voxels, which it assumes represent bone, and compares them to the total number of voxels in the image. More formally defined, the plug-in calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''. In case of a 2D image, it calculates the fraction ''BA/TA'', which is the area of bone per unit area of the sample.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the bone voxels.<br />
* '''Total volume''': volume of the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 2D/3D subspace in the image, i.e. for each channel and time frame. Results will be for ''area'' if image is 2D.<br />
<br />
==== Differences to BoneJ1 ====<br />
* In BoneJ1 the plug-in was called ''Volume fraction''<br />
* Can process 2D images<br />
* Supports hyperstacks <br />
<br />
== Calibrate SCANCO (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyze &gt; Calibrate SCANCO''<br />
<br />
Applies the ''mg HA/ccm'' pixel value calibration, i.e. ''HU'' or Hounfield unit calibration stored in the .isq format metadata to the image.<br />
<br />
==== Suitable images ====<br />
An .isq format image generated by Scanco X-ray microtomography scanners.<br />
<br />
== Check voxel depth (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Check Voxel Depth''<br />
<br />
Checks whether slice spacing has been calibrated correctly. Some DICOM images contain slice thickness data in the header information, but thickness is not necessarily the same as the physical distance between consecutive slices' positions.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Connectivity ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Connectivity''.<br />
<br />
The Connectivity plug-in is designed to estimate the number of connected structures i.e. trabeculae in a trabecular network. This ''connectivity'' measure is related to a topological number <math>\chi</math> known as ''Euler characteristic'', ''Euler number'' or ''Euler-Poincaré characteristic''. Mathematically defined connectivity is <math>= 1 - (\chi + \Delta\chi)</math>. Roughly speaking, <math>\chi</math> describes the shape or structure of a topological space. It can also be expressed as <math>\chi = objects - handles + cavities</math>, where a handle is a hole that goes through an object (e.g the hole in a doughnut, or the ear of a coffee mug), and a cavity is enclosed inside one. When measuring trabecular cubes, you need to add <math>\Delta\chi</math> to <math>\chi</math> to get a more accurate estimate of the connectivity of the whole network. The term <math>\Delta\chi</math> corrects for the change in the topology of an object, when it's cut to pieces. <br />
<br />
NB some other Euler characteristic implementations report <math>\chi + \Delta\chi</math> as <math>\chi</math>, i.e. in them the correction <math>\Delta\chi</math> is implicit.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary. The plug-in assumes that there is only one particle in the foreground; to achieve this, run ''Purify''. Having more than one object often leads to negative connectivity.<br />
<br />
==== Results ====<br />
* '''Euler characteristic (χ)''': describes the shape of the object(s) in the image, <math>\chi = objects - handles + cavities</math>.<br />
* '''Corrected Euler (χ + Δχ)''': the Euler characteristic of the part corrected for edge effects to fit the whole.<br />
* '''Connectivity''': gives an estimate of the number of connected trabeculae in the image. Equal to <math>1 - (\chi + \Delta\chi)</math>.<br />
* '''Conn. density''': connectivity divided by unit volume. <br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* The old version reported ''Corrected Euler (χ + Δχ)'' incorrectly as ''Δχ''<br />
<br />
==== Related publications ====<br />
* Odgaard A, Gundersen HJG (1993), ''Quantification of connectivity in cancellous bone, with special emphasis on 3-D reconstructions'', Bone 14: 173-182, [http://dx.doi.org/10.1016/8756-3282(93)90245-6 doi:10.1016/8756-3282(93)90245-6.]<br />
* Toriwaki J, Yonekura T (2002), ''Euler number and connectivity indexes of a three dimensional digital picture'', [http://www.scipress.org/journals/forma/abstract/1703/17030183.html Forma 17: 183-209]<br />
<br />
== Delete slice range (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Delete slice range''<br />
<br />
Removes a range of slices from a stack, so that cropping in the Z direction is practical.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Ellipsoid factor (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Ellipsoid factor''.<br />
<br />
Ellipsoid Factor is a new method for measuring rod/plate geometry. It uses the axis lengths from prolate, oblate and intermediate elipsoids to determine how prolate or oblate the trabecular space is at a particular point. Highly prolate (javelin-shaped, rod-like) ellipsoids have a single long axis (<math>c</math>) and two short axes (<math>a, b</math>) such that <math>a < b \ll c</math> , whereas highly oblate (discus-shaped, plate-like) ellipsoids have two longer axes (<math>b, c</math>) and one much shorter axis (<math>a</math>) so that <math>a \ll b < c</math>. Calculating <math>EF</math> as the difference in ratios, <math>EF = a/b - b/c</math> leads to a useful scale ranging from <math>-1</math> (oblate, <math>a/b \approx 0, b/c \approx 1</math>) to <math>+1</math> (prolate, <math>a/b \approx 1, b/c \approx 0</math>). <math>EF</math> of <math>0</math> indicates an intermediate ellipsoid where <math>a/b = b/c</math>, which is the case for spheres (<math>a = b = c</math>) and other ellipsoids with axis ratios <math>a:qa:q^{2}a</math>. Ellipsoid Factor runs [[Skeletonize3D]] to get the medial axis of the trabeculae, which is used as the seed for sampling. Ellipsoids are seeded from each voxel on the medial axis. A combination of dilation, contraction, rotation and a small amount of translation is run iteratively until the ellipsoid increases no further in volume.<br />
<br />
The EF at a point in the structure is determined as the EF of the most voluminous ellipsoid which contains that point.<br />
<br />
If you use Ellipsoid Factor in your work, please cite:<br />
Doube M (2015), ''The Ellipsoid Factor for quantification of rods, plates and intermediate forms in 3D geometries'', Frontiers in Endocrinology, 6:15, [http://journal.frontiersin.org/Journal/10.3389/fendo.2015.00015/abstract doi: 10.3389/fendo.2015.00015]<br />
<br />
==== Suitable images ====<br />
A binary 3D image.<br />
<br />
==== Parameters ====<br />
* '''Sampling increment''': distance between sample points on each vector; should be less than the pixel spacing.<br />
* '''Vectors''': number of vectors to sample at each seed point.<br />
* '''Skeleton points per ellipsoid''': allows dense or sparse sampling, a value of <math>1</math> means that an ellipsoid is sampled at every seed point.<br />
* '''Contact sensitivity''': how many vectors must touch the background before dilation stops.<br />
* '''Maximum iterations''': how hard to try to find larger ellipsoids - fitting will stop if no improvement has been made after this number of iterations..<br />
* '''Maximum drift''': how far the centroid may be displaced from its seed point.<br />
* '''EF image''': stack containing EF values for each point contained by at least one ellipsoid and NaN elsewhere.<br />
* '''Ellipsoid ID image''': stack containing the ID of the biggest ellipsoid at each point, ranked in descending order (<math>0</math> is the largest ellipsoid).<br />
* '''Volume image''': image showing the volume of the largest ellipsoid containing that point.<br />
* '''Axis ratio images''': images showing <math>a/b</math> and <math>b/c</math> ratios foreach point containing at least one ellipsoid and NaN elsewhere.<br />
* '''Flinn peak plot''': plot of <math>a/b</math> vs <math>b/c</math> weighted by volume, so bright pixels indicate relatively more of the structure has that axis ratio.<br />
* '''Gaussian sigma:''' amount to blur the Flinn peak plot - set to <math>0</math> for a precise but less 'beautiful' result.<br />
* '''Flinn plot''': unweighted Flinn plot - every ellipsoid is represented by the same sized point regardless of ellipsoid size.<br />
<br />
==== Results ====<br />
* '''EF image''': stack containing EF values. NaN (not a number) values are used in the background. Summary statistics can be obtained by running Analyze > Histogram<br />
* '''Short-Mid image''': stack containing the <math>a/b</math> ratios<br />
* '''Mid-Long image''': stack contining the <math>b/c</math> ratios<br />
* '''Volume image''': stack containing ellipsoid volumes<br />
* '''Max id image''': stack containing the ID of the largest ellipsoid at each point; IDs relate to the sort order based on volume, so ID = 0 is the largest ellipsoid. <math>-1</math> is foreground and background is labelled with a large negative number.<br />
* '''Flinn diagram''': plot of <math>a/b</math> versus <math>b/c</math> values present in the volume<br />
* '''Weighted Flinn plot''': Flinn diagram with peaks of intensity proportional to volume occupied by each (<math>a/b</math>, <math>b/c</math>) ratio<br />
<br />
==== Related publications ====<br />
Salmon PL, Ohlsson C, Shefelbine SJ, Doube M (2015), ''Structure model index does not measure rods and plates in trabecular bone'', Frontiers in Endocrinology, 6:162, [http://dx.doi.org/10.3389/fendo.2015.00162 doi:10.3389/fendo.2015.00162].<br />
<br />
== Fit ellipsoid ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit ellipsoid''.<br />
<br />
Finds the ellipsoid that best fits a set of point or multi-point ROIs in the ROI Manager. ''Fit ellipsoid'' may fail to fit an ellipsoid. The more points you add, the more likely it is to succeed. Points are scaled to the spatial calibration (voxel widht, height &amp; depth) of the input image.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': ROIs with at least nine points in the ROI Manager.<br />
<br />
==== Results ====<br />
* '''Radii''': the radii ''a'', ''b'' and ''c'' of the fitted ellipsoid. Radius ''a'' is the shortest and ''c'' the longest.<br />
* '''Centroid''': ''x'', ''y'' and ''z'' coordinates of the ellipsoid centre point.<br />
<br />
==== Differences from BoneJ1 ====<br />
* Supports multi-point ROIs.<br />
* Plug-in cancels if an ellipsoid can't be found, instead of reporting invalid results.<br />
<br />
== Fit sphere (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit sphere''.<br />
<br />
Finds the sphere that best fits a set of point ROIs, and optionally displays the image data bounded by the sphere in a new image window. Place a set of point ROIs on structures of interest, hitting [T] to add each point to the ROI Manager. Fit Sphere takes the coordinates of the points from the ROI Manager and applies a least-squares optimisation.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': populated with at least 5 point ROI's<br />
* '''Copy Sphere''': Create a new stack containing image data from within the best-fit sphere.<br />
* '''Padding''': Number of black pixels to put between the sphere and the sides of the image<br />
* '''Inner Cube''': Create a new stack containing image data from the cube that just fits inside the best-fit sphere.<br />
* '''Outer Cube''': Create a new stack containing image data from the cube that the best-fit sphere just fits inside.<br />
* '''Crop Factor''': Radius used for generating new images is multiplied by crop factor so that a bigger or smaller volume can be produced.<br />
* '''Add to ROI Manager''': Add the sphere to the ROI Manager as a set of circular ROIs<br />
* '''Clear ROI Manager''': Clear any existing ROIs in the Manager prior to adding circles<br />
<br />
==== Results ====<br />
* '''X Centroid''': x-coordinate of sphere's centroid<br />
* '''Y Centroid''': y-coordinate of sphere's centroid<br />
* '''Z Centroid''': z-coordinate of sphere's centroid<br />
* '''Radius''': length of radius<br />
* '''Images (optional)''': images containing a copy of the original data within the sphere, or within cubes bounding or bounded by the sphere.<br />
<br />
== Fractal dimension ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fractal dimension''.<br />
<br />
This plug-in estimates the fractal dimension of an image by applying the box-counting algorithm. In this algorithm grids of diminishing size are scanned over the image, and the number of boxes containing at least one foreground voxel is counted. As the box size decreases and the grid becomes finer, the proportion of foreground boxes increases in a fractal structure. See [https://en.wikipedia.org/wiki/Box_counting Wikipedia] for further details. BoneJ uses a fixed-grid scan, with an option to try to find the optimal covering.<br />
<br />
The box counting algorithm produces a pair of <math>(log(n), -log(m))</math> values for each iteration it runs. Here n = number of boxes with foreground, and m = box size. These pairs are passed to a curve-fitting algorithm, which returns the slope of the linear function which describes them ([https://en.wikipedia.org/wiki/Linear_regression regression fit]). The coefficient of this slope is the fractal dimension.<br />
<br />
Fractal dimension is markedly influenced by the parameters selected for the box counting algorithm, so it's worth running it several times with different values to find an accurate measure for your image.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* ''Starting box size (px)'': the size (sides) in pixels of a box in the sampling grid in the first iteration of the algorithm.<br />
* ''Smallest box size (px)'': the minimum size in pixels of a box in the grid. When box size becomes smaller than this limit, the algorithm iterates one more time, and then stops.<br />
* ''Box scaling factor'': the term used to divide the box size after iteration. For example, a scaling factor of <math>2.0</math> halves the size at each step.<br />
* ''Grid translations'': how many times at each iteration the grid is moved to try to the find the optimal covering. The optimal covering covers the objects in the image with the least amount of boxes. The larger the parameter the more likely it is that optimal covering is found. However, this slows down the plug-in considerably.<br />
* ''Automatic parameters'': if checked, then the plug-in runs with default parameters.<br />
* ''Show points'': if checked, then the plug-in displays the <math>(log(n), -log(m))</math> values it calculated. <br />
<br />
==== Results ====<br />
* ''Fractal dimension'': the [https://en.wikipedia.org/wiki/Fractal_dimension fractal dimension] of the image. For example, the Koch snow flake has a fractal dimension of 1.262.<br />
* ''R²'': the [https://en.wikipedia.org/wiki/Coefficient_of_determination coefficient of determination] of the line fitted to the <math>(log(n), -log(m))</math> points.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* Algorithm parameters can be changed by the user.<br />
<br />
==== Related publications ====<br />
Fazzalari NL, Parkinson IH (1996), ''Fractal dimension and architecture of trabecular bone'', J Pathol, 178: 100-5, [http://dx.doi.org/10.1002/(SICI)1096-9896(199601)178:1%3C100::AID-PATH429%3E3.0.CO;2-K doi:10.1002/(SICI)1096-9896(199601)178:1<100::AID-PATH429>3.0.CO;2-K].<br />
<br />
== Inter-trabecular angles ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Inter-trabecular Angles''.<br />
<br />
The plug-in was designed to analyse the angles between trabeculae of cancellous bone. First it calls [[Skeletonize3D]] to thin the input image (if necessary). Then it calls [[AnalyzeSkeleton]], which creates a graph of the largest skeleton (by number of nodes) in the thinned image. The graph consists of nodes and the edges that connect them. Nodes are also known as vertices, and edges as branches. Roughly speaking the edges correspond to trabeculae and the nodes to the junction points, where trabeuculae meet.<br />
<br />
The graph is often not a perfect representation of the trabecular network in the input image. ''Inter-trabecular angles'' offers many options to adjust the graph's topology and filter out artefacts that may obfuscate or skew the results. First it allows you to filter out nodes with too many or too few edges. Secondly it can be used to prune very short edges, which often do not represent actual trabeculae. <br />
<br />
[[File:Ita_types.png|left|150 px|Types of edges in pruning]]<br />
Pruning works differently for different types of edges. There are four kinds: outer, dead-end, inner and short. An outer edge doesn't interconnect different parts of a graph. In other words, one (and only one) of its endpoints connects to only one branch, i.e. the edge itself. In the figure the outer edge is colored black. A dead-end (blue) is an outer edge whose length is less than the minimum set by the user, i.e. it's a short, outer edge. An inner edge (green) connects to end points with more than one branch. A short edge is an inner edge, whose length is less than the set minimum. When a dead-end is pruned, it with its "lonely" end-point are removed from the graph. When a short edge is pruned, it and it's endpoints are removed, and a new node is placed at the midpoint of the former. This new node connects to all the branches the previous nodes connected to.<br />
<br />
''Inter-trabecular angles'' offers two further options to control pruning: ''iteration'' and ''clustering''. Iteration repeats pruning until no new short edges are found. Sometimes pruning can create new short edges, and thus the graph may still have them after one iteration. However, iteration can alter the structure of the graph too dramatically. Clustering searches for all nodes connected by short edges, before removing any. In the figure, clustering pruning would remove the four nodes and the red edges between them in one go. It would create a new node at the center of the previous four, and connect it to the blue and green edges. When pruning is not clustering, it removes edges one-by-one. This changes the end result depending on the order the edges are traversed. Clustering creates the same result each time. <br />
<br />
Pruning also removes loops and redundant parallel edges. The former connects to the same node on both ends, and the latter connects two nodes that are already connected by another edge. <br />
<br />
The pruning and filtering features were added so that we can replicate and continue from the research of [https://doi.org/10.1016/j.actbio.2016.08.040 Reznikov et al.]<br />
<br />
==== Suitable images ====<br />
An 8-bit, binary 2D or 3D image. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
*'''Minimum valence''': minimum number of branches for a node to be included in the analysis.<br />
*'''Maximum valence''': maximum number of branches for a node to be included in the analysis.<br />
*'''Minimum trabecular length (px)''': minimum length for a branch to be preserved in the pruning. Length is calculated as the distance between the endpoints of a branch.<br />
** This length is also displayed in the units of the image calibration<br />
*'''Margin (px)''': minimum distance of a node from image stack edges to be included in the analysis. Having nodes too close to the edges can make the results less accurate, because you get more branches that do not terminate to a node at the other end.<br />
*'''Iterate pruning''': repeat pruning until no more new short branches are discovered. When true, the topology of the graph is likely to change more in the pruning.<br />
*'''Use clusters''': if true then the pruning result is independent of the order in which the graph is traversed. False corresponds with methodology in Reznikov's article. See above for more details.<br />
*'''Print centroids''': Print the centroids (center coordinates) of the node pairs at the ends of each edge.<br />
*'''Print % culled edges''': Print statistics of different types of edges pruned.<br />
<br />
==== Results ====<br />
*'''Inter-trabecular angles''': angles between each branch of each node included in the analysis. Sorted into columns according to the number of branches per node. For example, column ''"3"'' shows the angles between branches of nodes with three branches.<br />
*'''Centroids''' (optional): A table of the center coordinates of the node pairs at the ends of each edge.<br />
*'''Culled edge percentages''' (optional): A table showing the percentages of different kinds of edges pruned, compared to the total number of edges in the analysed graph.<br />
*'''Skeleton''' (optional): if the plug-in had to skeletonise the input image, it displays the result of the thinning.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Inter-trabecular angles generalizes the idea of ''Triple point angles'' for any types of points. It also provides more tools for adjusting the graph for analysis.<br />
<br />
==== Related publications ====<br />
Reznikov, N et al. (2016), ''Inter-trabecular angle: A parameter of trabecular bone architecture in the human proximal femur that reveals underlying topological motifs'', Acta Biomaterialia, 44: 65--72, [https://doi.org/10.1016/j.actbio.2016.08.040 doi:j.actbio.2016.08.040].<br />
<br />
== Local thickness ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Thickness''.<br />
<br />
This plug-in includes [[Local_Thickness]] in BoneJ, and provides some additional options &amp; results. Local thickness measures ''the diameter of the largest sphere that fits inside the object and contains the point'' for each point i.e. foreground voxel in an image. The plug-in calculates mean and standard deviation of the trabecular thickness (Tb.Th) or trabecular spacing (Tb.Sp) directly from pixel values in the resulting thickness map. Foreground voxels are considered trabeculae, and background voxels are the spacing. Processing time is heavily dependent on feature size (in pixels); large features can take a very long time to process.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
* '''Calculate''': chooses which thickness maps to calculate - trabecular thickness, trabecular spacing, or both. In order to calculate trabecular spacing, the image voxels are inverted.<br />
* '''Show thickness maps''': display the calculated thickness maps or not.<br />
* '''Mask thickness maps''': remove artifacts from the thickness maps. Artifacts are foreground voxels not present in the original image.<br />
* '''Crop to ROI manager''': create thickness maps only from the area bounded by the ROIs in the ROI manager. Checking this option requires you've added ROIs to the ROI manager.<br />
<br />
==== Results ====<br />
* The mean and standard deviation for each thickness map calculated.<br />
* Displays thickness map images if ''Show thickness maps'' was selected. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Calls the latest version of [[Local_Thickness]].<br />
* Thickness values for background voxels are marked ''NaN'' instead of ''0''.<br />
<br />
==== Related publications ====<br />
* Dougherty R, Kunzelmann K (2007), ''Computing local thickness of 3D structures with ImageJ'', Microsc. Microanal., 13: 1678-1679, [http://dx.doi.org/10.1017/S1431927607074430 doi:10.1017/S1431927607074430]<br />
* Hildebrand T, Rüegsegger P (1997), ''A new method for the model-independent assessment of thickness in three-dimensional images'', J. Microsc., 185: 67-75, [http://dx.doi.org/10.1046/j.1365-2818.1997.1340694.x doi:10.1046/j.1365-2818.1997.1340694.x]<br />
<br />
== Moments of inertia (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Moments of Inertia''<br />
<br />
Calculates the three orthogonal principal axes and moments of inertia around those axes. It includes pixels with values between upper and lower limits, which can be defined in terms of unitless grey values or Hounsfield units (HU). It optionally creates a new stack with the image centred and rotated so that the principal axes are parallel to the image stack's x, y and z axes. Calculations are limited to a rectangular ROI if one is drawn. The plugin will guess whether the image is HU calibrated, and if so, apply HU limits of bone (0-4000 HU), otherwise it will calculate auto-thresholds based on the stack's histogram. If a calibration curve is known, the coefficients can be added to get weighted calculations. Aligning a bone with Moments of Inertia may be a useful step prior to Slice Geometry if bones are not aligned with the image z axis.<br />
<br />
==== Suitable images ====<br />
An 8-bit or 16-bit image.<br />
<br />
==== Parameters ====<br />
* '''Start slice''': First slice to include in calculations<br />
* '''End slice''': Last slice to include in calculations<br />
* '''HU Calibrated''': Plugin will guess whether the image is HU calibrated. If image is HU calibrated, make sure the box is checked and enter HU calibrated numeric values in the following fields<br />
* '''Bone Min''': Lower threshold, in either uncalibrated greys or HU<br />
* '''Bone Max''': Upper threshold, in either uncalibrated greys or HU<br />
* '''Slope''': m where physical density = m × pixel value + c<br />
* '''Y Intercept''': c where physical density = m × pixel value + c<br />
* '''Align result''': Draw a new stack with the principal axes parallel to the image axes<br />
* '''Show axes (2D)''': Draw the axes in white on the aligned image<br />
* '''Show axes (3D)''': Display the stack and its principal axes in a 3D Viewer window<br />
<br />
==== Results ====<br />
* '''Image (optional)''': a copy of the input image centered and aligned with the principal axes<br />
* '''Xc''': Centroid x-coordinate (mass-weighted by calibrated density)<br />
* '''Yc''': Centroid y-coordinate<br />
* '''Zc''': Centroid z-coordinate<br />
* '''Vol''': Total volume of thresholded voxels<br />
* '''Mass''': Mass of bone, from pixel values and density calibration coefficients<br />
* '''Icxx''': Moment around x axis passing through centroid<br />
* '''Icyy''': Moment around y axis passing through centroid<br />
* '''Iczz''': Moment around z axis passing through centroid<br />
* '''Icxy''': Off-axis term for constructing inertia tensor<br />
* '''Icxz''': Off-axis term for constructing inertia tensor<br />
* '''Icyz''': Off-axis term for constructing inertia tensor<br />
* '''I1''': Moment around the shortest principal axis<br />
* '''I2''': Moment around the middle principal axis<br />
* '''I3''': Moment around the longest principal axis<br />
* '''Verbose output in Log window'''<br />
** '''Eigenvalues''': Result of of eigenvalue decomposition. Moments of inertia<br />
** '''Eigenvectors of principal axes''': orientation of input image<br />
** '''Inverse eigenvector matrix''': used to map voxel positions in the aligned image back to voxel positions in the original image<br />
* Optional 3D display of principal axes<br />
<br />
== Optimise threshold (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Optimise Threshold''<br />
<br />
Several histogram-based methods exist for automatic determination of threshold for binary segmentation, but in ImageJ these are currently limited to pixel values in a single slice. The result can be excluding high values in a stack that are higher than the highest value in the current slice. This plugin uses all the pixels in a stack to construct a histogram and uses ImageJ's built-in isodata algorithm to determine the threshold. It optionally tests values either side of the initial auto-threshold for connectivity, because connectivity is very sensitive to image noise. The plugin attempts to find the threshold that results in minimal connectivity. Purification, erosion and dilation can improve the connectivity estimate, so Purify is always called, and erosion and dilation are applied as part of a sequence: purify, erode, purify, dilate.<br />
<br />
==== Suitable images ====<br />
An 8-bit of 16-bit image<br />
<br />
==== Parameters ====<br />
* '''Threshold Only''': Determine the threshold from the stack histogram only<br />
* '''Apply Threshold''': Replace the input image with a thresholded version<br />
* '''Show Plot''': Display a graph showing connectivity versus threshold<br />
* '''Tests''': Number of different thresholds to test for connectivity<br />
* '''Range''': Proportion of the initial threshold to test above and below initial thresholds<br />
* '''Subvolume Size''': Size of the volume to test for connectivity. Set small for a faster run and large to test the whole stack<br />
* '''Erosion Cycles''': Number of times to erode the stack after initial purification<br />
* '''Dilation Cycles''': Number of times to dilate the stack after secondary purification<br />
<br />
==== Results ====<br />
* '''Thresholded stack (optional)'''<br />
* '''Plot of connectivity versus threshold (optional)'''<br />
* '''Log of optimal threshold value'''<br />
<br />
== Orientation (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Orientation''<br />
<br />
Sets the direction in a 2D image, without rotating the image or changing it in any way. ''Slice Geometry'' (see below) uses ''Orientation'' to calculate diameter, second moments of area and section moduli around anatomic axes set by the user.<br />
<br />
==== Suitable images ====<br />
A 2D image.<br />
<br />
==== Parameters ====<br />
* '''Orientation''': input field displays current orientation (clockwise from 12 o'clock) and takes keyboard input<br />
* '''deg / rad''': display and set orientation in degrees or radians<br />
* '''Principal direction''': the main direction, the head of which is displayed in red<br />
* '''Secondary direction''': the orthogonal direction<br />
* '''Reflect''': swap the labels on this axis<br />
<br />
==== Results ====<br />
* '''Orientation axes''': draws the axes of the orientation on the image.<br />
<br />
== Purify (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Purify''<br />
<br />
Purify locates all particles in 3D and removes all but the largest foreground and background particles.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary.<br />
<br />
==== Parameters ====<br />
* '''Labelling algorithm''':<br />
** '''Mapped''': Non-recursive, memory efficient and fast.<br />
** '''Multithreaded''': use multiple cores and job chunking to reduce recursion. Fast on small stacks and if you have many CPU cores.<br />
** '''Linear''': Non-recursive but heavy on RAM and single-threaded. Fast on big stacks, but only if you have the memory.<br />
* '''Chunk Size''': number of slices to use in each particle labelling thread. If images are large, set this to 2<br />
* '''Performance Log''': Show verbose performance information to help tune your system<br />
* '''Make copy''': If checked, shows the result in a new window; if unchecked the result replaces the original image.<br />
<br />
==== Results ====<br />
* '''Performance metrics (optional)'''<br />
** '''Threads''': Number of CPU cores used<br />
** '''Slices''': Number of slices in the input image stack<br />
** '''Chunks''': Number of chunks of slices, each chunk is processed independently<br />
** '''Chunk size''': Number of slices per chunk<br />
** '''Last chunk size''': size of the last chunk (the remainder chunk)<br />
** '''Duration''': time in seconds to complete purification<br />
* '''Purified image''': optionally in a new image window.<br />
<br />
== Skeletonise ==<br />
Menu path ''Plugins &gt; BoneJ &gt;Skeletonise''.<br />
<br />
This plug-in simply includes [[Skeletonize3D]] in BoneJ. It adds some additional validation to check that your image suits the tool.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[Skeletonize3D]].<br />
<br />
== Slice geometry (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Slice Geometry''<br />
<br />
Slice Geometry calculates cross-sectional geometric properties of shapes: cross-sectional area, centroid, mean density, second moment of area, section modulus, Feret diameter and local thickness (2D and 3D). Measurements can be limited to a rectangular ROI. If your bone is not well aligned with the image axes, you may find it useful to align the bone to its principal axes using Moments of Inertia or by exporting a transformed volume from the ImageJ 3D Viewer. Importantly, no assumption of geometry is made for any of the measurements.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Bone''': Slice Geometry will guess from your image title the bone it is working on. If it is wrong, correct it. If your bone of interest isn't listed, email me.<br />
* '''2D Thickness''': Run Thickness on a per-slice basis; this fits circles rather than spheres<br />
* '''3D Thickness''': Run Thickness on the whole stack, fitting spheres, then report results per slice<br />
* '''Draw Axes''': Draw axes on an annotated copy of the stack<br />
* '''Draw Centroids''': Draw centroids on an annotated copy of the stack<br />
* '''Annotated Copy (2D)''': Create a new stack showing the centroids and principal axes<br />
* '''3D Annotation''': Display the stack, principal axes and centroids in the 3D viewer<br />
* '''Process Stack''': Calculate parameters for all slices in the stack<br />
* '''Clear Results''': Remove all data in the results table without saving, prior to calculating parameters<br />
* '''Use Orientation''': Also calculate parameters based on directions defined in Orientation<br />
* '''HU Calibrated''': Allows you to enter your thresholds in Hounsfield units (HU) or uncalibrated units<br />
* '''Bone Min''': minimum pixel value to use in calculations<br />
* '''Bone Max''': maximum pixel value to use in calculations<br />
* '''Slope''': <math>m</math> where physical density <math>= m * pixel value + c</math><br />
* '''Y Intercept''': <math>c</math> where physical density <math>= m * pixel value + c</math><br />
* '''Note''': density-weighted calculations are only applied to centroid determination at present<br />
* '''Partial volume compensation''': Use model that assumes Gaussian blur of imaging modality and linear transform between pixel value and sample 'density' to correct for blurred and pixelated images (e.g. small bone in clinical CT)<br />
* '''Background''': pixel value that corresponds to zero bone density (could be the 'fat', 'air' or 'muscle' pixel value)<br />
* '''Foreground''': pixel value that corresponds to 100% bone density<br />
* '''A rectangular ROI (optional)''': if there's a ROI, calculations are limited to its area.<br />
<br />
==== Results ====<br />
* '''Images (optional)''': displays the result images selected in the parameters<br />
* '''Bone code''': Unique numeric identifier for the anatomic name of each bone. Further bone codes can be added to BoneJ on request<br />
* '''Slice''': slice number indicating which slice contributed image data for this row of the results<br />
* '''CSA''': cross-sectional area<br />
* '''X cent.''': Centroid x-coordinate<br />
* '''Y cent.''': Centroid y-coordinate<br />
* '''Density''': mean physical density, calculated from pixel values and calibration coefficients<br />
* '''wX cent''': Density-weighted x-coordinate of centroid<br />
* '''wY cent''': Density-weighted y-coordinate of centroid<br />
* '''Theta''': angle of minor axis (axis for Imin, the long axis of your specimen's cross section) from the horizontal, ranging from <math>-\pi/2</math> to <math>\pi/2</math>, with positive as clockwise<br />
* '''R1''': maximum chord length from minor axis<br />
* '''R2''': maximum chord length from major axis<br />
* '''Imin''': Second moment of area around major axis<br />
* '''Imax''': Second moment of area around minor axis<br />
* '''Ipm''': Product moment of area (= 0 if no errors are present, e.g. due to pixelation)<br />
* '''Zmax''': Section modulus around major axis (Imax / R2)<br />
* '''Zmin''': Section modulus around minor axis (Imin / R1)<br />
* '''Zpol''': Polar section modulus<br />
* '''Feret Min''': Minimum caliper width<br />
* '''Feret Max''': Maximum caliper width<br />
* '''Feret Angle''': Orientation of maximum caliper width<br />
* '''Perimeter''': Distance around external surface<br />
* '''Max Thick 2D''': Maximum thickness determined by local thickness in 2D<br />
* '''Mean Thick 2D''': Mean thickness determined by local thickness in 2D<br />
* '''SD Thick 2D''': Standard deviation of the mean thickness determined by local thickness in 2D<br />
* '''Max Thick 3D''': Maximum thickness in this slice determined by local thickness in 3D<br />
* '''Mean Thick 3D''': Mean thickness in this slice determined by local thickness in 3D<br />
* '''SD Thick 3D''': Standard deviation of the mean thickness in this slice determined by local thickness in 3D Directional measurements, using Orientation directions, and the specimen's slice centroid<br />
* '''A (rad)''': Principal orientation (direction A)<br />
* '''B (rad)''': Secondary orientation (direction B)<br />
* '''IAa''': Second moment of area around Aa axis<br />
* '''IBb''': Second moment of area around Bb axis<br />
* '''ZAa''': Section modulus around Aa axis<br />
* '''ZBb''': Section modulus around Bb axis<br />
* '''RAa''': maximum chord length from Aa axis<br />
* '''RBb''': maximum chord length from Bb axis<br />
* '''DAa''': Calliper diameter in direction of Aa<br />
* '''DBb''': Calliper diameter in direction of Bb<br />
<br />
== Surface area ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Surface area''<br />
<br />
''Surface area'' creates a mesh from the bone in the image, and then calculates the area of the surface of the mesh. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Export STL file(s)''': if checked, then the meshes created from the image are saved as .stl-files. A dialog opens for you to select a folder for the files.<br />
<br />
==== Results ====<br />
* '''Surface area''': the surface area of the bone mesh<br />
* '''STL-file''': the mesh created from the bone image<br />
<br />
The surface area is reported and an .stl-file saved separately for each 3D subspace in the image. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Isosurface''<br />
<br />
== Surface fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Surface fraction''<br />
<br />
''Surface fraction'' calculates the fraction of bone volume in an image by comparing meshes created from bone particles and the whole image. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone. <br />
<br />
More formally defined, ''Surface fraction'' calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary.<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the mesh created from bone voxels.<br />
* '''Total volume''': volume of the mesh created from the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Volume fraction''<br />
<br />
== Results table ==<br />
The BoneJ plug-ins print their results into a shared result table. This is because we often need to calculate several measures for the same image, so it's handy to have them on one row. Repeated measures for the same image are reported on different rows. The results persist even if the table is closed. To clear the table run ''Plugins &gt; BoneJ &gt; Table &gt; Clear BoneJ results''.<br />
<br />
Note that some of the plug-ins (marked with ''WIP'') still use a ImageJ1 style results table that works slightly differently. As they are modernized they'll move to use the same new table than others.<br />
<br />
== Where is my favorite plug-in? ==<br />
We've decided to remove some plug-ins from BoneJ experimental. ''Neck shaft angle'', ''Plateness'' and ''Structure model index'' have been discontinued. ''Interpolate ROIs'', ''Dilate'' and ''Erode'' come pre-packaged with ImageJ, so there's no need to include them in BoneJ.<br />
<br />
Support for ''Kontron IMG'', ''Scanco ISQ'' and ''Stratec pQCT'' file formats has been moved to [[SCIFIO]]. Just run ''Edit &gt; Options &gt; ImageJ2'', and check ''Use SCIFIO when opening files''. When the option is enabled, these kinds of files can be opened from ''File > Open'' or dragging &amp; dropping them like any other format. <br />
<br />
''Distribution analysis'' and other pQCT related tools can now be downloaded independently from the [[PQCT]] update site.<br />
<br />
== Licence ==<br />
BoneJ experimental is free, open-source software. You can redistribute it and/or modify it under the terms of the [https://github.com/bonej-org/BoneJ2/blob/master/LICENCE.md BSD 2-clause license]. The software is provided "as is" and any warranties are disclaimed. In no event shall the copyright holder or contributors be liable.<br />
<br />
== Citation ==<br />
If you'd like to cite the software, we will soon publish a paper about BoneJ experimental. We recommend you cite the specific release used in your research.</div>Mdoubehttps://imagej.net/index.php?title=BoneJ_experimental&diff=38564BoneJ experimental2018-10-02T02:36:31Z<p>Mdoube: Mdoube moved page BoneJ experimental to BoneJ2</p>
<hr />
<div>#REDIRECT [[BoneJ2]]</div>Mdoubehttps://imagej.net/index.php?title=User:Mdoube&diff=38562User:Mdoube2018-10-02T02:32:22Z<p>Mdoube: </p>
<hr />
<div>{{Userbox<br />
| name = Michael Doube<br />
| gravatar = 0f0ebf95574504aa4bbd4c4ad1326c63<br />
| forum = mdoube<br />
| github = mdoube<br />
| osrc = mdoube<br />
}}Michael is the primary maintainer for the [[BoneJ]] plugins for [[ImageJ]].</div>Mdoubehttps://imagej.net/index.php?title=User:Michaeldoube&diff=38561User:Michaeldoube2018-10-02T02:31:33Z<p>Mdoube: Mdoube moved page User:Michaeldoube to User:Mdoube</p>
<hr />
<div>#REDIRECT [[User:Mdoube]]</div>Mdoubehttps://imagej.net/index.php?title=User:Mdoube&diff=38560User:Mdoube2018-10-02T02:31:32Z<p>Mdoube: Mdoube moved page User:Michaeldoube to User:Mdoube</p>
<hr />
<div>{{Userbox<br />
| name = Michael Doube<br />
| gravatar = 0f0ebf95574504aa4bbd4c4ad1326c63<br />
| forum = mdoube<br />
| github = mdoube<br />
| osrc = mdoube<br />
}}Michael is the primary maintainer for the [[BoneJ]] distribution of [[ImageJ]].</div>Mdoubehttps://imagej.net/index.php?title=BoneJ&diff=38559BoneJ2018-10-02T02:28:33Z<p>Mdoube: </p>
<hr />
<div>{{Infobox<br />
| name = BoneJ 1.x<br />
| software = ImageJ<br />
| logo = [[File:Bonej-icon.png|96px]]<br />
| author = {{Person|Mdoube}}<br />
| maintainer = {{Person|Mdoube}}<br />
| source = {{GitHub|org=mdoube|repo=BoneJ}}<br />
| status = Active<br />
| website = http://bonej.org/<br />
}}BoneJ is a plugin for bone image analysis in [[ImageJ]]. It provides free, open source tools for trabecular geometry and whole bone shape analysis.<br />
<br />
== Experimental release ==<br />
<br />
There's a new modernized version of BoneJ available through the ImageJ [http://imagej.net/Updater updater]. Read more about [[BoneJ experimental]].<br />
<br />
== Installation ==<br />
<br />
{{Logo | ImageJ1 | size=24px}} BoneJ was designed to work with plain [[ImageJ 1.x]].<br />
<br />
{{Logo | Fiji | size=24px}} BoneJ can be installed into [[Fiji]], but you must '''use the Java-6 version of Fiji, not the current Java-8 version''':<br />
<br />
* Download the final Java-6 version of Fiji labeled “2017 May 30” from [[Fiji/Downloads#Java_6|here]].<br />
* Unpack it somewhere beneath your home folder.<br />
* Download and install <code>BoneJ_.jar</code> into that installation's <code>plugins</code> folder.<br />
* Launch Fiji and run {{bc | Plugins | 3D Viewer}} to trigger installation of the [[3D Viewer]].<br />
* Restart Fiji.<br />
<br />
For technical details about ImageJ and Fiji using Java 6 vs. Java 8, see the [[Java 8]] page.<br />
<br />
== BoneJ and pQCT ==<br />
<br />
BoneJ and pQCT plug-ins are in the process of separation. The latter have their own [http://imagej.net/PQCT| update site], and they don't need BoneJ to work. However, if you download <code>BoneJ_.jar</code> from [http://bonej.org/ http://bonej.org/] it still includes older versions of the pQCT tools. <br />
<br />
== Publication ==<br />
* {{Publication | BoneJ}}<br />
<br />
[[Category:Related Software]]<br />
[[Category:Citable]]</div>Mdoubehttps://imagej.net/index.php?title=BoneJ2&diff=38558BoneJ22018-10-02T02:24:49Z<p>Mdoube: /* Where is my favorite plug-in? */</p>
<hr />
<div>{{Infobox<br />
| name = BoneJ experimental<br />
| software = ImageJ<br />
| logo = [[File:Bonej-icon.png|96px]]<br />
| author = {{Person|Michaeldoube}}, {{Person|Rdom}}, {{Person|Alessandrofelder}}<br />
| maintainer = {{Person|Michaeldoube}}, {{Person|Alessandrofelder}}<br />
| source = {{GitHub|org=bonej-org|repo=BoneJ2}}, [https://doi.org/10.5281/zenodo.1427262 doi:10.5281/zenodo.1427262]<br />
| released = Dec 11<sup>th</sup>, 2017<br />
| latest version = cuneiform-experimental-patch2, Sep 24<sup>th</sup>, 2018<br />
| status = Active, Experimental<br />
}}<br />
BoneJ is a collection of skeletal biology plug-ins for ImageJ.<br />
This is the new experimental, modernized version of the software available through the ImageJ [http://imagej.net/Updater updater]. Its update site is called [http://sites.imagej.net/BoneJ BoneJ experimental]. For the old ImageJ1 version, see [[BoneJ]].<br />
<br />
This version works with the latest Fiji, and complies with the modern ImageJ [[architecture]]. Most plug-ins also now support hyperstacks, i.e. images with multiple channels or time frames.<br />
<br />
As the code is still experimental, it's still likely to change a lot. This means any scripts using the code might break, results can change, and plug-ins gain and lose parameters. Tools marked with ''WIP'' (work in progress), are more likely to undergo large changes. <br />
<br />
Below is the documentation for the plug-ins included in BoneJ experimental.<br />
<br />
== Installation ==<br />
[[File:Install-bonej.png|400 px|Installation steps]]<br />
# [http://imagej.net/Downloads Download] the latest version of Fiji for your operating system<br />
# Launch Fiji<br />
# Select in the menu ''Help'' &gt; ''Update...''<br />
# Click ''Manage update sites''<br />
# Check ''BoneJ experimental''<br />
# Click ''Close''<br />
# Click ''Apply changes''<br />
After the downloads have finished, close and restart Fiji.<br />
<br />
== Analyse skeleton ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyse skeleton''.<br />
<br />
This plug-in simply includes [[AnalyzeSkeleton]] in BoneJ. It adds some additional validation to check that your image suits the tool. It also skeletonizes your image by calling [[Skeletonize3D]] if needed.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[AnalyzeSkeleton]].<br />
<br />
== Anisotropy ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Anisotropy''.<br />
<br />
Anisotropy is used to quantify the directionality of trabecular bone. It tells whether the trabeculae have a certain orientation, or if they're randomly aligned. The method to measure anisotropy is fairly complex and consists of multiple steps:<br />
<br />
# Find mean intercept length (MIL) vectors from <math>n</math> directions<br />
# Plot MIL vectors into a point cloud<br />
# Solve the equation of an ellipsoid that best fits the point cloud<br />
# Calculate the degree of anisotropy from the radii of the ellipsoid<br />
<br />
It's important to note that algorithm is stochastic and does not guarantee exact results. Thus it's recommended to run it several times to establish the degree of anisotropy in your image.<br />
<br />
[[File:PhaseChanges.png|left|150 px|The red dots mark phase changes]]<br />
<br />
In the first step the algorithm draws parallel lines over the input image in direction <math>\mathbf{v}</math>. The direction is chosen randomly. Each line segment in the image stack is sampled to find points where it changes from background to foreground, i.e. where the line enters an object. The points are called ''phase changes'', in the adjacent figure they're marked with red dots. After the sampling is complete, the algorithm forms a ''MIL vector'', whose length is the total length of the line segments divided by the total number of phase changes found. The MIL vector has the same direction as <math>\mathbf{v}</math>. Drawing and sampling the lines is repeated for <math>n</math> directions, and the method creates <math>n</math> MIL vectors.<br />
<br />
After the MIL vectors have been calculated, they are added to a point cloud (a collection of points) around the origin. Then the method tries solve the equation of an ellipsoid that would fit the cloud. There may be no solution, especially if there are few points. That is, the fitting may fail at which point the plug-in stops. The radii of this ellipsoid determine the degree of anisotropy (see [http://imagej.net/index.php?title=BoneJ_experimental&action=submit#Results results]).<br />
<br />
[[File:MilCube.png|right|200 px|Projecting lines from a plane]]<br />
<br />
In more detail, the lines in the first step are projected from a <math>d * d</math> plane with normal <math>\mathbf{v}</math> (see the adjacent figure). The size <math>d = \sqrt{w^{2} + h^{2} + d^{2}}</math>, where <math>w, h, d</math> are the dimensions of the image stack. Each of the lines originates from a random point <math>\mathbf{o}</math> on the plane. The plane is divided into <math>m * m</math> same-sized sections, where <math>m</math> is a number selected by the user (i.e. ''Lines per dimension''). One origin <math>\mathbf{o}</math> is randomly selected from within each section. The lines are projected until they intercept the stack edges at points <math>\mathbf{o} + t_{min}\mathbf{v}</math>,<math>\mathbf{o} + t_{max}\mathbf{v}</math> (the algorithm solves for <math>t_{min}</math>, <math>t_{max}</math>). These line segments within the stack are then sampled for phase changes. In this drawing method some lines may miss the image stack completely, but conversely there aren't any areas in the stack that don't have an equal chance of being sampled.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
The plug-in is intended to analyse the "texture" of an object thus it suits samples of a larger whole, e.g. a trabecular cube that fills the whole stack. The results for whole objects such as the pre-packaged ''Bat Cochlea Volume'' ImageJ sample image are not really meaningful.<br />
<br />
==== Parameters ====<br />
* '''Directions''': number of times sampling is performed from different directions. The minimum is <math>9</math>, because that's how many independent variables the algorithm needs to solve the "shape" of the orientation in the image.<br />
* '''Lines per dimension''': controls how many parallel lines are drawn per each direction. For example, if ''lines per dimension'' is <math>2</math> then ''Anisotropy'' draws <math>4</math> lines. In this case, the origin points of the lines are randomly selected from within the <math>4</math> equal sections of the sampling plane (see above detailed explanation). The number is squared, because the location of the origins can vary in two dimensions.<br />
<br />
then the plane is divided into <math>4</math> equal sections, and a line is drawn from each. The origin point of each line is randomly located within their section.<br />
* '''Sampling increment''': controls how often each line is sampled. The default is <math>1.0</math>, which means that after each step a unit vector (a <math>1\_px</math> long line) is added to the position along a sampling line. The number of samples taken per line depends on the length of the line segment within the image stack.<br />
* '''Recommended minimum''': if checked, then the above three parameters are set to the recommended minimum values. In our tests we found that with these values the results are quite stable, and fitting unlikely to fail. However, these minimums are not guaranteed to be the best settings for your image.<br />
* '''Show radii''': if checked, then the radii of the fitted ellipsoid are shown in the results table.<br />
<br />
==== Results ====<br />
* '''Degree of anisotropy''': how much orientation there is in the structure. <math>0.0</math> means the image is completely isotropic, the sample has no directionality whatsoever. <math>1.0</math> means there is very strong orientation in the structure of the image. Note that these are theoretical minimum and maximum values. Due the stochastic nature of the algorithm, even an empty stack will have non-zero degree of anisotropy.<br />
* '''Radii of fitted ellipsoid''' (optional): the lengths of the radii <math>a \leq b \leq c</math> of the ellipsoid fitted on the MIL points. Degree of anisotropy <math>= 1.0 - a/c</math>.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* The results of this Anisotropy do not stabilize, so it's not repeated automatically like in BoneJ1. However, the results vary less between runs.<br />
* MIL vectors are drawn differently. In BoneJ1 they're drawn in sphere-shapes around random seed points. Here parallel lines from different directions are drawn through the whole stack. We think this method produces more uniform sampling, i.e. there's less chance of a directional bias.<br />
<br />
==== Related publications ====<br />
* Odgaard A (1997), ''Three-dimensional methods for quantification of cancellous bone architecture'', Bone, 20, 315-328, [http://dx.doi.org/10.1016/S8756-3282(97)00007-0 doi:10.1016/S8756-3282(97)00007-0]<br />
* Harrigan TP, Mann RW (1984), ''Characterization of microstructural anisotropy in orthotropic materials using a second rank tensor'', J Mater Sci, 19, 761-767, [http://dx.doi.org/10.1007/BF00540446 doi:10.1007/BF00540446]<br />
<br />
== Area/Volume fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Area/Volume fraction''<br />
<br />
''Area/Volume fraction'' calculates the fraction of bone in an image by it to the whole image. It counts all the foreground voxels, which it assumes represent bone, and compares them to the total number of voxels in the image. More formally defined, the plug-in calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''. In case of a 2D image, it calculates the fraction ''BA/TA'', which is the area of bone per unit area of the sample.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the bone voxels.<br />
* '''Total volume''': volume of the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 2D/3D subspace in the image, i.e. for each channel and time frame. Results will be for ''area'' if image is 2D.<br />
<br />
==== Differences to BoneJ1 ====<br />
* In BoneJ1 the plug-in was called ''Volume fraction''<br />
* Can process 2D images<br />
* Supports hyperstacks <br />
<br />
== Calibrate SCANCO (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyze &gt; Calibrate SCANCO''<br />
<br />
Applies the ''mg HA/ccm'' pixel value calibration, i.e. ''HU'' or Hounfield unit calibration stored in the .isq format metadata to the image.<br />
<br />
==== Suitable images ====<br />
An .isq format image generated by Scanco X-ray microtomography scanners.<br />
<br />
== Check voxel depth (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Check Voxel Depth''<br />
<br />
Checks whether slice spacing has been calibrated correctly. Some DICOM images contain slice thickness data in the header information, but thickness is not necessarily the same as the physical distance between consecutive slices' positions.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Connectivity ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Connectivity''.<br />
<br />
The Connectivity plug-in is designed to estimate the number of connected structures i.e. trabeculae in a trabecular network. This ''connectivity'' measure is related to a topological number <math>\chi</math> known as ''Euler characteristic'', ''Euler number'' or ''Euler-Poincaré characteristic''. Mathematically defined connectivity is <math>= 1 - (\chi + \Delta\chi)</math>. Roughly speaking, <math>\chi</math> describes the shape or structure of a topological space. It can also be expressed as <math>\chi = objects - handles + cavities</math>, where a handle is a hole that goes through an object (e.g the hole in a doughnut, or the ear of a coffee mug), and a cavity is enclosed inside one. When measuring trabecular cubes, you need to add <math>\Delta\chi</math> to <math>\chi</math> to get a more accurate estimate of the connectivity of the whole network. The term <math>\Delta\chi</math> corrects for the change in the topology of an object, when it's cut to pieces. <br />
<br />
NB some other Euler characteristic implementations report <math>\chi + \Delta\chi</math> as <math>\chi</math>, i.e. in them the correction <math>\Delta\chi</math> is implicit.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary. The plug-in assumes that there is only one particle in the foreground; to achieve this, run ''Purify''. Having more than one object often leads to negative connectivity.<br />
<br />
==== Results ====<br />
* '''Euler characteristic (χ)''': describes the shape of the object(s) in the image, <math>\chi = objects - handles + cavities</math>.<br />
* '''Corrected Euler (χ + Δχ)''': the Euler characteristic of the part corrected for edge effects to fit the whole.<br />
* '''Connectivity''': gives an estimate of the number of connected trabeculae in the image. Equal to <math>1 - (\chi + \Delta\chi)</math>.<br />
* '''Conn. density''': connectivity divided by unit volume. <br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* The old version reported ''Corrected Euler (χ + Δχ)'' incorrectly as ''Δχ''<br />
<br />
==== Related publications ====<br />
* Odgaard A, Gundersen HJG (1993), ''Quantification of connectivity in cancellous bone, with special emphasis on 3-D reconstructions'', Bone 14: 173-182, [http://dx.doi.org/10.1016/8756-3282(93)90245-6 doi:10.1016/8756-3282(93)90245-6.]<br />
* Toriwaki J, Yonekura T (2002), ''Euler number and connectivity indexes of a three dimensional digital picture'', [http://www.scipress.org/journals/forma/abstract/1703/17030183.html Forma 17: 183-209]<br />
<br />
== Delete slice range (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Delete slice range''<br />
<br />
Removes a range of slices from a stack, so that cropping in the Z direction is practical.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Ellipsoid factor (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Ellipsoid factor''.<br />
<br />
Ellipsoid Factor is a new method for measuring rod/plate geometry. It uses the axis lengths from prolate, oblate and intermediate elipsoids to determine how prolate or oblate the trabecular space is at a particular point. Highly prolate (javelin-shaped, rod-like) ellipsoids have a single long axis (<math>c</math>) and two short axes (<math>a, b</math>) such that <math>a < b \ll c</math> , whereas highly oblate (discus-shaped, plate-like) ellipsoids have two longer axes (<math>b, c</math>) and one much shorter axis (<math>a</math>) so that <math>a \ll b < c</math>. Calculating <math>EF</math> as the difference in ratios, <math>EF = a/b - b/c</math> leads to a useful scale ranging from <math>-1</math> (oblate, <math>a/b \approx 0, b/c \approx 1</math>) to <math>+1</math> (prolate, <math>a/b \approx 1, b/c \approx 0</math>). <math>EF</math> of <math>0</math> indicates an intermediate ellipsoid where <math>a/b = b/c</math>, which is the case for spheres (<math>a = b = c</math>) and other ellipsoids with axis ratios <math>a:qa:q^{2}a</math>. Ellipsoid Factor runs [[Skeletonize3D]] to get the medial axis of the trabeculae, which is used as the seed for sampling. Ellipsoids are seeded from each voxel on the medial axis. A combination of dilation, contraction, rotation and a small amount of translation is run iteratively until the ellipsoid increases no further in volume.<br />
<br />
The EF at a point in the structure is determined as the EF of the most voluminous ellipsoid which contains that point.<br />
<br />
If you use Ellipsoid Factor in your work, please cite:<br />
Doube M (2015), ''The Ellipsoid Factor for quantification of rods, plates and intermediate forms in 3D geometries'', Frontiers in Endocrinology, 6:15, [http://journal.frontiersin.org/Journal/10.3389/fendo.2015.00015/abstract doi: 10.3389/fendo.2015.00015]<br />
<br />
==== Suitable images ====<br />
A binary 3D image.<br />
<br />
==== Parameters ====<br />
* '''Sampling increment''': distance between sample points on each vector; should be less than the pixel spacing.<br />
* '''Vectors''': number of vectors to sample at each seed point.<br />
* '''Skeleton points per ellipsoid''': allows dense or sparse sampling, a value of <math>1</math> means that an ellipsoid is sampled at every seed point.<br />
* '''Contact sensitivity''': how many vectors must touch the background before dilation stops.<br />
* '''Maximum iterations''': how hard to try to find larger ellipsoids - fitting will stop if no improvement has been made after this number of iterations..<br />
* '''Maximum drift''': how far the centroid may be displaced from its seed point.<br />
* '''EF image''': stack containing EF values for each point contained by at least one ellipsoid and NaN elsewhere.<br />
* '''Ellipsoid ID image''': stack containing the ID of the biggest ellipsoid at each point, ranked in descending order (<math>0</math> is the largest ellipsoid).<br />
* '''Volume image''': image showing the volume of the largest ellipsoid containing that point.<br />
* '''Axis ratio images''': images showing <math>a/b</math> and <math>b/c</math> ratios foreach point containing at least one ellipsoid and NaN elsewhere.<br />
* '''Flinn peak plot''': plot of <math>a/b</math> vs <math>b/c</math> weighted by volume, so bright pixels indicate relatively more of the structure has that axis ratio.<br />
* '''Gaussian sigma:''' amount to blur the Flinn peak plot - set to <math>0</math> for a precise but less 'beautiful' result.<br />
* '''Flinn plot''': unweighted Flinn plot - every ellipsoid is represented by the same sized point regardless of ellipsoid size.<br />
<br />
==== Results ====<br />
* '''EF image''': stack containing EF values. NaN (not a number) values are used in the background. Summary statistics can be obtained by running Analyze > Histogram<br />
* '''Short-Mid image''': stack containing the <math>a/b</math> ratios<br />
* '''Mid-Long image''': stack contining the <math>b/c</math> ratios<br />
* '''Volume image''': stack containing ellipsoid volumes<br />
* '''Max id image''': stack containing the ID of the largest ellipsoid at each point; IDs relate to the sort order based on volume, so ID = 0 is the largest ellipsoid. <math>-1</math> is foreground and background is labelled with a large negative number.<br />
* '''Flinn diagram''': plot of <math>a/b</math> versus <math>b/c</math> values present in the volume<br />
* '''Weighted Flinn plot''': Flinn diagram with peaks of intensity proportional to volume occupied by each (<math>a/b</math>, <math>b/c</math>) ratio<br />
<br />
==== Related publications ====<br />
Salmon PL, Ohlsson C, Shefelbine SJ, Doube M (2015), ''Structure model index does not measure rods and plates in trabecular bone'', Frontiers in Endocrinology, 6:162, [http://dx.doi.org/10.3389/fendo.2015.00162 doi:10.3389/fendo.2015.00162].<br />
<br />
== Fit ellipsoid ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit ellipsoid''.<br />
<br />
Finds the ellipsoid that best fits a set of point or multi-point ROIs in the ROI Manager. ''Fit ellipsoid'' may fail to fit an ellipsoid. The more points you add, the more likely it is to succeed. Points are scaled to the spatial calibration (voxel widht, height &amp; depth) of the input image.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': ROIs with at least nine points in the ROI Manager.<br />
<br />
==== Results ====<br />
* '''Radii''': the radii ''a'', ''b'' and ''c'' of the fitted ellipsoid. Radius ''a'' is the shortest and ''c'' the longest.<br />
* '''Centroid''': ''x'', ''y'' and ''z'' coordinates of the ellipsoid centre point.<br />
<br />
==== Differences from BoneJ1 ====<br />
* Supports multi-point ROIs.<br />
* Plug-in cancels if an ellipsoid can't be found, instead of reporting invalid results.<br />
<br />
== Fit sphere (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit sphere''.<br />
<br />
Finds the sphere that best fits a set of point ROIs, and optionally displays the image data bounded by the sphere in a new image window. Place a set of point ROIs on structures of interest, hitting [T] to add each point to the ROI Manager. Fit Sphere takes the coordinates of the points from the ROI Manager and applies a least-squares optimisation.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': populated with at least 5 point ROI's<br />
* '''Copy Sphere''': Create a new stack containing image data from within the best-fit sphere.<br />
* '''Padding''': Number of black pixels to put between the sphere and the sides of the image<br />
* '''Inner Cube''': Create a new stack containing image data from the cube that just fits inside the best-fit sphere.<br />
* '''Outer Cube''': Create a new stack containing image data from the cube that the best-fit sphere just fits inside.<br />
* '''Crop Factor''': Radius used for generating new images is multiplied by crop factor so that a bigger or smaller volume can be produced.<br />
* '''Add to ROI Manager''': Add the sphere to the ROI Manager as a set of circular ROIs<br />
* '''Clear ROI Manager''': Clear any existing ROIs in the Manager prior to adding circles<br />
<br />
==== Results ====<br />
* '''X Centroid''': x-coordinate of sphere's centroid<br />
* '''Y Centroid''': y-coordinate of sphere's centroid<br />
* '''Z Centroid''': z-coordinate of sphere's centroid<br />
* '''Radius''': length of radius<br />
* '''Images (optional)''': images containing a copy of the original data within the sphere, or within cubes bounding or bounded by the sphere.<br />
<br />
== Fractal dimension ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fractal dimension''.<br />
<br />
This plug-in estimates the fractal dimension of an image by applying the box-counting algorithm. In this algorithm grids of diminishing size are scanned over the image, and the number of boxes containing at least one foreground voxel is counted. As the box size decreases and the grid becomes finer, the proportion of foreground boxes increases in a fractal structure. See [https://en.wikipedia.org/wiki/Box_counting Wikipedia] for further details. BoneJ uses a fixed-grid scan, with an option to try to find the optimal covering.<br />
<br />
The box counting algorithm produces a pair of <math>(log(n), -log(m))</math> values for each iteration it runs. Here n = number of boxes with foreground, and m = box size. These pairs are passed to a curve-fitting algorithm, which returns the slope of the linear function which describes them ([https://en.wikipedia.org/wiki/Linear_regression regression fit]). The coefficient of this slope is the fractal dimension.<br />
<br />
Fractal dimension is markedly influenced by the parameters selected for the box counting algorithm, so it's worth running it several times with different values to find an accurate measure for your image.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* ''Starting box size (px)'': the size (sides) in pixels of a box in the sampling grid in the first iteration of the algorithm.<br />
* ''Smallest box size (px)'': the minimum size in pixels of a box in the grid. When box size becomes smaller than this limit, the algorithm iterates one more time, and then stops.<br />
* ''Box scaling factor'': the term used to divide the box size after iteration. For example, a scaling factor of <math>2.0</math> halves the size at each step.<br />
* ''Grid translations'': how many times at each iteration the grid is moved to try to the find the optimal covering. The optimal covering covers the objects in the image with the least amount of boxes. The larger the parameter the more likely it is that optimal covering is found. However, this slows down the plug-in considerably.<br />
* ''Automatic parameters'': if checked, then the plug-in runs with default parameters.<br />
* ''Show points'': if checked, then the plug-in displays the <math>(log(n), -log(m))</math> values it calculated. <br />
<br />
==== Results ====<br />
* ''Fractal dimension'': the [https://en.wikipedia.org/wiki/Fractal_dimension fractal dimension] of the image. For example, the Koch snow flake has a fractal dimension of 1.262.<br />
* ''R²'': the [https://en.wikipedia.org/wiki/Coefficient_of_determination coefficient of determination] of the line fitted to the <math>(log(n), -log(m))</math> points.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* Algorithm parameters can be changed by the user.<br />
<br />
==== Related publications ====<br />
Fazzalari NL, Parkinson IH (1996), ''Fractal dimension and architecture of trabecular bone'', J Pathol, 178: 100-5, [http://dx.doi.org/10.1002/(SICI)1096-9896(199601)178:1%3C100::AID-PATH429%3E3.0.CO;2-K doi:10.1002/(SICI)1096-9896(199601)178:1<100::AID-PATH429>3.0.CO;2-K].<br />
<br />
== Inter-trabecular angles ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Inter-trabecular Angles''.<br />
<br />
The plug-in was designed to analyse the angles between trabeculae of cancellous bone. First it calls [[Skeletonize3D]] to thin the input image (if necessary). Then it calls [[AnalyzeSkeleton]], which creates a graph of the largest skeleton (by number of nodes) in the thinned image. The graph consists of nodes and the edges that connect them. Nodes are also known as vertices, and edges as branches. Roughly speaking the edges correspond to trabeculae and the nodes to the junction points, where trabeuculae meet.<br />
<br />
The graph is often not a perfect representation of the trabecular network in the input image. ''Inter-trabecular angles'' offers many options to adjust the graph's topology and filter out artefacts that may obfuscate or skew the results. First it allows you to filter out nodes with too many or too few edges. Secondly it can be used to prune very short edges, which often do not represent actual trabeculae. <br />
<br />
[[File:Ita_types.png|left|150 px|Types of edges in pruning]]<br />
Pruning works differently for different types of edges. There are four kinds: outer, dead-end, inner and short. An outer edge doesn't interconnect different parts of a graph. In other words, one (and only one) of its endpoints connects to only one branch, i.e. the edge itself. In the figure the outer edge is colored black. A dead-end (blue) is an outer edge whose length is less than the minimum set by the user, i.e. it's a short, outer edge. An inner edge (green) connects to end points with more than one branch. A short edge is an inner edge, whose length is less than the set minimum. When a dead-end is pruned, it with its "lonely" end-point are removed from the graph. When a short edge is pruned, it and it's endpoints are removed, and a new node is placed at the midpoint of the former. This new node connects to all the branches the previous nodes connected to.<br />
<br />
''Inter-trabecular angles'' offers two further options to control pruning: ''iteration'' and ''clustering''. Iteration repeats pruning until no new short edges are found. Sometimes pruning can create new short edges, and thus the graph may still have them after one iteration. However, iteration can alter the structure of the graph too dramatically. Clustering searches for all nodes connected by short edges, before removing any. In the figure, clustering pruning would remove the four nodes and the red edges between them in one go. It would create a new node at the center of the previous four, and connect it to the blue and green edges. When pruning is not clustering, it removes edges one-by-one. This changes the end result depending on the order the edges are traversed. Clustering creates the same result each time. <br />
<br />
Pruning also removes loops and redundant parallel edges. The former connects to the same node on both ends, and the latter connects two nodes that are already connected by another edge. <br />
<br />
The pruning and filtering features were added so that we can replicate and continue from the research of [https://doi.org/10.1016/j.actbio.2016.08.040 Reznikov et al.]<br />
<br />
==== Suitable images ====<br />
An 8-bit, binary 2D or 3D image. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
*'''Minimum valence''': minimum number of branches for a node to be included in the analysis.<br />
*'''Maximum valence''': maximum number of branches for a node to be included in the analysis.<br />
*'''Minimum trabecular length (px)''': minimum length for a branch to be preserved in the pruning. Length is calculated as the distance between the endpoints of a branch.<br />
** This length is also displayed in the units of the image calibration<br />
*'''Margin (px)''': minimum distance of a node from image stack edges to be included in the analysis. Having nodes too close to the edges can make the results less accurate, because you get more branches that do not terminate to a node at the other end.<br />
*'''Iterate pruning''': repeat pruning until no more new short branches are discovered. When true, the topology of the graph is likely to change more in the pruning.<br />
*'''Use clusters''': if true then the pruning result is independent of the order in which the graph is traversed. False corresponds with methodology in Reznikov's article. See above for more details.<br />
*'''Print centroids''': Print the centroids (center coordinates) of the node pairs at the ends of each edge.<br />
*'''Print % culled edges''': Print statistics of different types of edges pruned.<br />
<br />
==== Results ====<br />
*'''Inter-trabecular angles''': angles between each branch of each node included in the analysis. Sorted into columns according to the number of branches per node. For example, column ''"3"'' shows the angles between branches of nodes with three branches.<br />
*'''Centroids''' (optional): A table of the center coordinates of the node pairs at the ends of each edge.<br />
*'''Culled edge percentages''' (optional): A table showing the percentages of different kinds of edges pruned, compared to the total number of edges in the analysed graph.<br />
*'''Skeleton''' (optional): if the plug-in had to skeletonise the input image, it displays the result of the thinning.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Inter-trabecular angles generalizes the idea of ''Triple point angles'' for any types of points. It also provides more tools for adjusting the graph for analysis.<br />
<br />
==== Related publications ====<br />
Reznikov, N et al. (2016), ''Inter-trabecular angle: A parameter of trabecular bone architecture in the human proximal femur that reveals underlying topological motifs'', Acta Biomaterialia, 44: 65--72, [https://doi.org/10.1016/j.actbio.2016.08.040 doi:j.actbio.2016.08.040].<br />
<br />
== Local thickness ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Thickness''.<br />
<br />
This plug-in includes [[Local_Thickness]] in BoneJ, and provides some additional options &amp; results. Local thickness measures ''the diameter of the largest sphere that fits inside the object and contains the point'' for each point i.e. foreground voxel in an image. The plug-in calculates mean and standard deviation of the trabecular thickness (Tb.Th) or trabecular spacing (Tb.Sp) directly from pixel values in the resulting thickness map. Foreground voxels are considered trabeculae, and background voxels are the spacing. Processing time is heavily dependent on feature size (in pixels); large features can take a very long time to process.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
* '''Calculate''': chooses which thickness maps to calculate - trabecular thickness, trabecular spacing, or both. In order to calculate trabecular spacing, the image voxels are inverted.<br />
* '''Show thickness maps''': display the calculated thickness maps or not.<br />
* '''Mask thickness maps''': remove artifacts from the thickness maps. Artifacts are foreground voxels not present in the original image.<br />
* '''Crop to ROI manager''': create thickness maps only from the area bounded by the ROIs in the ROI manager. Checking this option requires you've added ROIs to the ROI manager.<br />
<br />
==== Results ====<br />
* The mean and standard deviation for each thickness map calculated.<br />
* Displays thickness map images if ''Show thickness maps'' was selected. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Calls the latest version of [[Local_Thickness]].<br />
* Thickness values for background voxels are marked ''NaN'' instead of ''0''.<br />
<br />
==== Related publications ====<br />
* Dougherty R, Kunzelmann K (2007), ''Computing local thickness of 3D structures with ImageJ'', Microsc. Microanal., 13: 1678-1679, [http://dx.doi.org/10.1017/S1431927607074430 doi:10.1017/S1431927607074430]<br />
* Hildebrand T, Rüegsegger P (1997), ''A new method for the model-independent assessment of thickness in three-dimensional images'', J. Microsc., 185: 67-75, [http://dx.doi.org/10.1046/j.1365-2818.1997.1340694.x doi:10.1046/j.1365-2818.1997.1340694.x]<br />
<br />
== Moments of inertia (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Moments of Inertia''<br />
<br />
Calculates the three orthogonal principal axes and moments of inertia around those axes. It includes pixels with values between upper and lower limits, which can be defined in terms of unitless grey values or Hounsfield units (HU). It optionally creates a new stack with the image centred and rotated so that the principal axes are parallel to the image stack's x, y and z axes. Calculations are limited to a rectangular ROI if one is drawn. The plugin will guess whether the image is HU calibrated, and if so, apply HU limits of bone (0-4000 HU), otherwise it will calculate auto-thresholds based on the stack's histogram. If a calibration curve is known, the coefficients can be added to get weighted calculations. Aligning a bone with Moments of Inertia may be a useful step prior to Slice Geometry if bones are not aligned with the image z axis.<br />
<br />
==== Suitable images ====<br />
An 8-bit or 16-bit image.<br />
<br />
==== Parameters ====<br />
* '''Start slice''': First slice to include in calculations<br />
* '''End slice''': Last slice to include in calculations<br />
* '''HU Calibrated''': Plugin will guess whether the image is HU calibrated. If image is HU calibrated, make sure the box is checked and enter HU calibrated numeric values in the following fields<br />
* '''Bone Min''': Lower threshold, in either uncalibrated greys or HU<br />
* '''Bone Max''': Upper threshold, in either uncalibrated greys or HU<br />
* '''Slope''': m where physical density = m × pixel value + c<br />
* '''Y Intercept''': c where physical density = m × pixel value + c<br />
* '''Align result''': Draw a new stack with the principal axes parallel to the image axes<br />
* '''Show axes (2D)''': Draw the axes in white on the aligned image<br />
* '''Show axes (3D)''': Display the stack and its principal axes in a 3D Viewer window<br />
<br />
==== Results ====<br />
* '''Image (optional)''': a copy of the input image centered and aligned with the principal axes<br />
* '''Xc''': Centroid x-coordinate (mass-weighted by calibrated density)<br />
* '''Yc''': Centroid y-coordinate<br />
* '''Zc''': Centroid z-coordinate<br />
* '''Vol''': Total volume of thresholded voxels<br />
* '''Mass''': Mass of bone, from pixel values and density calibration coefficients<br />
* '''Icxx''': Moment around x axis passing through centroid<br />
* '''Icyy''': Moment around y axis passing through centroid<br />
* '''Iczz''': Moment around z axis passing through centroid<br />
* '''Icxy''': Off-axis term for constructing inertia tensor<br />
* '''Icxz''': Off-axis term for constructing inertia tensor<br />
* '''Icyz''': Off-axis term for constructing inertia tensor<br />
* '''I1''': Moment around the shortest principal axis<br />
* '''I2''': Moment around the middle principal axis<br />
* '''I3''': Moment around the longest principal axis<br />
* '''Verbose output in Log window'''<br />
** '''Eigenvalues''': Result of of eigenvalue decomposition. Moments of inertia<br />
** '''Eigenvectors of principal axes''': orientation of input image<br />
** '''Inverse eigenvector matrix''': used to map voxel positions in the aligned image back to voxel positions in the original image<br />
* Optional 3D display of principal axes<br />
<br />
== Optimise threshold (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Optimise Threshold''<br />
<br />
Several histogram-based methods exist for automatic determination of threshold for binary segmentation, but in ImageJ these are currently limited to pixel values in a single slice. The result can be excluding high values in a stack that are higher than the highest value in the current slice. This plugin uses all the pixels in a stack to construct a histogram and uses ImageJ's built-in isodata algorithm to determine the threshold. It optionally tests values either side of the initial auto-threshold for connectivity, because connectivity is very sensitive to image noise. The plugin attempts to find the threshold that results in minimal connectivity. Purification, erosion and dilation can improve the connectivity estimate, so Purify is always called, and erosion and dilation are applied as part of a sequence: purify, erode, purify, dilate.<br />
<br />
==== Suitable images ====<br />
An 8-bit of 16-bit image<br />
<br />
==== Parameters ====<br />
* '''Threshold Only''': Determine the threshold from the stack histogram only<br />
* '''Apply Threshold''': Replace the input image with a thresholded version<br />
* '''Show Plot''': Display a graph showing connectivity versus threshold<br />
* '''Tests''': Number of different thresholds to test for connectivity<br />
* '''Range''': Proportion of the initial threshold to test above and below initial thresholds<br />
* '''Subvolume Size''': Size of the volume to test for connectivity. Set small for a faster run and large to test the whole stack<br />
* '''Erosion Cycles''': Number of times to erode the stack after initial purification<br />
* '''Dilation Cycles''': Number of times to dilate the stack after secondary purification<br />
<br />
==== Results ====<br />
* '''Thresholded stack (optional)'''<br />
* '''Plot of connectivity versus threshold (optional)'''<br />
* '''Log of optimal threshold value'''<br />
<br />
== Orientation (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Orientation''<br />
<br />
Sets the direction in a 2D image, without rotating the image or changing it in any way. ''Slice Geometry'' (see below) uses ''Orientation'' to calculate diameter, second moments of area and section moduli around anatomic axes set by the user.<br />
<br />
==== Suitable images ====<br />
A 2D image.<br />
<br />
==== Parameters ====<br />
* '''Orientation''': input field displays current orientation (clockwise from 12 o'clock) and takes keyboard input<br />
* '''deg / rad''': display and set orientation in degrees or radians<br />
* '''Principal direction''': the main direction, the head of which is displayed in red<br />
* '''Secondary direction''': the orthogonal direction<br />
* '''Reflect''': swap the labels on this axis<br />
<br />
==== Results ====<br />
* '''Orientation axes''': draws the axes of the orientation on the image.<br />
<br />
== Purify (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Purify''<br />
<br />
Purify locates all particles in 3D and removes all but the largest foreground and background particles.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary.<br />
<br />
==== Parameters ====<br />
* '''Labelling algorithm''':<br />
** '''Mapped''': Non-recursive, memory efficient and fast.<br />
** '''Multithreaded''': use multiple cores and job chunking to reduce recursion. Fast on small stacks and if you have many CPU cores.<br />
** '''Linear''': Non-recursive but heavy on RAM and single-threaded. Fast on big stacks, but only if you have the memory.<br />
* '''Chunk Size''': number of slices to use in each particle labelling thread. If images are large, set this to 2<br />
* '''Performance Log''': Show verbose performance information to help tune your system<br />
* '''Make copy''': If checked, shows the result in a new window; if unchecked the result replaces the original image.<br />
<br />
==== Results ====<br />
* '''Performance metrics (optional)'''<br />
** '''Threads''': Number of CPU cores used<br />
** '''Slices''': Number of slices in the input image stack<br />
** '''Chunks''': Number of chunks of slices, each chunk is processed independently<br />
** '''Chunk size''': Number of slices per chunk<br />
** '''Last chunk size''': size of the last chunk (the remainder chunk)<br />
** '''Duration''': time in seconds to complete purification<br />
* '''Purified image''': optionally in a new image window.<br />
<br />
== Skeletonise ==<br />
Menu path ''Plugins &gt; BoneJ &gt;Skeletonise''.<br />
<br />
This plug-in simply includes [[Skeletonize3D]] in BoneJ. It adds some additional validation to check that your image suits the tool.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[Skeletonize3D]].<br />
<br />
== Slice geometry (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Slice Geometry''<br />
<br />
Slice Geometry calculates cross-sectional geometric properties of shapes: cross-sectional area, centroid, mean density, second moment of area, section modulus, Feret diameter and local thickness (2D and 3D). Measurements can be limited to a rectangular ROI. If your bone is not well aligned with the image axes, you may find it useful to align the bone to its principal axes using Moments of Inertia or by exporting a transformed volume from the ImageJ 3D Viewer. Importantly, no assumption of geometry is made for any of the measurements.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Bone''': Slice Geometry will guess from your image title the bone it is working on. If it is wrong, correct it. If your bone of interest isn't listed, email me.<br />
* '''2D Thickness''': Run Thickness on a per-slice basis; this fits circles rather than spheres<br />
* '''3D Thickness''': Run Thickness on the whole stack, fitting spheres, then report results per slice<br />
* '''Draw Axes''': Draw axes on an annotated copy of the stack<br />
* '''Draw Centroids''': Draw centroids on an annotated copy of the stack<br />
* '''Annotated Copy (2D)''': Create a new stack showing the centroids and principal axes<br />
* '''3D Annotation''': Display the stack, principal axes and centroids in the 3D viewer<br />
* '''Process Stack''': Calculate parameters for all slices in the stack<br />
* '''Clear Results''': Remove all data in the results table without saving, prior to calculating parameters<br />
* '''Use Orientation''': Also calculate parameters based on directions defined in Orientation<br />
* '''HU Calibrated''': Allows you to enter your thresholds in Hounsfield units (HU) or uncalibrated units<br />
* '''Bone Min''': minimum pixel value to use in calculations<br />
* '''Bone Max''': maximum pixel value to use in calculations<br />
* '''Slope''': <math>m</math> where physical density <math>= m * pixel value + c</math><br />
* '''Y Intercept''': <math>c</math> where physical density <math>= m * pixel value + c</math><br />
* '''Note''': density-weighted calculations are only applied to centroid determination at present<br />
* '''Partial volume compensation''': Use model that assumes Gaussian blur of imaging modality and linear transform between pixel value and sample 'density' to correct for blurred and pixelated images (e.g. small bone in clinical CT)<br />
* '''Background''': pixel value that corresponds to zero bone density (could be the 'fat', 'air' or 'muscle' pixel value)<br />
* '''Foreground''': pixel value that corresponds to 100% bone density<br />
* '''A rectangular ROI (optional)''': if there's a ROI, calculations are limited to its area.<br />
<br />
==== Results ====<br />
* '''Images (optional)''': displays the result images selected in the parameters<br />
* '''Bone code''': Unique numeric identifier for the anatomic name of each bone. Further bone codes can be added to BoneJ on request<br />
* '''Slice''': slice number indicating which slice contributed image data for this row of the results<br />
* '''CSA''': cross-sectional area<br />
* '''X cent.''': Centroid x-coordinate<br />
* '''Y cent.''': Centroid y-coordinate<br />
* '''Density''': mean physical density, calculated from pixel values and calibration coefficients<br />
* '''wX cent''': Density-weighted x-coordinate of centroid<br />
* '''wY cent''': Density-weighted y-coordinate of centroid<br />
* '''Theta''': angle of minor axis (axis for Imin, the long axis of your specimen's cross section) from the horizontal, ranging from <math>-\pi/2</math> to <math>\pi/2</math>, with positive as clockwise<br />
* '''R1''': maximum chord length from minor axis<br />
* '''R2''': maximum chord length from major axis<br />
* '''Imin''': Second moment of area around major axis<br />
* '''Imax''': Second moment of area around minor axis<br />
* '''Ipm''': Product moment of area (= 0 if no errors are present, e.g. due to pixelation)<br />
* '''Zmax''': Section modulus around major axis (Imax / R2)<br />
* '''Zmin''': Section modulus around minor axis (Imin / R1)<br />
* '''Zpol''': Polar section modulus<br />
* '''Feret Min''': Minimum caliper width<br />
* '''Feret Max''': Maximum caliper width<br />
* '''Feret Angle''': Orientation of maximum caliper width<br />
* '''Perimeter''': Distance around external surface<br />
* '''Max Thick 2D''': Maximum thickness determined by local thickness in 2D<br />
* '''Mean Thick 2D''': Mean thickness determined by local thickness in 2D<br />
* '''SD Thick 2D''': Standard deviation of the mean thickness determined by local thickness in 2D<br />
* '''Max Thick 3D''': Maximum thickness in this slice determined by local thickness in 3D<br />
* '''Mean Thick 3D''': Mean thickness in this slice determined by local thickness in 3D<br />
* '''SD Thick 3D''': Standard deviation of the mean thickness in this slice determined by local thickness in 3D Directional measurements, using Orientation directions, and the specimen's slice centroid<br />
* '''A (rad)''': Principal orientation (direction A)<br />
* '''B (rad)''': Secondary orientation (direction B)<br />
* '''IAa''': Second moment of area around Aa axis<br />
* '''IBb''': Second moment of area around Bb axis<br />
* '''ZAa''': Section modulus around Aa axis<br />
* '''ZBb''': Section modulus around Bb axis<br />
* '''RAa''': maximum chord length from Aa axis<br />
* '''RBb''': maximum chord length from Bb axis<br />
* '''DAa''': Calliper diameter in direction of Aa<br />
* '''DBb''': Calliper diameter in direction of Bb<br />
<br />
== Surface area ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Surface area''<br />
<br />
''Surface area'' creates a mesh from the bone in the image, and then calculates the area of the surface of the mesh. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Export STL file(s)''': if checked, then the meshes created from the image are saved as .stl-files. A dialog opens for you to select a folder for the files.<br />
<br />
==== Results ====<br />
* '''Surface area''': the surface area of the bone mesh<br />
* '''STL-file''': the mesh created from the bone image<br />
<br />
The surface area is reported and an .stl-file saved separately for each 3D subspace in the image. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Isosurface''<br />
<br />
== Surface fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Surface fraction''<br />
<br />
''Surface fraction'' calculates the fraction of bone volume in an image by comparing meshes created from bone particles and the whole image. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone. <br />
<br />
More formally defined, ''Surface fraction'' calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary.<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the mesh created from bone voxels.<br />
* '''Total volume''': volume of the mesh created from the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Volume fraction''<br />
<br />
== Results table ==<br />
The BoneJ plug-ins print their results into a shared result table. This is because we often need to calculate several measures for the same image, so it's handy to have them on one row. Repeated measures for the same image are reported on different rows. The results persist even if the table is closed. To clear the table run ''Plugins &gt; BoneJ &gt; Table &gt; Clear BoneJ results''.<br />
<br />
Note that some of the plug-ins (marked with ''WIP'') still use a ImageJ1 style results table that works slightly differently. As they are modernized they'll move to use the same new table than others.<br />
<br />
== Where is my favorite plug-in? ==<br />
We've decided to remove some plug-ins from BoneJ experimental. ''Neck shaft angle'', ''Plateness'' and ''Structure model index'' have been discontinued. ''Interpolate ROIs'', ''Dilate'' and ''Erode'' come pre-packaged with ImageJ, so there's no need to include them in BoneJ.<br />
<br />
Support for ''Kontron IMG'', ''Scanco ISQ'' and ''Stratec pQCT'' file formats has been moved to [[SCIFIO]]. Just run ''Edit &gt; Options &gt; ImageJ2'', and check ''Use SCIFIO when opening files''. When the option is enabled, these kinds of files can be opened from ''File > Open'' or dragging &amp; dropping them like any other format. <br />
<br />
''Distribution analysis'' and other pQCT related tools can now be downloaded independently from the [[PQCT]] update site.<br />
<br />
== Licence ==<br />
BoneJ experimental is free, open-source software. You can redistribute it and/or modify it under the terms of the [https://github.com/bonej-org/BoneJ2/blob/master/LICENCE.md BSD 2-clause license]. The software is provided "as is" and any warranties are disclaimed. In no event shall the copyright holder or contributors be liable.<br />
<br />
== Citation ==<br />
If you'd like to cite the software, we will soon publish a paper about BoneJ experimental. We recommend you cite the specific release used in your research.</div>Mdoubehttps://imagej.net/index.php?title=BoneJ2&diff=38546BoneJ22018-09-27T05:53:18Z<p>Mdoube: </p>
<hr />
<div>{{Infobox<br />
| name = BoneJ experimental<br />
| software = ImageJ<br />
| logo = [[File:Bonej-icon.png|96px]]<br />
| author = {{Person|Michaeldoube}}, {{Person|Rdom}}, {{Person|Alessandrofelder}}<br />
| maintainer = {{Person|Michaeldoube}}, {{Person|Rdom}}, {{Person|Alessandrofelder}}<br />
| source = {{GitHub|org=bonej-org|repo=BoneJ2}}, [https://doi.org/10.5281/zenodo.1427262 doi:10.5281/zenodo.1427262]<br />
| released = Dec 11<sup>th</sup>, 2017<br />
| latest version = cuneiform-experimental-patch2, Sep 24<sup>th</sup>, 2018<br />
| status = Active, Experimental<br />
}}<br />
BoneJ is a collection of skeletal biology plug-ins for ImageJ.<br />
This is the new experimental, modernized version of the software available through the ImageJ [http://imagej.net/Updater updater]. Its update site is called [http://sites.imagej.net/BoneJ BoneJ experimental]. For the old ImageJ1 version, see [[BoneJ]].<br />
<br />
This version works with the latest Fiji, and complies with the modern ImageJ [[architecture]]. Most plug-ins also now support hyperstacks, i.e. images with multiple channels or time frames.<br />
<br />
As the code is still experimental, it's still likely to change a lot. This means any scripts using the code might break, results can change, and plug-ins gain and lose parameters. Tools marked with ''WIP'' (work in progress), are more likely to undergo large changes. <br />
<br />
Below is the documentation for the plug-ins included in BoneJ experimental.<br />
<br />
== Installation ==<br />
[[File:Install-bonej.png|400 px|Installation steps]]<br />
# [http://imagej.net/Downloads Download] the latest version of Fiji for your operating system<br />
# Launch Fiji<br />
# Select in the menu ''Help'' &gt; ''Update...''<br />
# Click ''Manage update sites''<br />
# Check ''BoneJ experimental''<br />
# Click ''Close''<br />
# Click ''Apply changes''<br />
After the downloads have finished, close and restart Fiji.<br />
<br />
== Analyse skeleton ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyse skeleton''.<br />
<br />
This plug-in simply includes [[AnalyzeSkeleton]] in BoneJ. It adds some additional validation to check that your image suits the tool. It also skeletonizes your image by calling [[Skeletonize3D]] if needed.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[AnalyzeSkeleton]].<br />
<br />
== Anisotropy ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Anisotropy''.<br />
<br />
Anisotropy is used to quantify the directionality of trabecular bone. It tells whether the trabeculae have a certain orientation, or if they're randomly aligned. The method to measure anisotropy is fairly complex and consists of multiple steps:<br />
<br />
# Find mean intercept length (MIL) vectors from <math>n</math> directions<br />
# Plot MIL vectors into a point cloud<br />
# Solve the equation of an ellipsoid that best fits the point cloud<br />
# Calculate the degree of anisotropy from the radii of the ellipsoid<br />
<br />
It's important to note that algorithm is stochastic and does not guarantee exact results. Thus it's recommended to run it several times to establish the degree of anisotropy in your image.<br />
<br />
[[File:PhaseChanges.png|left|150 px|The red dots mark phase changes]]<br />
<br />
In the first step the algorithm draws parallel lines over the input image in direction <math>\mathbf{v}</math>. The direction is chosen randomly. Each line segment in the image stack is sampled to find points where it changes from background to foreground, i.e. where the line enters an object. The points are called ''phase changes'', in the adjacent figure they're marked with red dots. After the sampling is complete, the algorithm forms a ''MIL vector'', whose length is the total length of the line segments divided by the total number of phase changes found. The MIL vector has the same direction as <math>\mathbf{v}</math>. Drawing and sampling the lines is repeated for <math>n</math> directions, and the method creates <math>n</math> MIL vectors.<br />
<br />
After the MIL vectors have been calculated, they are added to a point cloud (a collection of points) around the origin. Then the method tries solve the equation of an ellipsoid that would fit the cloud. There may be no solution, especially if there are few points. That is, the fitting may fail at which point the plug-in stops. The radii of this ellipsoid determine the degree of anisotropy (see [http://imagej.net/index.php?title=BoneJ_experimental&action=submit#Results results]).<br />
<br />
[[File:MilCube.png|right|200 px|Projecting lines from a plane]]<br />
<br />
In more detail, the lines in the first step are projected from a <math>d * d</math> plane with normal <math>\mathbf{v}</math> (see the adjacent figure). The size <math>d = \sqrt{w^{2} + h^{2} + d^{2}}</math>, where <math>w, h, d</math> are the dimensions of the image stack. Each of the lines originates from a random point <math>\mathbf{o}</math> on the plane. The plane is divided into <math>m * m</math> same-sized sections, where <math>m</math> is a number selected by the user (i.e. ''Lines per dimension''). One origin <math>\mathbf{o}</math> is randomly selected from within each section. The lines are projected until they intercept the stack edges at points <math>\mathbf{o} + t_{min}\mathbf{v}</math>,<math>\mathbf{o} + t_{max}\mathbf{v}</math> (the algorithm solves for <math>t_{min}</math>, <math>t_{max}</math>). These line segments within the stack are then sampled for phase changes. In this drawing method some lines may miss the image stack completely, but conversely there aren't any areas in the stack that don't have an equal chance of being sampled.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
The plug-in is intended to analyse the "texture" of an object thus it suits samples of a larger whole, e.g. a trabecular cube that fills the whole stack. The results for whole objects such as the pre-packaged ''Bat Cochlea Volume'' ImageJ sample image are not really meaningful.<br />
<br />
==== Parameters ====<br />
* '''Directions''': number of times sampling is performed from different directions. The minimum is <math>9</math>, because that's how many independent variables the algorithm needs to solve the "shape" of the orientation in the image.<br />
* '''Lines per dimension''': controls how many parallel lines are drawn per each direction. For example, if ''lines per dimension'' is <math>2</math> then ''Anisotropy'' draws <math>4</math> lines. In this case, the origin points of the lines are randomly selected from within the <math>4</math> equal sections of the sampling plane (see above detailed explanation). The number is squared, because the location of the origins can vary in two dimensions.<br />
<br />
then the plane is divided into <math>4</math> equal sections, and a line is drawn from each. The origin point of each line is randomly located within their section.<br />
* '''Sampling increment''': controls how often each line is sampled. The default is <math>1.0</math>, which means that after each step a unit vector (a <math>1\_px</math> long line) is added to the position along a sampling line. The number of samples taken per line depends on the length of the line segment within the image stack.<br />
* '''Recommended minimum''': if checked, then the above three parameters are set to the recommended minimum values. In our tests we found that with these values the results are quite stable, and fitting unlikely to fail. However, these minimums are not guaranteed to be the best settings for your image.<br />
* '''Show radii''': if checked, then the radii of the fitted ellipsoid are shown in the results table.<br />
<br />
==== Results ====<br />
* '''Degree of anisotropy''': how much orientation there is in the structure. <math>0.0</math> means the image is completely isotropic, the sample has no directionality whatsoever. <math>1.0</math> means there is very strong orientation in the structure of the image. Note that these are theoretical minimum and maximum values. Due the stochastic nature of the algorithm, even an empty stack will have non-zero degree of anisotropy.<br />
* '''Radii of fitted ellipsoid''' (optional): the lengths of the radii <math>a \leq b \leq c</math> of the ellipsoid fitted on the MIL points. Degree of anisotropy <math>= 1.0 - a/c</math>.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* The results of this Anisotropy do not stabilize, so it's not repeated automatically like in BoneJ1. However, the results vary less between runs.<br />
* MIL vectors are drawn differently. In BoneJ1 they're drawn in sphere-shapes around random seed points. Here parallel lines from different directions are drawn through the whole stack. We think this method produces more uniform sampling, i.e. there's less chance of a directional bias.<br />
<br />
==== Related publications ====<br />
* Odgaard A (1997), ''Three-dimensional methods for quantification of cancellous bone architecture'', Bone, 20, 315-328, [http://dx.doi.org/10.1016/S8756-3282(97)00007-0 doi:10.1016/S8756-3282(97)00007-0]<br />
* Harrigan TP, Mann RW (1984), ''Characterization of microstructural anisotropy in orthotropic materials using a second rank tensor'', J Mater Sci, 19, 761-767, [http://dx.doi.org/10.1007/BF00540446 doi:10.1007/BF00540446]<br />
<br />
== Area/Volume fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Area/Volume fraction''<br />
<br />
''Area/Volume fraction'' calculates the fraction of bone in an image by it to the whole image. It counts all the foreground voxels, which it assumes represent bone, and compares them to the total number of voxels in the image. More formally defined, the plug-in calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''. In case of a 2D image, it calculates the fraction ''BA/TA'', which is the area of bone per unit area of the sample.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the bone voxels.<br />
* '''Total volume''': volume of the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 2D/3D subspace in the image, i.e. for each channel and time frame. Results will be for ''area'' if image is 2D.<br />
<br />
==== Differences to BoneJ1 ====<br />
* In BoneJ1 the plug-in was called ''Volume fraction''<br />
* Can process 2D images<br />
* Supports hyperstacks <br />
<br />
== Calibrate SCANCO (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Analyze &gt; Calibrate SCANCO''<br />
<br />
Applies the ''mg HA/ccm'' pixel value calibration, i.e. ''HU'' or Hounfield unit calibration stored in the .isq format metadata to the image.<br />
<br />
==== Suitable images ====<br />
An .isq format image generated by Scanco X-ray microtomography scanners.<br />
<br />
== Check voxel depth (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Check Voxel Depth''<br />
<br />
Checks whether slice spacing has been calibrated correctly. Some DICOM images contain slice thickness data in the header information, but thickness is not necessarily the same as the physical distance between consecutive slices' positions.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Connectivity ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Connectivity''.<br />
<br />
The Connectivity plug-in is designed to estimate the number of connected structures i.e. trabeculae in a trabecular network. This ''connectivity'' measure is related to a topological number <math>\chi</math> known as ''Euler characteristic'', ''Euler number'' or ''Euler-Poincaré characteristic''. Mathematically defined connectivity is <math>= 1 - (\chi + \Delta\chi)</math>. Roughly speaking, <math>\chi</math> describes the shape or structure of a topological space. It can also be expressed as <math>\chi = objects - handles + cavities</math>, where a handle is a hole that goes through an object (e.g the hole in a doughnut, or the ear of a coffee mug), and a cavity is enclosed inside one. When measuring trabecular cubes, you need to add <math>\Delta\chi</math> to <math>\chi</math> to get a more accurate estimate of the connectivity of the whole network. The term <math>\Delta\chi</math> corrects for the change in the topology of an object, when it's cut to pieces. <br />
<br />
NB some other Euler characteristic implementations report <math>\chi + \Delta\chi</math> as <math>\chi</math>, i.e. in them the correction <math>\Delta\chi</math> is implicit.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary. The plug-in assumes that there is only one particle in the foreground; to achieve this, run ''Purify''. Having more than one object often leads to negative connectivity.<br />
<br />
==== Results ====<br />
* '''Euler characteristic (χ)''': describes the shape of the object(s) in the image, <math>\chi = objects - handles + cavities</math>.<br />
* '''Corrected Euler (χ + Δχ)''': the Euler characteristic of the part corrected for edge effects to fit the whole.<br />
* '''Connectivity''': gives an estimate of the number of connected trabeculae in the image. Equal to <math>1 - (\chi + \Delta\chi)</math>.<br />
* '''Conn. density''': connectivity divided by unit volume. <br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* The old version reported ''Corrected Euler (χ + Δχ)'' incorrectly as ''Δχ''<br />
<br />
==== Related publications ====<br />
* Odgaard A, Gundersen HJG (1993), ''Quantification of connectivity in cancellous bone, with special emphasis on 3-D reconstructions'', Bone 14: 173-182, [http://dx.doi.org/10.1016/8756-3282(93)90245-6 doi:10.1016/8756-3282(93)90245-6.]<br />
* Toriwaki J, Yonekura T (2002), ''Euler number and connectivity indexes of a three dimensional digital picture'', [http://www.scipress.org/journals/forma/abstract/1703/17030183.html Forma 17: 183-209]<br />
<br />
== Delete slice range (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Stacks &gt; Delete slice range''<br />
<br />
Removes a range of slices from a stack, so that cropping in the Z direction is practical.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
== Ellipsoid factor (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Ellipsoid factor''.<br />
<br />
Ellipsoid Factor is a new method for measuring rod/plate geometry. It uses the axis lengths from prolate, oblate and intermediate elipsoids to determine how prolate or oblate the trabecular space is at a particular point. Highly prolate (javelin-shaped, rod-like) ellipsoids have a single long axis (<math>c</math>) and two short axes (<math>a, b</math>) such that <math>a < b \ll c</math> , whereas highly oblate (discus-shaped, plate-like) ellipsoids have two longer axes (<math>b, c</math>) and one much shorter axis (<math>a</math>) so that <math>a \ll b < c</math>. Calculating <math>EF</math> as the difference in ratios, <math>EF = a/b - b/c</math> leads to a useful scale ranging from <math>-1</math> (oblate, <math>a/b \approx 0, b/c \approx 1</math>) to <math>+1</math> (prolate, <math>a/b \approx 1, b/c \approx 0</math>). <math>EF</math> of <math>0</math> indicates an intermediate ellipsoid where <math>a/b = b/c</math>, which is the case for spheres (<math>a = b = c</math>) and other ellipsoids with axis ratios <math>a:qa:q^{2}a</math>. Ellipsoid Factor runs [[Skeletonize3D]] to get the medial axis of the trabeculae, which is used as the seed for sampling. Ellipsoids are seeded from each voxel on the medial axis. A combination of dilation, contraction, rotation and a small amount of translation is run iteratively until the ellipsoid increases no further in volume.<br />
<br />
The EF at a point in the structure is determined as the EF of the most voluminous ellipsoid which contains that point.<br />
<br />
If you use Ellipsoid Factor in your work, please cite:<br />
Doube M (2015), ''The Ellipsoid Factor for quantification of rods, plates and intermediate forms in 3D geometries'', Frontiers in Endocrinology, 6:15, [http://journal.frontiersin.org/Journal/10.3389/fendo.2015.00015/abstract doi: 10.3389/fendo.2015.00015]<br />
<br />
==== Suitable images ====<br />
A binary 3D image.<br />
<br />
==== Parameters ====<br />
* '''Sampling increment''': distance between sample points on each vector; should be less than the pixel spacing.<br />
* '''Vectors''': number of vectors to sample at each seed point.<br />
* '''Skeleton points per ellipsoid''': allows dense or sparse sampling, a value of <math>1</math> means that an ellipsoid is sampled at every seed point.<br />
* '''Contact sensitivity''': how many vectors must touch the background before dilation stops.<br />
* '''Maximum iterations''': how hard to try to find larger ellipsoids - fitting will stop if no improvement has been made after this number of iterations..<br />
* '''Maximum drift''': how far the centroid may be displaced from its seed point.<br />
* '''EF image''': stack containing EF values for each point contained by at least one ellipsoid and NaN elsewhere.<br />
* '''Ellipsoid ID image''': stack containing the ID of the biggest ellipsoid at each point, ranked in descending order (<math>0</math> is the largest ellipsoid).<br />
* '''Volume image''': image showing the volume of the largest ellipsoid containing that point.<br />
* '''Axis ratio images''': images showing <math>a/b</math> and <math>b/c</math> ratios foreach point containing at least one ellipsoid and NaN elsewhere.<br />
* '''Flinn peak plot''': plot of <math>a/b</math> vs <math>b/c</math> weighted by volume, so bright pixels indicate relatively more of the structure has that axis ratio.<br />
* '''Gaussian sigma:''' amount to blur the Flinn peak plot - set to <math>0</math> for a precise but less 'beautiful' result.<br />
* '''Flinn plot''': unweighted Flinn plot - every ellipsoid is represented by the same sized point regardless of ellipsoid size.<br />
<br />
==== Results ====<br />
* '''EF image''': stack containing EF values. NaN (not a number) values are used in the background. Summary statistics can be obtained by running Analyze > Histogram<br />
* '''Short-Mid image''': stack containing the <math>a/b</math> ratios<br />
* '''Mid-Long image''': stack contining the <math>b/c</math> ratios<br />
* '''Volume image''': stack containing ellipsoid volumes<br />
* '''Max id image''': stack containing the ID of the largest ellipsoid at each point; IDs relate to the sort order based on volume, so ID = 0 is the largest ellipsoid. <math>-1</math> is foreground and background is labelled with a large negative number.<br />
* '''Flinn diagram''': plot of <math>a/b</math> versus <math>b/c</math> values present in the volume<br />
* '''Weighted Flinn plot''': Flinn diagram with peaks of intensity proportional to volume occupied by each (<math>a/b</math>, <math>b/c</math>) ratio<br />
<br />
==== Related publications ====<br />
Salmon PL, Ohlsson C, Shefelbine SJ, Doube M (2015), ''Structure model index does not measure rods and plates in trabecular bone'', Frontiers in Endocrinology, 6:162, [http://dx.doi.org/10.3389/fendo.2015.00162 doi:10.3389/fendo.2015.00162].<br />
<br />
== Fit ellipsoid ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit ellipsoid''.<br />
<br />
Finds the ellipsoid that best fits a set of point or multi-point ROIs in the ROI Manager. ''Fit ellipsoid'' may fail to fit an ellipsoid. The more points you add, the more likely it is to succeed. Points are scaled to the spatial calibration (voxel widht, height &amp; depth) of the input image.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': ROIs with at least nine points in the ROI Manager.<br />
<br />
==== Results ====<br />
* '''Radii''': the radii ''a'', ''b'' and ''c'' of the fitted ellipsoid. Radius ''a'' is the shortest and ''c'' the longest.<br />
* '''Centroid''': ''x'', ''y'' and ''z'' coordinates of the ellipsoid centre point.<br />
<br />
==== Differences from BoneJ1 ====<br />
* Supports multi-point ROIs.<br />
* Plug-in cancels if an ellipsoid can't be found, instead of reporting invalid results.<br />
<br />
== Fit sphere (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fit sphere''.<br />
<br />
Finds the sphere that best fits a set of point ROIs, and optionally displays the image data bounded by the sphere in a new image window. Place a set of point ROIs on structures of interest, hitting [T] to add each point to the ROI Manager. Fit Sphere takes the coordinates of the points from the ROI Manager and applies a least-squares optimisation.<br />
<br />
==== Suitable images ====<br />
A 3D image.<br />
<br />
==== Parameters ====<br />
* '''ROI Manager''': populated with at least 5 point ROI's<br />
* '''Copy Sphere''': Create a new stack containing image data from within the best-fit sphere.<br />
* '''Padding''': Number of black pixels to put between the sphere and the sides of the image<br />
* '''Inner Cube''': Create a new stack containing image data from the cube that just fits inside the best-fit sphere.<br />
* '''Outer Cube''': Create a new stack containing image data from the cube that the best-fit sphere just fits inside.<br />
* '''Crop Factor''': Radius used for generating new images is multiplied by crop factor so that a bigger or smaller volume can be produced.<br />
* '''Add to ROI Manager''': Add the sphere to the ROI Manager as a set of circular ROIs<br />
* '''Clear ROI Manager''': Clear any existing ROIs in the Manager prior to adding circles<br />
<br />
==== Results ====<br />
* '''X Centroid''': x-coordinate of sphere's centroid<br />
* '''Y Centroid''': y-coordinate of sphere's centroid<br />
* '''Z Centroid''': z-coordinate of sphere's centroid<br />
* '''Radius''': length of radius<br />
* '''Images (optional)''': images containing a copy of the original data within the sphere, or within cubes bounding or bounded by the sphere.<br />
<br />
== Fractal dimension ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fractal dimension''.<br />
<br />
This plug-in estimates the fractal dimension of an image by applying the box-counting algorithm. In this algorithm grids of diminishing size are scanned over the image, and the number of boxes containing at least one foreground voxel is counted. As the box size decreases and the grid becomes finer, the proportion of foreground boxes increases in a fractal structure. See [https://en.wikipedia.org/wiki/Box_counting Wikipedia] for further details. BoneJ uses a fixed-grid scan, with an option to try to find the optimal covering.<br />
<br />
The box counting algorithm produces a pair of <math>(log(n), -log(m))</math> values for each iteration it runs. Here n = number of boxes with foreground, and m = box size. These pairs are passed to a curve-fitting algorithm, which returns the slope of the linear function which describes them ([https://en.wikipedia.org/wiki/Linear_regression regression fit]). The coefficient of this slope is the fractal dimension.<br />
<br />
Fractal dimension is markedly influenced by the parameters selected for the box counting algorithm, so it's worth running it several times with different values to find an accurate measure for your image.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* ''Starting box size (px)'': the size (sides) in pixels of a box in the sampling grid in the first iteration of the algorithm.<br />
* ''Smallest box size (px)'': the minimum size in pixels of a box in the grid. When box size becomes smaller than this limit, the algorithm iterates one more time, and then stops.<br />
* ''Box scaling factor'': the term used to divide the box size after iteration. For example, a scaling factor of <math>2.0</math> halves the size at each step.<br />
* ''Grid translations'': how many times at each iteration the grid is moved to try to the find the optimal covering. The optimal covering covers the objects in the image with the least amount of boxes. The larger the parameter the more likely it is that optimal covering is found. However, this slows down the plug-in considerably.<br />
* ''Automatic parameters'': if checked, then the plug-in runs with default parameters.<br />
* ''Show points'': if checked, then the plug-in displays the <math>(log(n), -log(m))</math> values it calculated. <br />
<br />
==== Results ====<br />
* ''Fractal dimension'': the [https://en.wikipedia.org/wiki/Fractal_dimension fractal dimension] of the image. For example, the Koch snow flake has a fractal dimension of 1.262.<br />
* ''R²'': the [https://en.wikipedia.org/wiki/Coefficient_of_determination coefficient of determination] of the line fitted to the <math>(log(n), -log(m))</math> points.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks<br />
* Algorithm parameters can be changed by the user.<br />
<br />
==== Related publications ====<br />
Fazzalari NL, Parkinson IH (1996), ''Fractal dimension and architecture of trabecular bone'', J Pathol, 178: 100-5, [http://dx.doi.org/10.1002/(SICI)1096-9896(199601)178:1%3C100::AID-PATH429%3E3.0.CO;2-K doi:10.1002/(SICI)1096-9896(199601)178:1<100::AID-PATH429>3.0.CO;2-K].<br />
<br />
== Inter-trabecular angles ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Inter-trabecular Angles''.<br />
<br />
The plug-in was designed to analyse the angles between trabeculae of cancellous bone. First it calls [[Skeletonize3D]] to thin the input image (if necessary). Then it calls [[AnalyzeSkeleton]], which creates a graph of the largest skeleton (by number of nodes) in the thinned image. The graph consists of nodes and the edges that connect them. Nodes are also known as vertices, and edges as branches. Roughly speaking the edges correspond to trabeculae and the nodes to the junction points, where trabeuculae meet.<br />
<br />
The graph is often not a perfect representation of the trabecular network in the input image. ''Inter-trabecular angles'' offers many options to adjust the graph's topology and filter out artefacts that may obfuscate or skew the results. First it allows you to filter out nodes with too many or too few edges. Secondly it can be used to prune very short edges, which often do not represent actual trabeculae. <br />
<br />
[[File:Ita_types.png|left|150 px|Types of edges in pruning]]<br />
Pruning works differently for different types of edges. There are four kinds: outer, dead-end, inner and short. An outer edge doesn't interconnect different parts of a graph. In other words, one (and only one) of its endpoints connects to only one branch, i.e. the edge itself. In the figure the outer edge is colored black. A dead-end (blue) is an outer edge whose length is less than the minimum set by the user, i.e. it's a short, outer edge. An inner edge (green) connects to end points with more than one branch. A short edge is an inner edge, whose length is less than the set minimum. When a dead-end is pruned, it with its "lonely" end-point are removed from the graph. When a short edge is pruned, it and it's endpoints are removed, and a new node is placed at the midpoint of the former. This new node connects to all the branches the previous nodes connected to.<br />
<br />
''Inter-trabecular angles'' offers two further options to control pruning: ''iteration'' and ''clustering''. Iteration repeats pruning until no new short edges are found. Sometimes pruning can create new short edges, and thus the graph may still have them after one iteration. However, iteration can alter the structure of the graph too dramatically. Clustering searches for all nodes connected by short edges, before removing any. In the figure, clustering pruning would remove the four nodes and the red edges between them in one go. It would create a new node at the center of the previous four, and connect it to the blue and green edges. When pruning is not clustering, it removes edges one-by-one. This changes the end result depending on the order the edges are traversed. Clustering creates the same result each time. <br />
<br />
Pruning also removes loops and redundant parallel edges. The former connects to the same node on both ends, and the latter connects two nodes that are already connected by another edge. <br />
<br />
The pruning and filtering features were added so that we can replicate and continue from the research of [https://doi.org/10.1016/j.actbio.2016.08.040 Reznikov et al.]<br />
<br />
==== Suitable images ====<br />
An 8-bit, binary 2D or 3D image. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
*'''Minimum valence''': minimum number of branches for a node to be included in the analysis.<br />
*'''Maximum valence''': maximum number of branches for a node to be included in the analysis.<br />
*'''Minimum trabecular length (px)''': minimum length for a branch to be preserved in the pruning. Length is calculated as the distance between the endpoints of a branch.<br />
** This length is also displayed in the units of the image calibration<br />
*'''Margin (px)''': minimum distance of a node from image stack edges to be included in the analysis. Having nodes too close to the edges can make the results less accurate, because you get more branches that do not terminate to a node at the other end.<br />
*'''Iterate pruning''': repeat pruning until no more new short branches are discovered. When true, the topology of the graph is likely to change more in the pruning.<br />
*'''Use clusters''': if true then the pruning result is independent of the order in which the graph is traversed. False corresponds with methodology in Reznikov's article. See above for more details.<br />
*'''Print centroids''': Print the centroids (center coordinates) of the node pairs at the ends of each edge.<br />
*'''Print % culled edges''': Print statistics of different types of edges pruned.<br />
<br />
==== Results ====<br />
*'''Inter-trabecular angles''': angles between each branch of each node included in the analysis. Sorted into columns according to the number of branches per node. For example, column ''"3"'' shows the angles between branches of nodes with three branches.<br />
*'''Centroids''' (optional): A table of the center coordinates of the node pairs at the ends of each edge.<br />
*'''Culled edge percentages''' (optional): A table showing the percentages of different kinds of edges pruned, compared to the total number of edges in the analysed graph.<br />
*'''Skeleton''' (optional): if the plug-in had to skeletonise the input image, it displays the result of the thinning.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Inter-trabecular angles generalizes the idea of ''Triple point angles'' for any types of points. It also provides more tools for adjusting the graph for analysis.<br />
<br />
==== Related publications ====<br />
Reznikov, N et al. (2016), ''Inter-trabecular angle: A parameter of trabecular bone architecture in the human proximal femur that reveals underlying topological motifs'', Acta Biomaterialia, 44: 65--72, [https://doi.org/10.1016/j.actbio.2016.08.040 doi:j.actbio.2016.08.040].<br />
<br />
== Local thickness ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Thickness''.<br />
<br />
This plug-in includes [[Local_Thickness]] in BoneJ, and provides some additional options &amp; results. Local thickness measures ''the diameter of the largest sphere that fits inside the object and contains the point'' for each point i.e. foreground voxel in an image. The plug-in calculates mean and standard deviation of the trabecular thickness (Tb.Th) or trabecular spacing (Tb.Sp) directly from pixel values in the resulting thickness map. Foreground voxels are considered trabeculae, and background voxels are the spacing. Processing time is heavily dependent on feature size (in pixels); large features can take a very long time to process.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Parameters ====<br />
* '''Calculate''': chooses which thickness maps to calculate - trabecular thickness, trabecular spacing, or both. In order to calculate trabecular spacing, the image voxels are inverted.<br />
* '''Show thickness maps''': display the calculated thickness maps or not.<br />
* '''Mask thickness maps''': remove artifacts from the thickness maps. Artifacts are foreground voxels not present in the original image.<br />
* '''Crop to ROI manager''': create thickness maps only from the area bounded by the ROIs in the ROI manager. Checking this option requires you've added ROIs to the ROI manager.<br />
<br />
==== Results ====<br />
* The mean and standard deviation for each thickness map calculated.<br />
* Displays thickness map images if ''Show thickness maps'' was selected. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Calls the latest version of [[Local_Thickness]].<br />
* Thickness values for background voxels are marked ''NaN'' instead of ''0''.<br />
<br />
==== Related publications ====<br />
* Dougherty R, Kunzelmann K (2007), ''Computing local thickness of 3D structures with ImageJ'', Microsc. Microanal., 13: 1678-1679, [http://dx.doi.org/10.1017/S1431927607074430 doi:10.1017/S1431927607074430]<br />
* Hildebrand T, Rüegsegger P (1997), ''A new method for the model-independent assessment of thickness in three-dimensional images'', J. Microsc., 185: 67-75, [http://dx.doi.org/10.1046/j.1365-2818.1997.1340694.x doi:10.1046/j.1365-2818.1997.1340694.x]<br />
<br />
== Moments of inertia (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Moments of Inertia''<br />
<br />
Calculates the three orthogonal principal axes and moments of inertia around those axes. It includes pixels with values between upper and lower limits, which can be defined in terms of unitless grey values or Hounsfield units (HU). It optionally creates a new stack with the image centred and rotated so that the principal axes are parallel to the image stack's x, y and z axes. Calculations are limited to a rectangular ROI if one is drawn. The plugin will guess whether the image is HU calibrated, and if so, apply HU limits of bone (0-4000 HU), otherwise it will calculate auto-thresholds based on the stack's histogram. If a calibration curve is known, the coefficients can be added to get weighted calculations. Aligning a bone with Moments of Inertia may be a useful step prior to Slice Geometry if bones are not aligned with the image z axis.<br />
<br />
==== Suitable images ====<br />
An 8-bit or 16-bit image.<br />
<br />
==== Parameters ====<br />
* '''Start slice''': First slice to include in calculations<br />
* '''End slice''': Last slice to include in calculations<br />
* '''HU Calibrated''': Plugin will guess whether the image is HU calibrated. If image is HU calibrated, make sure the box is checked and enter HU calibrated numeric values in the following fields<br />
* '''Bone Min''': Lower threshold, in either uncalibrated greys or HU<br />
* '''Bone Max''': Upper threshold, in either uncalibrated greys or HU<br />
* '''Slope''': m where physical density = m × pixel value + c<br />
* '''Y Intercept''': c where physical density = m × pixel value + c<br />
* '''Align result''': Draw a new stack with the principal axes parallel to the image axes<br />
* '''Show axes (2D)''': Draw the axes in white on the aligned image<br />
* '''Show axes (3D)''': Display the stack and its principal axes in a 3D Viewer window<br />
<br />
==== Results ====<br />
* '''Image (optional)''': a copy of the input image centered and aligned with the principal axes<br />
* '''Xc''': Centroid x-coordinate (mass-weighted by calibrated density)<br />
* '''Yc''': Centroid y-coordinate<br />
* '''Zc''': Centroid z-coordinate<br />
* '''Vol''': Total volume of thresholded voxels<br />
* '''Mass''': Mass of bone, from pixel values and density calibration coefficients<br />
* '''Icxx''': Moment around x axis passing through centroid<br />
* '''Icyy''': Moment around y axis passing through centroid<br />
* '''Iczz''': Moment around z axis passing through centroid<br />
* '''Icxy''': Off-axis term for constructing inertia tensor<br />
* '''Icxz''': Off-axis term for constructing inertia tensor<br />
* '''Icyz''': Off-axis term for constructing inertia tensor<br />
* '''I1''': Moment around the shortest principal axis<br />
* '''I2''': Moment around the middle principal axis<br />
* '''I3''': Moment around the longest principal axis<br />
* '''Verbose output in Log window'''<br />
** '''Eigenvalues''': Result of of eigenvalue decomposition. Moments of inertia<br />
** '''Eigenvectors of principal axes''': orientation of input image<br />
** '''Inverse eigenvector matrix''': used to map voxel positions in the aligned image back to voxel positions in the original image<br />
* Optional 3D display of principal axes<br />
<br />
== Optimise threshold (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Optimise Threshold''<br />
<br />
Several histogram-based methods exist for automatic determination of threshold for binary segmentation, but in ImageJ these are currently limited to pixel values in a single slice. The result can be excluding high values in a stack that are higher than the highest value in the current slice. This plugin uses all the pixels in a stack to construct a histogram and uses ImageJ's built-in isodata algorithm to determine the threshold. It optionally tests values either side of the initial auto-threshold for connectivity, because connectivity is very sensitive to image noise. The plugin attempts to find the threshold that results in minimal connectivity. Purification, erosion and dilation can improve the connectivity estimate, so Purify is always called, and erosion and dilation are applied as part of a sequence: purify, erode, purify, dilate.<br />
<br />
==== Suitable images ====<br />
An 8-bit of 16-bit image<br />
<br />
==== Parameters ====<br />
* '''Threshold Only''': Determine the threshold from the stack histogram only<br />
* '''Apply Threshold''': Replace the input image with a thresholded version<br />
* '''Show Plot''': Display a graph showing connectivity versus threshold<br />
* '''Tests''': Number of different thresholds to test for connectivity<br />
* '''Range''': Proportion of the initial threshold to test above and below initial thresholds<br />
* '''Subvolume Size''': Size of the volume to test for connectivity. Set small for a faster run and large to test the whole stack<br />
* '''Erosion Cycles''': Number of times to erode the stack after initial purification<br />
* '''Dilation Cycles''': Number of times to dilate the stack after secondary purification<br />
<br />
==== Results ====<br />
* '''Thresholded stack (optional)'''<br />
* '''Plot of connectivity versus threshold (optional)'''<br />
* '''Log of optimal threshold value'''<br />
<br />
== Orientation (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Orientation''<br />
<br />
Sets the direction in a 2D image, without rotating the image or changing it in any way. ''Slice Geometry'' (see below) uses ''Orientation'' to calculate diameter, second moments of area and section moduli around anatomic axes set by the user.<br />
<br />
==== Suitable images ====<br />
A 2D image.<br />
<br />
==== Parameters ====<br />
* '''Orientation''': input field displays current orientation (clockwise from 12 o'clock) and takes keyboard input<br />
* '''deg / rad''': display and set orientation in degrees or radians<br />
* '''Principal direction''': the main direction, the head of which is displayed in red<br />
* '''Secondary direction''': the orthogonal direction<br />
* '''Reflect''': swap the labels on this axis<br />
<br />
==== Results ====<br />
* '''Orientation axes''': draws the axes of the orientation on the image.<br />
<br />
== Purify (WIP) ==<br />
Menu path: ''Plugins &gt; BoneJ &gt; Purify''<br />
<br />
Purify locates all particles in 3D and removes all but the largest foreground and background particles.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D, 8-bit and binary.<br />
<br />
==== Parameters ====<br />
* '''Labelling algorithm''':<br />
** '''Mapped''': Non-recursive, memory efficient and fast.<br />
** '''Multithreaded''': use multiple cores and job chunking to reduce recursion. Fast on small stacks and if you have many CPU cores.<br />
** '''Linear''': Non-recursive but heavy on RAM and single-threaded. Fast on big stacks, but only if you have the memory.<br />
* '''Chunk Size''': number of slices to use in each particle labelling thread. If images are large, set this to 2<br />
* '''Performance Log''': Show verbose performance information to help tune your system<br />
* '''Make copy''': If checked, shows the result in a new window; if unchecked the result replaces the original image.<br />
<br />
==== Results ====<br />
* '''Performance metrics (optional)'''<br />
** '''Threads''': Number of CPU cores used<br />
** '''Slices''': Number of slices in the input image stack<br />
** '''Chunks''': Number of chunks of slices, each chunk is processed independently<br />
** '''Chunk size''': Number of slices per chunk<br />
** '''Last chunk size''': size of the last chunk (the remainder chunk)<br />
** '''Duration''': time in seconds to complete purification<br />
* '''Purified image''': optionally in a new image window.<br />
<br />
== Skeletonise ==<br />
Menu path ''Plugins &gt; BoneJ &gt;Skeletonise''.<br />
<br />
This plug-in simply includes [[Skeletonize3D]] in BoneJ. It adds some additional validation to check that your image suits the tool.<br />
<br />
==== Suitable images ====<br />
The input image must be 2D or 3D, 8-bit and binary. Hyperstacks are not supported.<br />
<br />
==== Differences to BoneJ1 ====<br />
Calls the latest version of [[Skeletonize3D]].<br />
<br />
== Slice geometry (WIP) ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Slice Geometry''<br />
<br />
Slice Geometry calculates cross-sectional geometric properties of shapes: cross-sectional area, centroid, mean density, second moment of area, section modulus, Feret diameter and local thickness (2D and 3D). Measurements can be limited to a rectangular ROI. If your bone is not well aligned with the image axes, you may find it useful to align the bone to its principal axes using Moments of Inertia or by exporting a transformed volume from the ImageJ 3D Viewer. Importantly, no assumption of geometry is made for any of the measurements.<br />
<br />
==== Suitable images ====<br />
A 2D or 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Bone''': Slice Geometry will guess from your image title the bone it is working on. If it is wrong, correct it. If your bone of interest isn't listed, email me.<br />
* '''2D Thickness''': Run Thickness on a per-slice basis; this fits circles rather than spheres<br />
* '''3D Thickness''': Run Thickness on the whole stack, fitting spheres, then report results per slice<br />
* '''Draw Axes''': Draw axes on an annotated copy of the stack<br />
* '''Draw Centroids''': Draw centroids on an annotated copy of the stack<br />
* '''Annotated Copy (2D)''': Create a new stack showing the centroids and principal axes<br />
* '''3D Annotation''': Display the stack, principal axes and centroids in the 3D viewer<br />
* '''Process Stack''': Calculate parameters for all slices in the stack<br />
* '''Clear Results''': Remove all data in the results table without saving, prior to calculating parameters<br />
* '''Use Orientation''': Also calculate parameters based on directions defined in Orientation<br />
* '''HU Calibrated''': Allows you to enter your thresholds in Hounsfield units (HU) or uncalibrated units<br />
* '''Bone Min''': minimum pixel value to use in calculations<br />
* '''Bone Max''': maximum pixel value to use in calculations<br />
* '''Slope''': <math>m</math> where physical density <math>= m * pixel value + c</math><br />
* '''Y Intercept''': <math>c</math> where physical density <math>= m * pixel value + c</math><br />
* '''Note''': density-weighted calculations are only applied to centroid determination at present<br />
* '''Partial volume compensation''': Use model that assumes Gaussian blur of imaging modality and linear transform between pixel value and sample 'density' to correct for blurred and pixelated images (e.g. small bone in clinical CT)<br />
* '''Background''': pixel value that corresponds to zero bone density (could be the 'fat', 'air' or 'muscle' pixel value)<br />
* '''Foreground''': pixel value that corresponds to 100% bone density<br />
* '''A rectangular ROI (optional)''': if there's a ROI, calculations are limited to its area.<br />
<br />
==== Results ====<br />
* '''Images (optional)''': displays the result images selected in the parameters<br />
* '''Bone code''': Unique numeric identifier for the anatomic name of each bone. Further bone codes can be added to BoneJ on request<br />
* '''Slice''': slice number indicating which slice contributed image data for this row of the results<br />
* '''CSA''': cross-sectional area<br />
* '''X cent.''': Centroid x-coordinate<br />
* '''Y cent.''': Centroid y-coordinate<br />
* '''Density''': mean physical density, calculated from pixel values and calibration coefficients<br />
* '''wX cent''': Density-weighted x-coordinate of centroid<br />
* '''wY cent''': Density-weighted y-coordinate of centroid<br />
* '''Theta''': angle of minor axis (axis for Imin, the long axis of your specimen's cross section) from the horizontal, ranging from <math>-\pi/2</math> to <math>\pi/2</math>, with positive as clockwise<br />
* '''R1''': maximum chord length from minor axis<br />
* '''R2''': maximum chord length from major axis<br />
* '''Imin''': Second moment of area around major axis<br />
* '''Imax''': Second moment of area around minor axis<br />
* '''Ipm''': Product moment of area (= 0 if no errors are present, e.g. due to pixelation)<br />
* '''Zmax''': Section modulus around major axis (Imax / R2)<br />
* '''Zmin''': Section modulus around minor axis (Imin / R1)<br />
* '''Zpol''': Polar section modulus<br />
* '''Feret Min''': Minimum caliper width<br />
* '''Feret Max''': Maximum caliper width<br />
* '''Feret Angle''': Orientation of maximum caliper width<br />
* '''Perimeter''': Distance around external surface<br />
* '''Max Thick 2D''': Maximum thickness determined by local thickness in 2D<br />
* '''Mean Thick 2D''': Mean thickness determined by local thickness in 2D<br />
* '''SD Thick 2D''': Standard deviation of the mean thickness determined by local thickness in 2D<br />
* '''Max Thick 3D''': Maximum thickness in this slice determined by local thickness in 3D<br />
* '''Mean Thick 3D''': Mean thickness in this slice determined by local thickness in 3D<br />
* '''SD Thick 3D''': Standard deviation of the mean thickness in this slice determined by local thickness in 3D Directional measurements, using Orientation directions, and the specimen's slice centroid<br />
* '''A (rad)''': Principal orientation (direction A)<br />
* '''B (rad)''': Secondary orientation (direction B)<br />
* '''IAa''': Second moment of area around Aa axis<br />
* '''IBb''': Second moment of area around Bb axis<br />
* '''ZAa''': Section modulus around Aa axis<br />
* '''ZBb''': Section modulus around Bb axis<br />
* '''RAa''': maximum chord length from Aa axis<br />
* '''RBb''': maximum chord length from Bb axis<br />
* '''DAa''': Calliper diameter in direction of Aa<br />
* '''DBb''': Calliper diameter in direction of Bb<br />
<br />
== Surface area ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Surface area''<br />
<br />
''Surface area'' creates a mesh from the bone in the image, and then calculates the area of the surface of the mesh. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone.<br />
<br />
==== Suitable images ====<br />
A 3D binary image.<br />
<br />
==== Parameters ====<br />
* '''Export STL file(s)''': if checked, then the meshes created from the image are saved as .stl-files. A dialog opens for you to select a folder for the files.<br />
<br />
==== Results ====<br />
* '''Surface area''': the surface area of the bone mesh<br />
* '''STL-file''': the mesh created from the bone image<br />
<br />
The surface area is reported and an .stl-file saved separately for each 3D subspace in the image. <br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Isosurface''<br />
<br />
== Surface fraction ==<br />
Menu path ''Plugins &gt; BoneJ &gt; Fraction &gt; Surface fraction''<br />
<br />
''Surface fraction'' calculates the fraction of bone volume in an image by comparing meshes created from bone particles and the whole image. A mesh is a collection of triangular faces that defines the shape of an object in 3D graphics. The plug-in assumes that all foreground voxels represent bone. <br />
<br />
More formally defined, ''Surface fraction'' calculates the fraction ''BV/TV'', which is the volume of mineralised bone ''BV'' per unit volume of the sample ''TV''.<br />
<br />
==== Suitable images ====<br />
The input image must be 3D and binary.<br />
<br />
==== Results ====<br />
* '''Bone volume''': volume of the mesh created from bone voxels.<br />
* '''Total volume''': volume of the mesh created from the whole image.<br />
* '''Volume ratio''': ratio of bone to total volume.<br />
<br />
The measures are reported separately for each 3D subspace in the image, i.e. for each channel and time frame.<br />
<br />
==== Differences to BoneJ1 ====<br />
* Supports hyperstacks.<br />
* Results differ, because the marching cubes and mesh volume implementations are different.<br />
* In BoneJ1 this plug-in was called ''Volume fraction''<br />
<br />
== Results table ==<br />
The BoneJ plug-ins print their results into a shared result table. This is because we often need to calculate several measures for the same image, so it's handy to have them on one row. Repeated measures for the same image are reported on different rows. The results persist even if the table is closed. To clear the table run ''Plugins &gt; BoneJ &gt; Table &gt; Clear BoneJ results''.<br />
<br />
Note that some of the plug-ins (marked with ''WIP'') still use a ImageJ1 style results table that works slightly differently. As they are modernized they'll move to use the same new table than others.<br />
<br />
== Where is my favorite plug-in? ==<br />
We've decided to remove some plug-ins from BoneJ experimental. ''Interpolate ROIs'', ''Neck shaft angle'', ''Plateness'' and ''Structure model index'' have been discontinued. ''Dilate'' and ''Erode'' come pre-packaged with ImageJ, so there's no need to include them.<br />
<br />
Support for ''Kontron IMG'', ''Scanco ISQ'' and ''Stratec pQCT'' file formats has been moved to [[SCIFIO]]. Just run ''Edit &gt; Options &gt; ImageJ2'', and check ''Use SCIFIO when opening files''. When the option is enabled, these kinds of files can be opened from ''File > Open'' or dragging &amp; dropping them like any other format. <br />
<br />
''Distribution analysis'' and other pQCT related tools can now be downloaded independently from the [[PQCT]] update site.<br />
<br />
== Licence ==<br />
BoneJ experimental is free, open-source software. You can redistribute it and/or modify it under the terms of the [https://github.com/bonej-org/BoneJ2/blob/master/LICENCE.md BSD 2-clause license]. The software is provided "as is" and any warranties are disclaimed. In no event shall the copyright holder or contributors be liable.<br />
<br />
== Citation ==<br />
If you'd like to cite the software, we will soon publish a paper about BoneJ experimental. We recommend you cite the specific release used in your research.</div>Mdoube