Example 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/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.
#

#$epoc_begin = time();

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

#gfx mod win 1 set order 5

#$epoc_end = time();

#$epoc = $epoc_end - $epoc_begin;

#print "time taken - $epoc_end, $epoc_begin\n";


Files used by this example are:

Name                Modified     Size

example_ah.com 09-Mar-2016 5.4k COPYRIGHT 17-Mar-2014 504 arteries.exelem 17-Mar-2014 18k arteries.exnode 17-Mar-2014 14k body_fat.exelem 17-Mar-2014 204k body_heart.exelem 17-Mar-2014 24k body_llung.exelem 17-Mar-2014 63k body_muscle.exelem 17-Mar-2014 203k body_rlung.exelem 17-Mar-2014 63k body_torso.exelem 17-Mar-2014 204k cord.exelem 17-Mar-2014 5.3k cord.exnode 17-Mar-2014 6.0k oesoph.exelem 17-Mar-2014 2.3k oesoph.exnode 17-Mar-2014 2.1k resp.exelem 17-Mar-2014 9.4k resp.exnode 17-Mar-2014 6.4k spine.exelem 17-Mar-2014 5.3k spine.exnode 17-Mar-2014 6.0k veinsAH.exelem 17-Mar-2014 22k veinsAH.exnode 17-Mar-2014 11k veinsBH.exelem 17-Mar-2014 3.3k veinsBH.exnode 17-Mar-2014 3.4k

Download the entire example:

Name                  Modified     Size

examples_a_ah.tar.gz 09-Mar-2016 630k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmgui-wxFailureSun Mar 6 00:18:50 20165
last breakTue Feb 24 03:19:00 20154
cmgui-wx-debugFailureSun Mar 6 00:18:54 20166
last breakTue Feb 24 03:23:00 20155
cmgui-wx-debug-memorycheckFailureSun Mar 6 00:19:05 20166
last breakTue Feb 24 03:24:00 20155
cmgui-wx-debug-valgrindFailureSun Mar 6 01:41:16 2016146
last breakSun Mar 6 01:38:00 2016146
x86_64-linux
cmgui-wxFailureSun Mar 6 00:01:27 20160
last breakSun Mar 6 00:01:00 20160
cmgui-wx-debugFailureSun Mar 6 00:01:27 20160
last breakSun Mar 6 00:01:00 20160
cmgui-wx-debug-memorycheckFailureSun Mar 6 00:01:27 20160
last breakSun Mar 6 00:01:00 20160
cmgui-wx-debug-valgrindFailureSun Mar 6 00:02:46 20169
last breakSun Mar 6 00:02:00 20169
cmgui-wx-gcc-cad-debug-valgrindSuccessThu Jan 7 00:02:24 20167

Testing status by file:


Html last generated: Wed Mar 9 16:01:20 2016

Input last modified: Wed Mar 9 15:49:42 2016


CMISS Help / Examples / a / ah