Example d33: Host-mesh customisation of the rectus femoris muscle

This example illustrates host-mesh fitting of a rectus femoris muscle from the visible male to a rectus muscle from the visible female.

Rectus muscle in host Customised rectus with data set overlayed
Fig. 1 Rectus muscle in host Fig. 2 Customised rectus with data set overlayed


The comfile run by this example is as follows:

#
# This example illustrates customisation of the rectus femoris muscle derived  
# from the visible man to a rectus muscle from the visible women.
#

# Define variables
$SLAVE= "rectus_slave"
$CUST_SLAVE = "rectus_cust"
$HOST = "host"
$CUST_HOST = "host_cust"
$LANDMARK = "rectus_landmark"
$TARGET = "rectus_projection"
$HOST_REG = 2
$SLAVE_REG= 1

fem def para;r;fitting;example #fitting parameters
fem def regi;r;two;example #2 regions
fem def coor 3,1 #3D rectangular cartesian
fem def base;r;collapsed;example # bases functions

###################################################

# The slave mesh
fem def node;r;$SLAVE;example reg $SLAVE_REG
fem def elem;r;$SLAVE;example reg $SLAVE_REG
#fem export node;$SLAVE as $SLAVE reg $SLAVE_REG
#fem export elem;$SLAVE as $SLAVE reg $SLAVE_REG

###################################################

# The host mesh
fem def node;r;$HOST;example reg $HOST_REG
fem def elem;r;$HOST;example reg $HOST_REG
fem up node deriv 1 reg $HOST_REG
fem up node deriv 2 reg $HOST_REG
fem up node deriv 3 reg $HOST_REG

# Refine host mesh
fem ref xi 3 elements 101 at 0.25 reg $HOST_REG
fem ref xi 3 elements 102 at 0.67 reg $HOST_REG 
#fem export node;$HOST as $HOST reg $HOST_REG
#fem export elem;$HOST as $HOST reg $HOST_REG

###################################################

# Calculate xi's for generic data points
fem def data;r;$LANDMARK;example
fem def xi;c contain reg $HOST_REG
#fem export data;$LANDMARK as $LANDMARK error
#fem def xi;w;$LANDMARK reg $HOST_REG

# Calculate xi's for node points
fem def xi;c nodes contain of $SLAVE_REG in $HOST_REG
#fem def xi;w;generic;example nodes contain of $SLAVE_REG in $HOST_REG

###################################################

# Fit the host mesh
fem def data;r;$TARGET;example
fem def xi;r;$LANDMARK;example reg $HOST_REG
#fem export data;$TARGET as $TARGET error full offset 100

fem def field;r;$HOST;example reg $HOST_REG
fem def elem;r;$HOST;example field reg $HOST_REG
fem def fit;r;$HOST;example geom reg $HOST_REG

fem fit reg $HOST_REG

###################################################

# Update the slave mesh
fem def xi;r;generic;example nodes of $SLAVE_REG in $HOST_REG
fem update mesh position fit of $SLAVE_REG in $HOST_REG 

#fem export node;$CUST_SLAVE as $CUST_SLAVE offset 1000 reg $SLAVE_REG
#fem export elem;$CUST_SLAVE as $CUST_SLAVE offset_elem 1000 reg $SLAVE_REG

###################################################

# Update the host mesh
fem update nodes fit reg $HOST_REG

#fem export nodes;$CUST_HOST as $CUST_HOST offset 2000 reg $HOST_REG
#fem export elements;$CUST_HOST as $CUST_HOST offset_elem 2000 reg $HOST_REG



Additional testing commands:



Files used by this example are:

Name                      Modified     Size

example_d33.com 22-Aug-2004 2.6k collapsed.ipbase 11-Aug-2004 7.7k fitting.ippara 11-Aug-2004 5.9k generic.ipxi 11-Aug-2004 3.4k host.ipelem 11-Aug-2004 495 host.ipelfd 11-Aug-2004 975 host.ipfiel 11-Aug-2004 25k host.ipfit 13-Apr-2007 1.9k host.ipnode 11-Aug-2004 15k rectus_landmark.ipdata 11-Aug-2004 1.5k rectus_landmark.ipxi 11-Aug-2004 1.7k rectus_projection.ipdata 11-Aug-2004 1.5k rectus_slave.ipelem 11-Aug-2004 11k rectus_slave.ipnode 11-Aug-2004 36k slave_projection.ipdata 11-Aug-2004 1.5k test_output.com 22-Aug-2004 0 two.ipregi 11-Aug-2004 93 view.com 11-Aug-2004 5.3k vw_rectus.exdata 11-Aug-2004 60k

Download the entire example:

Name                      Modified     Size

examples_d_d3_d33.tar.gz 14-Apr-2007 72k

Testing status by version:

StatusTestedReal time (s)
hpc_cmo64_irixSuccessSun Jul 31 01:35:19 20055
rs6000-aix
cm64SuccessWed Mar 4 01:08:17 20091
x86_64-linux
cmSuccessSun Mar 6 00:01:07 20161

Testing status by file:


Html last generated: Sun Mar 6 05:51:25 2016

Input last modified: Fri Apr 13 10:41:28 2007


CMISS Help / Examples / d / d3 / d33