Example a_backup/ah: Torso model with some of the major organs and blood vessels

This example uses CMGUI to display the torso model with its inner components, namely: the major central arteries and veins, heart, lungs, oesophagus, trachea, spine and spinal cord.

Screenshot of example a_backup/ah


The comfile run by this example is as follows:

# This comfile creates the full torso model along with the
# appropriate Virtual Human arteries, veins (below and above
# the heart),  trachea, oesophagus, spine and spinal cord.
#

gfx define tessellation default minimum_divisions 12 refinement_factors 1;

# Read in the torso information
gfx read elem example body_heart.exelem
gfx read elem example body_llung.exelem
gfx read elem example body_rlung.exelem
gfx read elem example body_muscle.exelem
gfx read elem example body_fat.exelem
gfx read elem example body_torso.exelem
#
# Read in the Virtual Human information
gfx read node example arteries.exnode
gfx read node example oesoph.exnode
gfx read node example cord.exnode
gfx read node example spine.exnode
gfx read node example veinsAH.exnode
gfx read node example veinsBH.exnode
gfx read node example resp.exnode
gfx read elem example arteries.exelem
gfx read elem example oesoph.exelem
gfx read elem example cord.exelem
gfx read elem example spine.exelem
gfx read elem example veinsAH.exelem
gfx read elem example veinsBH.exelem
gfx read elem example resp.exelem
#
# Create the appropriate materials for the torso
gfx create material heart diffuse 1.0 0.0 0.0
gfx create material lungs diffuse 0.9 0.3 0.3 alpha 0.45
gfx create material fat diffuse 0.9 0.7 0.0 alpha 0.35
gfx create material muscle diffuse 1.0 0.1 0.0 alpha 0.4
gfx create material torso diffuse 0.7 0.7 0.7 alpha 0.3
#
# Create materials for Virtual Human
gfx create material arteries diffuse 1 0 0 alpha 0.9
gfx create material veins diffuse 0 0 1 alpha 0.9
gfx create material cord_mat diffuse 0.7 0.7 0.3 
gfx create material trac diffuse 0.8 0.8 0.3 
gfx create material oesophagus diffuse 0.0 0.8 0.3
gfx create material spine_mat diffuse 0.5 0.3 0.0 alpha 0.5
# Torso
gfx modify g_element torso general clear;
gfx modify g_element torso lines coordinate coordinates invisible material default
gfx modify g_element torso surfaces coordinate coordinates material torso
# Create cylinders for Virtual Human
# Arteries
gfx modify g_element arteries general clear;
gfx modify g_element arteries lines coordinate coordinates invisible material default
gfx modify g_element arteries cylinders coordinate coordinates radius_scalar general.1 circle_discretization 12 material arteries
# Trachea
gfx modify g_element resp general clear;
gfx modify g_element resp lines coordinate coordinates invisible material default
gfx modify g_element resp cylinders coordinate coordinates radius_scalar general.1 circle_discretization 12 material trac
# Spine
gfx modify g_element spine general clear;
gfx modify g_element spine lines coordinate coordinates invisible material default
gfx modify g_element spine cylinders coordinate coordinates radius_scalar general.1 scale_factor 0.7 circle_discretization 12 material spine_mat

# Spinal Cord
gfx modify g_element cord general clear;
gfx modify g_element cord lines coordinate coordinates invisible material default
gfx modify g_element cord cylinders coordinate coordinates radius_scalar general.1 circle_discretization 12 material cord_mat
# Oesophagus
gfx modify g_element oesoph general clear;
gfx modify g_element oesoph lines coordinate coordinates invisible material default
gfx modify g_element oesoph cylinders coordinate coordinates radius_scalar general.1 circle_discretization 12 material oesophagus
# Veins Above the Heart
gfx modify g_element veinsAH general clear;
gfx modify g_element veinsAH lines coordinate coordinates invisible material default
gfx modify g_element veinsAH cylinders coordinate coordinates radius_scalar general.1 circle_discretization 12 material veins
# Veins Below the Heart
gfx modify g_element veinsBH general clear;
gfx modify g_element veinsBH lines coordinate coordinates invisible material default
gfx modify g_element veinsBH cylinders coordinate coordinates radius_scalar general.1 circle_discretization 12 material veins
# Left Lung
gfx modify g_element llung general clear;
gfx modify g_element llung lines coordinate coordinates invisible material default
gfx modify g_element llung surfaces coordinate coordinates material lungs
# Right Lung
gfx modify g_element rlung general clear;
gfx modify g_element rlung lines coordinate coordinates invisible material default
gfx modify g_element rlung surfaces coordinate coordinates material lungs
# Heart
gfx modify g_element heart general clear;
gfx modify g_element heart lines coordinate coordinates invisible material default
gfx modify g_element heart surfaces coordinate coordinates material heart

