This example has been mostly superseded by example a/digitise. The newer example is being actively improved all the time. (and is what this code is based on) It automatically handles slices that are not all parallel. You can limit the number of textures in memory and it loads and frees them automatically as required. When working with the Visible Human data there are some discontinuties in the raw image set, a set of mappings to realign these planes has been worked out.
This example describes the process of digitising structures from slices
from the visible
human project, or any other stack of images.
The process occurs in 2 stages.
The first stage is to place the images in a format which the
example_21f script can use. This has a number of parts.
1. Obtain and crop images. These can be placed in a single image file directory. For the visible human dataset this can be
done using the cropit perl script.
2. Create 2d elements for each slice. These must have a single element
in each file with the corresponding plane number. It is important to translate these images so that the
3. Place these node and element files in the same directory used to run
example_21f. Due to memory contraints only load a maximum of 30 images.
The second stage is the actual digitisation stage.This is shown in this example. Execute the whole comfile rather than line by line.
By running example_21f you will have a stack of images in the
appropriate 3dimensional space.
A gtk widget is drawn with appropriate buttons to allow easy movement up and down the stack. When the 'normal' button is toggled a view is generated normal to the slice and with appropriate clipping planes, such that any node or data point created lies on that image plane.
Experiment by clicking data points on a slice and then move up and down the stack. Each time you go up or down the stack, the appropriate .exdata file corresponding to that slice is saved.
Toggle out of 'Normal' mode
In the command window type
visibleoff #This turns the
visibility for everything off
visibleon "data" #This turns on the visibility for all
your data points
#Do
not edit the data points as they are not
#constrained
in the z plane.(Use 'Normal' mode)
This example can also be used to create nodes and elements. We shall
digitise a 1d network such as the femoral artery (situated slightly up
and to the right of the bone).
In the command window type
digitise "femoral_artery" #This creates an element group
#"femoral_artery"
and adjusts the node and element
#creator
tools appropriately.
#Now click nodes (creating elements) on the artery on each slice.
#Toggle out of 'Normal" mode.
editnode "femoral_artery" #This creates arrow glyphs in
the x and y
#planes.
Clicking on these arrows will constrain the
#
node in the z plane despite not being in 'Normal' mode.