Example 21i: FE geometric face-fitting to laser scanned bone data

This example covers:

This example links to the following examples which also contain relevant information: The process described below is that used by the NERF-funded musculoskeletal modelling project currently being undertaken in the Bioengineering Institute for production of volume meshes for the irregular bones of the human body.

Created by: Steven Thrupp 27 Aug 2002

Creating an initial mesh: using the Faro Arm

The initial linear Lagrange mesh used in this process was created using our Faro Arm. The process of using the Faro Arm in constructing an initial mesh is described in example 21d.

Obtaining Data for Fitting: Model Maker 4

While use of the HLS (Hand Held Laser Scanner) is described in example 21d, this example gives a brief description of our other laser scanner, Model Maker 4 (and a pointer to more extensive documentation for its use and calibration). Model Maker 4 is a Faro Arm-mounted laser scanner. As such it has a number of advantages over the HLS:

Figure 1: Faro-mounted laser scanner

In order to use the Laser scanner, or if using it for the first time after a period of disuse, there are two processes the user should go through first. First, you should ensure that the Faro Arm itself is calibrated and second, ensure that the laser scanner is correctly aligned with the Faro-Arm. This is a slightly time-consuming process however it is essential to ensure that these two things are correct otherwise one will run into difficulty down the line when trying to align your data within the Model Maker package.

Faro Arm Calibration

Calibrating the Faro arm is straightforward. It is described in example 21d however is described here again on the Windows 2000 OS. Program Menu >> Faro >> Caliper 3D. Within Caliper 3D go Settings >> Probes. Within This dialogue boss select either Point Probe or Ball Probe. If Ball probe you will need to specify the diameter. (If point probe no diameter is necessary.) Then look in the Calibration box within the current dialogue box and go 1"Ball. Depressing this button will provide you with a new dialogue box. From this point on you are required to obtain 27 points by clicking on the 1"Ball magnetically connected to the base of the Faro Arm. The points should be obtained in a reasonably uniform fashion (ie, 5 points around the horizontal equator of the ball, then 5 around the vertical, followed by e.g. around the top of the ball etc.). Points are obtained by clicking a front button on the Faro Arm when in position and then clicking a back button in order to accept the the point you have just obtained. The software will count off the number of points you have obtained. When you have obtained these 27 points the software will calculate an RMS for you which will indicate the calibration status.


Sensor Alignment

Once you are confident with the calibration of the Faro Arm the next step is to align the Laser scanner with the Faro Arm. This is done within the Model Maker software package.

FE geometric face-fitting to bone data

Once your data has been acquired you need to align it with your mesh using CMGUI. This process is described in example 21d. Once this is done you need to convert your frontend files to backend files. A script is given in the Notes section below that can be used to convert 8-noded volume elements from the .exelem to .ipelem format (trilinearex2ipelem.pl). Once your files are in this backend format you are ready to use cm to fit the initial linear mesh to the data using tri-cubic Hermite basis functions. The command file and necessary files for this process are given in the example below.

Notes

The following perl scripts are used in various aspects of the above process:

Initial Mesh Fitted Mesh

Results can be view with view.com.


The comfile run by this example is as follows:

$MULTIPLEFITS=0

FEM def para;r;sternum;example
FEM def coor;r;sternum;example
FEM def base;r;sternum;example
#
# Reads in an initial mesh and calculates linear approximations
#  for the derivatives
#
FEM def node;r;sternum;example
FEM def elem;r;sternum;example
FEM up node deriv 1 linear
FEM up node deriv 2 linear
FEM up node deriv 3 linear
FEM update scale_factor normalise
#
# The initial mesh
#
FEM export node;sternum_init as sternum_init offset 1000
FEM export elem;sternum_init as sternum_init offset_elem 1000
#
# Calculate the intial xi projections
#
FEM def data;r;sternum;example
FEM def xi;c closest_face search 3 external
FEM li data err 
FEM export data;sternum_data as sternum_data error
#
# Setup the fitting problem
#
FEM up field from geometry
FEM def fit;r;sternum;example geometry

Additional testing commands:

#
# First fit
#
FEM fit
FEM update node fit
FEM update scale_factor normalise 
FEM def xi;c closest_face search 3 external
FEM li data err 
FEM export data;sternum_data_1 as sternum_data_1 error
FEM export node;fitted_sternum_1 as fitted_sternum_1 offset 2000
FEM export elem;fitted_sternum_1 as fitted_sternum_1 offset_elem 2000

if ($MULTIPLEFITS==1)
{

#
# Second fit
#
FEM fit
FEM update node fit
FEM update scale_factor normalise
FEM def xi;c closest_face external old
FEM li data err 
FEM export data;sternum_data_2 as sternum_data_2 error
FEM export node;fitted_sternum_2 as fitted_sternum_2 offset 3000
FEM export elem;fitted_sternum_2 as fitted_sternum_2 offset_elem 3000
#
# Third fit
#
FEM fit
FEM update node fit
FEM update scale_factor normalise
FEM def xi;c closest_face external old
FEM li data err 
FEM export data;sternum_data_3 as sternum_data_3 error
FEM export node;fitted_sternum_3 as fitted_sternum_3 offset 4000
FEM export elem;fitted_sternum_3 as fitted_sternum_3 offset_elem 4000
#
# Fourth fit
#
FEM fit
FEM update node fit
FEM update scale_factor normalise
FEM def xi;c closest_face external old
FEM li data err 
FEM export data;sternum_data_4 as sternum_data_4 error
FEM export node;fitted_sternum_4 as fitted_sternum_4 offset 5000
FEM export elem;fitted_sternum_4 as fitted_sternum_4 offset_elem 5000
#
# Fifth fit
#
FEM fit
FEM update node fit
FEM update scale_factor normalise
FEM def xi;c closest_face external old
FEM li data err 
FEM export data;sternum_data_5 as sternum_data_5 error
FEM export node;fitted_sternum_5 as fitted_sternum_5 offset 6000
FEM export elem;fitted_sternum_5 as fitted_sternum_5 offset_elem 6000
#
# Sixth fit
#
FEM fit
FEM update node fit
FEM update scale_factor normalise
FEM def xi;c closest_face external old
FEM li data err 
FEM export data;sternum_data_6 as sternum_data_6 error
FEM export node;fitted_sternum_6 as fitted_sternum_6 offset 7000
FEM export elem;fitted_sternum_6 as fitted_sternum_6 offset_elem 7000

FEM def no;w;fitted_sternum_6
FEM def elem;w;fitted_sternum_6

quit

}

Files used by this example are:

Name             Modified     Size

example_21i.com 03-May-2005 803 sternum.ipbase 29-Aug-2002 3.3k sternum.ipcoor 29-Aug-2002 570 sternum.ipdata 29-Aug-2002 141k sternum.ipelem 29-Aug-2002 13k sternum.ipfit 13-Apr-2007 1.8k sternum.ipnode 29-Aug-2002 93k sternum.ippara 12-Nov-2002 5.9k test_output.com 03-May-2005 2.0k

Download the entire example:

Name                      Modified     Size

examples_2_21_21i.tar.gz 27-Aug-2010 575k

Testing status by version:

StatusTestedReal time (s)
hpc_cm64_irixSuccessThu Apr 1 13:32:37 2004328
hpc_cm_irixSuccessFri Jul 29 01:38:59 2005180
hpc_cmo64_irixSuccessThu Apr 1 13:27:09 200476
hpc_cmo_irixSuccessSun Jul 31 01:39:46 200542
rs6000-aix
cmSuccessWed Mar 4 01:15:34 200912
cm-debugSuccessMon Mar 2 01:32:10 2009123
cm64SuccessWed Mar 4 01:15:36 200912
cm64-debugSuccessTue Mar 3 01:38:41 2009138
x86_64-linux
cmSuccessSun Mar 6 00:01:16 20164
cm-debugSuccessSat Mar 5 00:04:29 201619

Testing status by file:


Graphical output from this problem is given here.


Html last generated: Sun Mar 6 05:50:11 2016

Input last modified: Thu Aug 26 13:17:08 2010


CMISS Help / Examples / 2 / 21 / 21i