#
# Set the visibility of the fat and muscle off to unclutter the model.
gfx set visibility fat off;
gfx set visibility muscle off;

# Set the order of the regions so graphics are rendered from inside to out,
# which improves quality of translucency.

gfx set order region heart before torso;
gfx set order region arteries before torso;
gfx set order region resp before torso;
gfx set order region veinsAH before torso;
gfx set order region veinsBH before torso;
gfx set order region cord before torso;
gfx set order region oesoph before torso;
gfx set order region llung before torso;
gfx set order region rlung before torso;
gfx set order region spine before torso;
gfx set order region muscle before torso;
gfx set order region fat before torso;
#
gfx create window 1

gfx print window 1 height 2048 width 4096 file large_torso.jpg

Files used by this example are:

Name                Modified     Size

example_ah.com 20-Apr-2012 5.2k COPYRIGHT 19-Apr-2012 504 arteries.exelem 20-Apr-2012 18k arteries.exnode 20-Apr-2012 14k body_fat.exelem 20-Apr-2012 204k body_heart.exelem 20-Apr-2012 24k body_llung.exelem 20-Apr-2012 63k body_muscle.exelem 20-Apr-2012 203k body_rlung.exelem 20-Apr-2012 63k body_torso.exelem 20-Apr-2012 204k cord.exelem 20-Apr-2012 5.3k cord.exnode 20-Apr-2012 6.0k oesoph.exelem 20-Apr-2012 2.3k oesoph.exnode 20-Apr-2012 2.1k resp.exelem 20-Apr-2012 9.4k resp.exnode 20-Apr-2012 6.4k spine.exelem 20-Apr-2012 5.3k spine.exnode 20-Apr-2012 6.0k veinsAH.exelem 20-Apr-2012 22k veinsAH.exnode 20-Apr-2012 11k veinsBH.exelem 20-Apr-2012 3.3k veinsBH.exnode 20-Apr-2012 3.4k

Download the entire example:

Name                         Modified     Size

examples_a_backup_ah.tar.gz 12-Aug-2014 577k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmgui-wxSuccessSun Mar 6 00:19:20 20166
cmgui-wx-debugSuccessSun Mar 6 00:19:25 20165
cmgui-wx-debug-memorycheckSuccessSun Mar 6 00:20:02 20165
cmgui-wx-debug-valgrindFailureSun Mar 6 01:40:05 2016154
last breakSun Mar 6 01:37:00 2016154
last successTue Feb 10 01:41:00 2015157
x86_64-linux
cmgui-wxFailureSun Mar 6 00:01:36 20161
last breakSun Mar 6 00:01:00 20161
last successWed Jun 3 00:06:00 20153
cmgui-wx-debugFailureSun Mar 6 00:01:36 20160
last breakSun Mar 6 00:01:00 20160
last successWed Jun 3 00:06:00 20153
cmgui-wx-debug-memorycheckFailureSun Mar 6 00:01:36 20160
last breakSun Mar 6 00:01:00 20160
last successWed Jun 3 00:07:00 20153
cmgui-wx-debug-valgrindFailureSun Mar 6 00:03:03 20169
last breakSun Mar 6 00:02:00 20169
last successWed Jun 3 00:54:00 2015108
cmgui-wx-gcc-cad-debug-valgrindSuccessThu Jan 7 00:02:31 20167

Testing status by file:


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

Input last modified: Fri Apr 20 15:56:09 2012


CMISS Help / Examples / a_backup / ah