Cortical Thickness Mapping

Stradwin can estimate various parameters, including thickness, of the cortex of a bone surface and display these as colour washes mapped to the surface in 3D, using the technique described in the publications list. This is only possible with data which has been loaded from a DICOM or image file.

This measurement can either be performed interactively at user-controlled locations in the data set, or automatically on a previously defined 3D surface within the data. The best values are achieved with a prior estimate of what the expected HU value of the cortex would be if the imaging process had not blurred the data at all. This estimate can either be manually entered (for instance by looking at values for very thick cortices), or automatically estimated from the data.

Each cortical thickness estimate is calculated by looking at values along a line through the data. The first slider on this task page controls the length of this line: it should be approximately three times the thickness of the thickest cortex you wish to measure. The second slider determines the 'width' of this line: if this is set to anything other than zero, then the data will be averaged in a direction orthogonal to the line before anything is estimated. This can be useful for very high resolution data, since it preserves the resolution through the cortex, whilst averaging data over the cortical surface. The outer cortical edge is automatically aligned before this averaging takes place, in order to preserve as much resolution as possible through the cortex.

Following this there are checkboxes which control some of the details of the estimation process. The '+inner' and '+outer' checkboxes should be ticked if you want to allow for an additional bone surface either just outside or just inside the cortex you wish to measure. These also enable the measurement of joint space (between the outer cortical surface and a nearby outer bone surface) or large pore space (between the inner cortical surface and a nearby inner bone surface). The 'Use local maximum (FWHM)' checkbox can be used to force Stradwin to use the less accurate Full-Width Half-Maximum technique, so long as the 'Cortical density' box has been left grey. The 'Model metal in CT data' allows the process to take account of the presence of metal in CT data.

The following boxes can be used to control what gets estimated by Stradwin, and what is fixed before the estimation. If you enter a number in any of these boxes and press the return key (or move to another control), the boxes will become white and this number will be fixed. If you delete the contents of any box, the boxes will become grey and the value will be calculated dynamically by the cortical thickness algorithm. For cortical thickness estimation as outlined in the reference above, the cortical density (HU) should be defined (i.e. the box has a value in it and is white), and the other boxes left grey.

Alternatively, if there is currently a threshold selected in the Draw task page, so that some data regions are displayed in magenta, cortical thickness will be measured by thresholding, not using the algorithm described above. In this case there are two options. If the 'Use local maximum (FWHM)' box is not ticked, then the current magenta threshold will be used to determine the cortical edges. Otherwise, thresholds will be chosen for each edge which are exactly in between the cortical density and either the outer or inner density. If these are undefined (the corresponding box is grey), then either the maxima or minima from the data will be used for these values.

During thickness estimation, the thickness visualisation page displays the results of the estimation procedure at each location.

Interactive thickness estimation

If the thickness task page is visible, the measure tool can be used to define the location for which a cortical thickness estimate is desired. This can either be done in the image window or in the 3D window.

In the image (top-left) window, zoom the image to an appropriate level, then click at the outer bone surface and drag the mouse away from the bone so that the line passes through the cortex orthogonal to the outer bone surface. Cortical thickness estimates will be displayed dynamically as the line is moved, and will also update if any of the model or line parameters are changed.

In the 3D window, simply click on a pre-existing 3D surface, and a measurement will be made at that point in the surface, with a direction corresponding to the surface normal.

This provides an easy method for performing a spot-check thickness measurement. See the thickness visualisation page for details of what is displayed for each thickness estimate.

Thickness mapping over a surface

To map cortical thickness over a surface or to automatically calculate an appropriate cortical CT value, the bone surface must first be defined. This can be done using the draw task page. Define each bone you wish to map the cortex over as an individual object in this task page, give them appropriate names, and ensure you have created the surface using the 'Update all' button on this task page. The surface resolution will control how many cortical thickness estimates are made: there is one estimate for every vertex in the constructed surface. A good way to start the definition of the surface is to make use of the 'every frame' slider in the 'threshold' section, which will allow automatic thresholding of the entire data set. However, it is likely the result of this will need manual editing.

If you want to calculate thicknesses from just a part of a surface, for instance for looking at cartilage rather than bone, then you can first create a new surface patch using the procedure outlined in the draw task page. If you then save this patch, you can in future import it as a new surface as described below.

Alternatively, you can use the 'Import surface' button on the draw task page to directly import a surface you have generated in some other application. Note, however, that if the distribution of mesh vertices is not homogeneous, you will not get evenly sampled thickness estimates, and any smoothing applied to the estimates will not be correct (the smoothing works by averaging over vertex neighbourhoods, so the kernel will be reasonably constant and isotropic only if the vertex distribution is homogeneous). In contrast, meshes created within Stradwin are suitably homogeneous.

Once a surface has been created or imported, return to the thickness task page, and the 'Estimate cortical density' and 'Current surface' buttons should now be enabled.

First press the 'Estimate cortical density' button. This will look at all the bone surfaces which have been defined and use these to provide an estimate of cortical density. Note that during this process, some of the previously mentioned controls will be set to specific values which are appropriate for estimating density: they will be returned to the user-defined values afterwards. At the end of this process, some graphical results can be shown to allow you to validate whether this estimate seems realistic. Having done this, the estimated value is automatically entered in the 'Cortical density' box. If the 'Current surface' box is set to 'none', a single cortical density estimate will be generated for all the available surfaces. If you want separate estimates for each surface, then set the 'Current surface' to the surface you want before pressing the 'Estimate cortical density' button.

To start cortical thickness mapping, first select one of the defined bone surfaces in the 'Current surface' box, then press 'Map thickness over surface'. Having completed the estimation process, cortical thickness will be shown as a colour wash over the surface in the 3D window. A key for this colour wash is shown below this window. If the process was cancelled at some point, cortical thicknesses will still be shown for the parts of the surface which had already been processed.

Cortical thickness estimates, density estimates, joint space and pore width estimates, and measurement error at each location can all be saved to external files, by using the 'Save thickness values and surface' button. This will save 3D files defining the cortical surface, and binary files with one measurement per surface vertex, each listed in the same order as the vertices appear in the main 3D file. The binary files are all stored using double-precision floating point. The _err files contain the estimated standard deviation of the error at each measurement recorded in the corresponding _dat file. If any measurement is not valid, it is set to zero, with the associated error set to the special value of 1e10.

Since Stradwin v5.2, the default format of these files contains an additional 256-byte header which indicates the range of the data values and includes a comment as to the time and stradwin version used to create this file. The file names are as follows, with the root filename "this_femur":

The previous format can still be selected by manually setting "RES_DAT_THICKNESS_FILES=0" in the stradwin.ini configuration file. This is the same, except for the omission of the 256-byte header, and slightly different file names as follows:

Not all of these files will be written in all circumstances. The endocortical blur file will only be written if a value has been specified for the Gauss FWHM blur. The cortical surfaces and outer surface files will only be written if the '+outer' checkbox has been ticked, and the estimation was not done by the FWHM technique.

Files can also be loaded so long as they exactly match the number of vertices in the currently selected surface.

Creating the entire cortical surface

The cortical thickness mapping process above starts with an approximate definition of the outer (periosteal) surface, but in the process of calculating cortical thickness it estimates the exact locations of both the outer and inner (endocortical) surfaces. It is possible to create a new object from these measurements which exactly defines both inner and outer surfaces of the cortex, as well as a cap covering the cortex where the DICOM image data ends.

Such a cortical layer object can be created (once cortical mapping is complete) by using the 'create cortical layer object' button, having set the object (on the draw task page) which this should be assigned to with the drop down list above this button. This object is slightly unusual, in that it is derived from another object, i.e. the approximate cortical surface used to create the thickness values. This means that if the original cortical surface is deleted, the derived cortical layer object will also be deleted.

A slightly more complex form of smoothing is used when creating the cortical layer object, which takes into account local consistency in the location of the periosteal surface in order to reduce the impact of occasional missing or incorrect thickness data. The extent of this smoothing is controlled by the smoothing controls in the draw task page in the usual manner.

Measuring thickness from a pre-defined surface

It is also possible to measure the thickness directly from a surface which already includes both sides of the bone, for instance a skull surface. In this case, selecting a surface and then pressing 'Get thickness from surface' will measure the distance from each point on the surface, along the corresponding surface normal, to the nearest other part of that surface (ie. generally the opposite side of the bone).