Visual3D Getting Started Guide ™

advertisement
Visual3D™
Getting Started Guide
C-Motion, Inc.
15821-A Crabbs Branch Way
Rockville, MD 20855 USA
(301) 840-1919 (phone)
(301) 840-0271 (fax)
support@c-motion.com
Acknowledgements:
The development of Visual3D software was funded in part by STTR grant (R43 HD37286-01) from the National Institute of
Child Health and Human Development (NICHD). C-Motion also gratefully acknowledges and appreciates the assistance
provided by the Rehabilitation Medicine Department in the Warren Grant Magnuson Clinical Center at the National Institutes of
Health.
ii
Table of Contents
Visual3D ™ Introduction ......................................................................................................................................1
Motion Analysis Defined ................................................................................................................................................................................... 1
How data is captured........................................................................................................................................................................................... 2
Key Features......................................................................................................................................................................................................... 3
Installation ..........................................................................................................................................................4
Licensing ............................................................................................................................................................5
The Visual3D Process .......................................................................................................................................6
Getting Started ...................................................................................................................................................7
Download the Example Files............................................................................................................................................................................. 7
File Types ............................................................................................................................................................................................................. 7
Example 1 ..........................................................................................................................................................8
Opening a Data File ............................................................................................................................................................................................ 8
The 3D Animation Viewer................................................................................................................................................................................. 9
The Toolbar.......................................................................................................................................................................................................... 9
The Data Tree..................................................................................................................................................................................................... 10
Viewing Data...................................................................................................................................................................................................... 11
2D Interactive Signal Graphs – Validating Data and Signal Processing................................................................................................. 12
Signal Processing, Events, and Metrics......................................................................................................................................................... 14
Model Builder .................................................................................................................................................................................................... 15
Segment Definition ........................................................................................................................................................................................... 15
Segment Naming Standards............................................................................................................................................................................. 17
Assigning Capture Data to a Model............................................................................................................................................................... 18
Reporting............................................................................................................................................................................................................. 19
Modifying a Report Graph............................................................................................................................................................................... 21
Saving Files and Changes ................................................................................................................................................................................ 23
Example 2 ........................................................................................................................................................24
Open Files ........................................................................................................................................................................................................... 24
Create Model...................................................................................................................................................................................................... 24
Creating Segments............................................................................................................................................................................................. 26
Create Joint Angle ............................................................................................................................................................................................. 30
Reporting............................................................................................................................................................................................................. 31
Example 3 ........................................................................................................................................................33
The Pipeline........................................................................................................................................................................................................ 33
Pipeline and Script Syntax............................................................................................................................................................................... 34
Creating a workflow process........................................................................................................................................................................... 35
Validate Results ................................................................................................................................................................................................. 38
iii
Visual3D™ Introduction
Visual3D™
from C-Motion, Inc.
C-Motion's Visual3D software processes complex motion capture data and
analog signals (e.g. force platforms and EMG signals) and provides you with
informative reports. Visual3D uses the flexible and popular public domain
C3D file format (www.c3d.org) to process data. It supports plug-ins to
reformat data to C3D, thereby giving it the ability to function with all of the
major motion capture systems. Visual3D supports a 6 degree of freedom
modeling capability for maximum accuracy and flexibility, and provides a
comprehensive and interactive reporting system. A powerful workflow
engine makes using Visual3D effective and efficient in nearly any setting.
Visual3D's powerful features make it the premier solution for rigorous and
accurate 3D motion analysis.
Visual3D uses C3D formatted files
for input
Plug-ins can translate or reformat
files into C3D format
Event and Signal Processing
Visual3D supports:
Reporting
•
•
•
•
6DOF Modeling
Analog Signals
plug-ins
workflow automation
Value for Collaboration:
•
•
•
•
•
Hardware independence
Open, consistent analysis
Share special purpose plug-ins
Share process automation scripts
Backwards file compatibility
Workflow Processing
Motion Analysis Defined
Some uses for Motion Analysis:
A motion capture system is used to collect positional data points in three dimensions
by triangulating on a single marker using several cameras at once. Motion Analysis
software is then used to make sense of that data. The analysis can be as simple as
formatting the data and exporting it to an animation package, or as complex as a
biomechanical evaluation of the interaction of forces and muscles on a human subject.
This type of complex analysis is useful for things like evaluating an athlete’s
performance, evaluating actors in a virtual reality setting, or determining how a
treatment is working on a disabled individual.
•
A performance assessment tool
to identify athletes at risk for
injury
•
Analyzing a patient’s movements
and therapy progress
•
Providing measurable and
objective movement assessments
•
Determine if optimal movements
were used in a VR simulation
•
Filtering and modifying 3D data
to use in an animated movie or
video game
Biomechanical movement analysis is often used in a clinical or research setting as a
performance assessment tool. It can quantify the progress of a patient undergoing a
treatment or therapy, and analyze what is happening during a movement trial. This
shows whether a therapy is working, and can alert a clinician or researcher to
problems. In some cases, it can reveal the underlying neuromuscular movement
pattern being demonstrated by a patient. This information often cannot be determined
by analysis with the human eye.
June, 2003
1
Biomechanical movement analysis also provides a measurable record that allows the
objective comparison of performance across different conditions, different times,
different patient groups, and even different facilities.
Visual3D is designed to provide a biomechanical movement analysis by supplying
complicated calculations (kinematics, inverse dynamics) and the variables (e.g.
kinetic forces, net joint moments, mechanical energy transfers) that underlie
movement and the forces that offer resistance to movement.
How data is captured
Motion Analysis Process:
If set up correctly, your motion capture system will be able to capture movement
information and either save that data in a file for later analysis, or stream it directly to
a Visual3D plug-in for visualization in real-time.
•
Tracking markers are placed on
the subject
To calculate biomechanical movement analysis, the following steps are executed:
•
Several digital cameras each
record the motion of the same
markers
•
The results of each camera are
synchronized so that 3D
locations of the markers are
identified throughout the entire
movement trial
•
The movement of the markers is
processed through the ‘lens’ of a
model that defines how the
movement of the markers are to
be interpreted
•
Inverse dynamics and segmental
kinematics are calculated from
the movements analysis and
model information
•
Reports are generated
1.
Synchronized digital cameras each record the motion of "tracking markers"
which are attached to the subject in a mathematically planned layout
1.
3D positions for each marker relative to a defined location are derived from
consolidating the output of each camera.
2.
The attributes of the subject (e.g. segments, joint properties, degrees of
freedom) are defined in a biomechanical model.
3.
The movement of the subject is analyzed by following the motion of the
tracking markers combined with the information in the model.
Segmental kinematics (e.g. joint angles, angular velocity) and inverse dynamics (e.g.,
ground reaction forces acting on the foot, net joint movements, rate of energy
generation and absorption across joints) are calculated from the movement analysis
and model details. Comprehensive reports are then generated.
June, 2003
2
Key Features
Visual3D Features:
Visual3D fully supports C3D (www.c3d.org) data files. The C3D format is a public
format that almost all major motion capture hardware vendors support.
•
Supports the widely supported
C3D data format
Most motion capture systems create data files in this format, or they can export their
own data to C3D. Visual3D plug-ins also provide data translation functions. CMotion's customers use the following motion capture systems:
•
Hardware independence since
plug-ins give Visual3D almost
unlimited data functionality
•
Accommodates different
laboratory coordinate systems
•
Can interpret various marker set
configurations
•
Workflow features automate data
processing
•
6DOF modeling capability
•
Kinematic support for more than
one actor and inanimate objects
•
Synchronized video provides the
user with visual representation
•
VRML support for objects and
backgrounds
•
•
•
•
•
•
•
•
•
BTS
Motion Analysis Corporation
Qualisys
Vicon Motion Systems
Northern Digital
Peak Performance
Phoenix Technologies
CODA
And more…
Visual3D provides customized plug-ins to support specific needs - for filtering,
models, signal processing, analysis enhancements, data manipulation, and reporting.
Plug-ins are available from (or can be developed by) C-Motion, or they can be
developed using Visual3D’s SDK. Support for open-source plug-ins is provided as
well.
Through its flexible architecture, Visual3D will also accommodate different
laboratory coordinate systems. This will allow the user to interpret the data in the
traditional format of the lab or clinic, but then automatically reanalyze the data and
present it in a different coordinate system (e.g., a format defined by a standards
committee such as that of the International Society of Biomechanics). Visual3D,
through its biomechanical modeling capabilities, can interpret a variety of possible
marker configurations, thereby accommodating users who have different laboratory
procedures for placing markers.
Visual3D provides a workflow capability to automate your data processing and
analysis through a powerful object oriented pipeline. Extremely complex activities
can be scripted and monitored in the pipeline, thus providing a simple push-button
approach to a complicated analysis.
Advanced 6 degree of freedom modeling capabilities give you the ability to
kinematically model more than one actor in a scene as well as inanimate objects. The
model builder supports optimal tracking and marker clusters, as well as letting you
use custom marker sets to accommodate old data or different approaches. More data
can be processed since analysis takes place on segments rather than needing a whole
object in view before starting.
Animation support is provided for VR backgrounds, and video synchronization lets
you see what happened during a motion capture trial beyond marker tracking. The
3D graphics associated with a segment or lab background can be any VRML object.
Alias Wavefront obj files are supported as well.
June, 2003
3
Installation
The software is obtained by downloading it from C-Motion’s web site. Each
customer is given a unique user-id and password that provides access to the software
and to the on-line help desk.
Once downloaded, simply launch the downloaded file and follow the directions on the
screen to start the installation. Click on "Next" when the introductory screen is
displayed. This will display the software license agreement, to which you must agree
before the installation can continue. Please take a moment to read the agreement and
select the "Agree" option if you wish to continue the installation. Click on the "Next"
button to proceed to the next screen.
Installation
•
Visual3D is downloaded from
C-Motion’s web site
•
Open the Visual3D install file
•
Click ‘Next’ and ‘Agree’
•
Pick a destination folder
The installation screen will now prompt you for the destination folder and display the
available disk volumes. You should either accept the default folder or select a new
one. Click on the "Next" button once you have chosen the folder for the C-Motion
applications and example files.
The installation wizard will then install C-Motion Visual3D using the destination that
you have selected. A folder that contains the Visual3D software will be added to your
program menus.
If you need to remove the C-Motion Visual3D software from your system after
installation, use the Add/Remove Programs option in the Windows Control Panel.
June, 2003
4
Licensing
The first time that you attempt to open a data file from Visual3D, a dialog box
appears requesting the Laboratory Name and a License Key. These two items must be
entered correctly before the application will operate on your files. Keys are
distributed (usually via e-mail) after the product has been purchased. Evaluation keys
are available, but they only work for 30 to 60 days – after which the product should
be purchased.
Licensing
•
License is entered when a FILE
is OPENED for the first time.
•
Enter the Name and License Key
exactly as provided by CMotion.
•
This name is displayed in the
report footer. If changes are
needed, contact C-Motion.
The Laboratory Name identifies this installation and controls the software license. It
is matched to the encrypted License Key; otherwise, the software will not operate. It
is recommended that the user "cut and paste" the Laboratory Name and License
Number directly from the email source to ensure that the information is entered
correctly without any typographical errors.
The laboratory name also appears on the printed reports. If the Laboratory Name
needs to be changed, please contact C-Motion directly to get a new license key.
June, 2003
5
The Visual3D Process
Any biomechanical movement analysis implemented in Visual3D involves several
discrete steps. Using the Visual3D Pipeline, all of these steps can be automated
(except for the actual collection of data).
1.
The motion of targets attached to the subject (or any object) is tracked and
recorded using cameras. The tracking data is read into Visual3D as a C3D
file.
2.
A biomechanical model is defined that represents selected characteristics of
a subject such as the number, and kind, of segments (geometry and inertial
properties). Joints are implemented with 6 degrees of freedom in a Visual3D
model (other models derived from, for example, Helen Hayes marker sets
have fewer degrees of freedom).
3.
Events are identified, and thresholds established.
4.
The kinematics of the model are calculated by determining the
transformation from the recorded tracking targets to the pose of the model
using an optimal approach. (Terminology from Cappello, A., Cappozzo, A.,
La Palombara, P.F., Lucchetti, L., Leardini, A. Multiple anatomical
landmark calibration for optimal bone pose estimation. Human Movement
Science. 16: 259-274, 1997).
5.
The application of inverse dynamics analysis (kinetics) to the kinematics of
the biomechanical model and to the location, magnitude, and direction of
externally applied forces (e.g., ground reaction forces acting on the foot).
6.
Reports of the analysis are generated, and created events are presented.
Using Visual3D
1. Data is collected and saved in
C3D format (unless streamed into
Visual3D directly via a real-time
plug-in).
2. Non-C3D data is converted to
C3D using plug-ins
3. A model is defined that correlates
to the data (or an existing model is
reused)
4. Events are identified, thresholds
established, and kinematics are
optimally derived.
5. Inverse dynamics (kinetics) are
calculated
6. Reports are created using either a
newly defined or an old report
template
These steps are typically done sequentially. In the first example we are going to use a
.cmo file in which all of these steps have been done already.
June, 2003
6
Getting Started
To get an overview of Visual3D and its operation, three example scenarios will be
presented. The first covers the use and capabilities of Visual3D as a way to get
familiar with its interface and general capabilities. The second example delves deeper
into signals, events, and model building. Finally, an introduction into the power of
the pipeline and Visual3D’s workflow capabilities is provided.
Download the Example Files
Three examples will be given.
Example 1 will familiarize the user
with Visual3D GUI. Directions to
follow will be shown in green.
1.
To get started, please download the two sample data sets from C-Motion’s web site:
www.c-motion.com
ExampleTrial.zip and
CaseMVC.zip
ExampleTrial.zip is a data set and model with a normal subject walking at a
comfortable pace.
CaseMVC.zip contains a set of patient data.
2.
Unzip these files into a location that is easily accessible. Unzipping them will create 2
subdirectories, ‘ExampleTrial’ and ‘CaseMVC’. Creating a special directory for
Visual3D data files is suggested. Remember where these files are!
Note: Windows XP handles zip files natively. In all other versions of Windows, a
decompression utility such as Winzip is needed (a free evaluation version is at
www.winzip.com).
Download the following
example files from:
www.c-motion.com
Unzip the files into a location
that is easily accessible
Visual3D File Types:
File Types
•
c3d - Raw C3D formatted data
There are two standard input data files for Visual3D (each of the example data sets
contains both kinds of files):
•
cmo – C-Motion Output Files –
collection of c3d data, models,
and report templates
•
mod - for model files
•
rgt – Report templates
•
txt – for scripts
•
The C3D file format that is common to most motion capture vendors and
contains all relevant information for a single trial of data.
•
A CMO file is created by Visual3D and contains a collection of C3D files,
biomechanical model files, and a report.
•
Other file formats of interest are .mod files containing saved models, .rgt for
reporting templates, .txt files for scripts, and .obj with related.
•
Background objects to display in Visual3D, such as skeletal bones and
prosthetics can be in VRML, but Alias Wavefront’s format for .obj and col
files can be read. Each file contains the wireframe mesh for a single
segment. This means that files using a hierarchical definition of objects will
not work in Visual3D (i.e. Vicon’s object files) since 6DOF model segments
are independent and do not depend on other segments for their definition.
June, 2003
Background graphics
•
VRML is the preferred format
•
obj – background graphics in
Alias Wavefront’s format
•
col – color file
7
Example 1
Begin program execution by selecting the Start Button -> Programs -> C-Motion ->
Visual3D. After a brief title screen display, the program presents three default views:
•
•
•
An empty data tree dialog on the left,
The 3D Viewer in the middle, and
An empty 2D graphing view on the right.
3.
Start Visual3D:
Start ->
Programs ->
C-Motion ->
Visual3D
The Visual3D GUI has:
Opening a Data File
Begin by opening the C3D-formatted .cmo file containing the collected and
processed data:
1.
Select "Open" under the File menu, or click on the Open icon.
2.
In the "Look in:" box, click the drive, folder, or network location that
contains the file: …/ExampleTrial/ExampleTrial.cmo and Open it.
•
Data Tree window
•
Animation Window
•
Graphing/Reporting Window
4.
Open an example data file:
…/ExampleTrial/ExampleTrial.cmo
(license key may be needed here)
NOTE: This is where you may be asked to enter the license key (as described
earlier).
June, 2003
8
The 3D Animation Viewer
Now would be a good time to see how the mouse works in the 3D Viewer. You can
control the position and orientation of the camera view in the 3D scene interactively
using the mouse.
5.
Play with the animation and
toolbar icons
Using the Animation Viewer
Rotate the scene by holding down the left mouse button and dragging the
mouse.
Scale the scene with the right mouse button.
•
Left Mouse Button rotates the
scene
•
Right Mouse Button scales the
scene
•
Both Buttons (or Middle Button)
moves the scene
Move the scene by holding down both buttons. (Middle Mouse button
also works)
The video controls at the bottom of the 3D Viewer define the speed of playback and
the range of frames to be animated. In addition to play and pause, there are frame
advance and rewind controls as well.
The Toolbar
File Commands:
New, Open, Save, Tags
Data files selected
Visual3D Modes:
Event, Model Builder, Reporting, Recalculate, Pipeline
Resize force vectors
Event editor
Toggle marker tags
Reset camera view to original
Show segments, markers, geometry
Vis ual3D provides several modes to work with data. The three principal interfaces
are:
Event Processing Mode Signal processing and Event Detection
Model Builder Mode Assign marker configuration and
anthropometrics
Report Mode Kinematic and Kinetics (Inverse Dynamics)
reports
The icon for the current mode is grayed out.
June, 2003
9
The Data Tree
Make sure you are in the Event Processing Mode. The data tree on the left side of the
screen is a visual representation of the contents of the open data file(s). It is an
expandable view of signals, markers, the C3D file header, and C3D parameter data.
As we will see later, the checkboxes beside some of the signals are used to identify
which signals to process for reporting.
6.
Switch to Event Mode. Look
at the Target information and
the Original signals.
The Visual3D Data Tree:
•
The data tree on the left displays
the contents of the open file
(ExampleTrial.cmo)
•
Signals can be examined and
events defined from the tree
•
C3D data can be edited and
saved
•
Specific signals can be selected
(or de-selected) for reporting
The following types of data are accessible through the data tree:
EVENT_LABEL
TARGET
ANALOG
GRFORCE
COFP
FREEMOMENT
LINK_MODEL
DERIVED
GLOBAL
HEADER
PARAMETERS
TAGS
Frames (time) at which a significant event
happened (e.g. Foot Strike)
3D POINT data
ANALOG (e.g. Force Platform signals, EMG
signals)
Ground Reaction Force - Vector
Center of Pressure (Ground Reaction Force)
Ground Reaction Force - Free Moment
Calculated signals based on the biomechanical
(link) model
Calculated signals derived from more than one
signal
Calculated signals derived from more than one file
C3D File Header Information
C3D File Parameters
Relationships between files
The original signal names are created in the motion capture software, not Visual3D.
They can, however, be changed using the
File -> modify_point_parameters
pipeline command in the pipeline, but this is a very dangerous thing to do since
models and signal processing routines rely on these names.
June, 2003
10
Viewing Data
Viewing Data in Visual3D:
The data tree is expandable.
•
The data tree is expandable to
show the contents of the file
The checkbox next to each signal is used to limit processing to relevant signals or
events. This lets the processes specified in the "Process Signals" or "Process Events"
dialogues or in the workflow pipeline only be performed on the checked signals in the
data tree.
7.
Left-clicking on a signal will
display a quickview window
for viewing signals
8.
Right-clicking on a signal will
bring up a menu for additional
processing or graphing the
signal. Pick a signal and
choose Graph X, Y and Z.
Clicking the left mouse button on a signal (Ground Reaction Force in this example)
will bring up a Quickview window for viewing the signals.
Clicking the right mouse button on a signal will bring up a context menu for selecting
additional processing, or graphing the signal as an interactive graph. A different
context menu is displayed depending on the type of data selected. The following
picture shows a context menu from the data tree:
•
June, 2003
These are called Signal Graphs
11
2D Interactive Signal Graphs – Validating Data and Signal
Processing
Signals can be graphed independently, with up to five graphs at once. Starting on the
left side, pick the signal(s) to graph (notice the changed icon in front of the signal).
You may need to resize the screen to see the graph better. Right-clicking on the
graph gives access to formatting options. Creating metrics (Sum, Integrate, Min,
Max, etc…) creates a new leaf in the tree for Metrics. This makes it available for
processing and reporting at a later time.
9.
View the signal data and
manipulate the graphs and
options as described in these 2
pages.
Graphs can be exported as bitmaps or to the Windows clipboard. This allows them to
be copied to other documents or programs. Placing the cursor over a line results in a
pop-up displaying the data values at that point.
Validating Data and Signals
ALT-Clicking the left mouse button on the selected graph will set an anchor line at
the nearest mo tion capture frame where the mouse is clicked. This anchor point is
used to apply a baseline for zooming in or out around a frame of interest. Using the
left or right arrow keys will move the anchor point one frame to the left or right.
•
Signals can be graphed
independently
•
Display up to 5 graphs at once
•
Right-clicking the graph displays
formatting options
•
Holding down the “Alt” button
and left-clicking the mouse on
the selected graph will set an
anchor line at the nearest motion
capture frame where the mouse
is clicked
•
Double-clicking the left mouse
button on a graph creates an
event label
Double clicking the left mouse button inside a graph window allows the creating of an
Event Label at that frame
Holding the left mouse button down and moving the cursor up and down scales the
graph. Moving the cursor left and right pans the graphs. As the range of data is
changed, the scaling of the vertical axis changes to reflect the range of the data
displayed.
Processed signals and original data can be viewed and analyzed using these graphs.
Data that is missing, or fails to pass a threshold will show up as missing gaps in the
graphs, unless the missing signals have been interpolated. Events can be viewed on
the graph by right-clicking on an event label and choosing the highlight option.
June, 2003
12
Match the animation to the signal in the graph
Highlight an event – Right Heel Strike
10.
Select event labels from the
Data Tree to display on the
graphs.
Viewing Processed Signals and
Original Data:
•
To view an event, right-click on
an event label
•
For editing an event, click the
event editor on the toolbar
Event Editor Tool
Look at the Processed Signal
(or an original signal)
Adjust what frame it occurs in
Events can be edited and the frame they occur adjusted using the event editor toolbar
option.
June, 2003
13
Signal Processing, Events, and Metrics
Signal Processing, Events, and
Metrics
An event is simply something of interest that happens in a certain motion capture
frame. Reports can be created that are constrained to the time between certain events.
•
An event is an action that occurs
during a motion capture
Events have a name, or label, and can be unique or recurring throughout the motion
capture trial. Events can be created by double-clicking on the line in a 2D interactive
event graph, or when:
•
To create an event, double-click
on a line in a signal graph
ü
ü
ü
ü
ü
A certain signal appears
A signal threshold is exceeded
A pattern has been recognized (Target Pattern Recognition or TPR)
A parameter has been put in the original C3D file at a frame (i.e.
Vicon parameters)
A calculation, metric, or statistical result has been derived
The graphical interface is a way to visualize and aggregate motion capture data (and
to build models). By its very nature, iterative event and signal processing and
workflow activities become complex, restrictive, and cumbersome when integrated
into a general graphical interface. These activities proceed in a sequential manner and
integrate with external applications along the way, and work much better as a series
of scripts. For this reason, the Visual3D’s powerful workflow features were created.
The primary interface to the workflow capabilities is the Visual3D Pipeline processor,
which combines a graphical interface and powerful script processor.
11.
Create an Event from the signal
graph.
12.
Open the Pipeline workflow
automation tool. Select an
Event processing command and
see how the Edit button works
and what is displayed in the
text window. Close the
pipeline window before
continuing.
Access to the pipeline is available from the following toolbar icon:
The ability to define and execute signal calculations, create and apply filters, and
generate statistics as well as defining events, all take place in the Pipeline. Edit
dialog boxes are provided for each process step. We will cover the Pipeline in
Example 3.
June, 2003
Full access to modify Signals,
Events, and Metrics is available in the
Pipeline
•
The Visual3D Pipeline Processor
automates the motion capture
workflow
•
The Visual3D Pipeline Processor
gives the ability to manipulate
signal calculations, filters,
statistics, and events.
•
Pipeline scripting is enhanced by
un-commenting optional
commands starting with an
exclamation mark (!) from the
text dialog.
•
Original signals checked in the
data tree can be imported into a
command line with a button.
14
Model Builder
Visual3D provides maximum flexibility and reporting accuracy by using 6 degree of
freedom modeling. Each model segment can be analyzed individually or in
combination with any other segment. In Visual3D, a model where all segments are
independent and linked together is called a Link Model. A model where the linkage is
predefined, or where the definition of one segment depends upon the markers or the
definition of another segment ceases to be Link Model, and loses its full 6 degrees of
freedom.
•
Unlike more rigid modeling techniques, a data error in one place will not propagate to
other segments , and analysis can take place over the whole trial (any frames where a
segment is visible) rather than in just the frames where the entire marker set is visible.
•
The following screen appears when you switch to the Model Mode. The blue spheres
are Virtual Targets, which are linked to real targets. They were created by hand to
mark a place with an offset to the original marker. This lets the calculations use a
virtual marker right on the skin, rather than using the actual marker, which is sitting
away from the skin during the motion trial. Virtual markers have many uses. They can
result in a more accurate analysis. They provide the flexibility to place a marker at any
location, thus locating an anatomical landmark in a place where it may not be possible
to place a real marker. A virtual marker can be used to identify a location provided by
an outside source, such as a 3D digitizer.
List of all markers
The model builder uses the 6
degree of freedom model.
Fully independent 6DOF models are
called Link Models in Visual3D.
Clicking on a segment in Model
Mode will illustrate how the
segment was defined.
13.
Switch to the Model Mode.
14.
Click on the left thigh
segment (the patient’s left) to
view the segment details in
the right window pane.
Toggle marker names in viewer
ExampleStatic.c3d
Show the bones
Grey: Physical Marker
Blue: Virtual Marker
Red: Selected Marker
Yellow: A Joint Center
Segment Definition
Clicking/highlighting any segment, for this example - the patient’s left thigh (see the
picture below), illustrates how the segment was defined. Note that there is no proximal
marker on the medial side provided in the data. Visual3D will calculate the segment’s
coordinate system and define the segment provided three markers are available.
June, 2003
15
The Model’s Data File Missing Marker
Toolbar icons, on top at the right,
provide sagittal and perspective
views
Non-collinear tracking
markers.
At least 3 are needed, and
an end point marker is acceptable
as one of them.
Different perspectives of the model (useful when setting up new graphical objects to
display with a segment) are available on the toolbar in the upper right.
Segment geometry and background objects (i.e. the bones) are manipulated from the
segment PROPERTIES window.
Marker Colors
Grey - Physical Marker
Blue - Virtual Marker
Red - Selected Marker
Yellow - A Joint Center
Green - Tracking markers for a
selected segment
Segment polygon geometry
And offsets
15.
Button used to change how
picture looks on the view
Examine the dialog windows
and options available. A
definition of the anatomical
terminology follows.
Files containing Alias Wavefront
(Maya) objects. Bones in this case.
NOTE:
The Kinematic Only option is for modeling ONLY movements. No joints,
joint centers, or forces can be modeled or calculated for Kinematic Only segments.
Multiple actors (or objects) can be
added to an analysis if kinematic
only segments are defined.
Any changes made to the model will then show up in the event viewer for the selected
movement trial(s).
June, 2003
16
Segment Naming Standards
Model and Anatomical Definitions:
The following picture illustrates a segment definition, and shows the medical
conventions and terminology used for defining segments in anatomy and
biomechanics.
•Origin of the Pelvis: the basis for
determining proximal and distal
measurements
Naming Standards and Conventions
Centered segments
(spine, trunk, pelvis)
are defined as
Right Hand
Segments by default.
distal
•Proximal: closest to the Center of
Mass
•Distal: fa rther away from the Center
of Mass
lateral
medial
Or Origin of the Pelvis.
Proximal end of the pelvis
is on top, distal on the bottom.
•Joint Centers: an area that exists
between the distal end of a segment
and the proximal section
proximal
Segments are joined with a
proximal end meeting the
distal end of another segment.
Center of
Pelvis
proximal
proximal
lateral
medial
lateral
medial
distal
distal
Right side of
Patient (R)
Left side of
Patient (L)
•Median: an imaginary line dividing
the subject into the right and left hand
sides. It is the point of reference from
which lateral and medial are defined.
•Medial markers: markers that are
closest to the median
•Lateral markers: markers that are
the farthest from the segment
The terminology associated with building models are based around two standard
locations.
Perspective: Right and left are always the patient’s right and left.
The “Origin of the Pelvis” is the basis for determining “proximal” and “distal.”
Proximal means closest to the Center of Mass, and distal is farther away. Each
segment is defined with a proximal and distal end.
Joint Centers are assumed to exist between the distal end of a segment and an
extremely close proximal end of another segment.
The pelvis is defined with the proximal end on the top, and the distal end on the
bottom. This is in part so that Joint Center between the thigh and pelvis can be
defined automatically.
The “Median” is an imaginary line dividing the subject into right and left hand sides.
The median line is the standard from which “lateral” and “medial” are defined.
Medial markers are closest to the median, and lateral ones are farthest away on the
same segment. Any segment that straddles or is centered on the median, i.e. the
pelvis or spine, are considered right-hand segments, thus we have a right pelvis.
June, 2003
17
Assigning Capture Data to a Model
A model is based on a single motion capture frame. Typically, a standing trial is done
where extra markers are added so that the segments can be easily defined. A walking
trial needs fewer markers, since the data is mapped against the model – Note: the
tracking markers must be the same in both the static and movement trials.
Watch out for missing markers in
C3D files….
NOTE and WARNING: MARKER NAMES are important when fewer markers are
used in movement trials, since they are the consistent element between trials. Some
camera vendors have software that will rearrange the marker names if you are not
careful, and C3D is order sensitive. Marker names that will be removed should be at
the bottom of the list so that the order never changes for the others.
Once a model has been defined, the next step is to associate the model with the
movement tria ls. This is done through the Model, Assign Models to Motion Files
menu item. Multiple trials can be selected using by holding down the CTRL key.
Assigning Models to Motion Files:
16.
•
To access the “Assign Models
to Motion Files” dialogue box,
click Model -> Assign Models
To Motion Files.
To select multiple trials (when
available in the dialog box) hold
down the Ctrl button and pick
the ones to use with this model.
Any movement trial that gets opened
MUST be assigned to a model.
To define a model for the first time, a blank model is created, then the static trial is
assigned to it. At that point, data is available for defining the model.
June, 2003
18
Reporting
Now that we have attached our data and events to a model, we can decide what to
calculate and display in a report. We will be viewing an existing report and
modifying a graph on the second report page. The sample report is a standard report
template developed at the NIH.
Switch to the Report Mode for Kinematic and Kinetic (Inverse
Dynamics) reports. Notice the additional toolbar controls. The first page of a 10
page report is shown. Advance to the second page of the report.
Zoom in and out
Report Layout Control
17.
Switch to the Report Mode.
Move to page 2 and select the
first graph on the page.
Page number and display size control
The Reports Toolbar
Report Mode:
•
Pan and zoom capabilities are
available for individual graphs,
as well as each page of the report
•
Holding down the left mouse
button will scale the report in the
direction of your mouse
18.
After experimenting with pan
and zoom (left mouse button),
right-click on the graph to see
more options.
Click on the first graph to highlight it. Clicking the right mouse button will bring up a
context menu of options for manipulating the graphs. The same scaling capabilities as
the 2D event graphs are available – by holding down the left mouse button and
moving it up, down, or sideways.
June, 2003
19
Right-clicking on a graph displays these options:
X-Axis Control
Allows scaling and movement along the X-Axis when checked
Y-Axis Control
Allows scaling and movement along the Y-Axis when checked
Autorange
Automatically scales the Y axis when checked
Right Clicking on a report graph
brings up these options to modify or
export it
Format Graph
Displays a dialog box containing options for modifying the format of the graphs
Select All
Selects all of the displayed graphs
Reset Selected
Resets all selected graphs back to their original scales and ranges
Reset All
Resets all graphs back to their original scales and ranges
Export / As Bitmap
Exports the graphs to a bitmap file
Export / To Clipboard
Copies the graphs to the clipboard to allow pasting into another program
Remove All Graphs
Removes all graphs
Remove a Graph
Displays a dialog box to allow removal of individual graphs
Save Graph Layout
Saves the current graph layout to a layout template
Load Graph Layout
Replaces the current graph layout with a saved graph layout
June, 2003
20
Modifying a Report Graph
The first graph on page 2 of the report should be selected now. Click to Report
Layout icon on the toolbar to access the graph details in the current report template.
19.
Click on the report layout
toolbar icon.
20.
Add a mean to the first graph
by selecting it from the top
pane and clicking the Modify
button.
The Report Layout Tool and Dialog Box
Bottom half of screen for adding
NEW graphs or items to the
report.
Then select the current graph (Page 2, Column 1, Row 1) and click on Modify
Selected to change the graph. Note that there are 2 metrics plotted on the same graph,
so there are 2 listings for Page 2, Column 1, Row 1 – P2D and Link Model Based.
•
P2D data is in NormalData.cmo.
Note also that the Name chosen for this graph is a file name, but this file does not
exist in the same place on your computer. The Data Name field is related to the type
of graph chosen, but P2D (2D Point) signals are named by the originating file and the
data is stored in NormalData.cmo.
June, 2003
21
Add a Mean in Bold Cyan…
From the graph details (Modify Dialog) go ahead and add a mean to the graph. This
typifies not only how new graphs are created, but how existing ones can be changed.
Used Processed Targets Option
Defined.
NOTE: Under the Properties menu on the main window is the Use Processed
Targets option, which by default is turned on. This option is for Link Model
calculations and processing (see page 15). When the Link_Model option is selected
in the Data Type combo box above (for X and Y Axis Properties – instead of P2D),
an additional combo box appears for selecting original or processed data.
When the Used Processed Targets option is checked, both processed and original data
will be available for reporting.
Turning off this option will allow graphing using only the Original signals and
targets. Processed signals will be unavailable.
June, 2003
22
Saving Files and Changes
Saving Files in Visual3D:
To save any changes made to the reports, use File -> Save Report Template
•
References and changes to all
files, and templates are saved in
the .cmo file.
•
To save a report template, from
the main menu bar click
File -> Save Report Template
•
To save a model, click
File -> Save Model
To save all of the open C3D files, templates, events, models, and virtual targets as a
.CMO file,
use File -> Save
To keep the current version and create a new or modified version, use File -> Save
As.
To specifically save a model, from the Model Mode, use Model -> Save Model
To save Pipeline Commands (or scripts) for subsequent automated processing, use the
Save Script File button from the Pipeline Dialog.
At this point we are finished walking through the very basic capabilities of Visual3D.
We will now proceed to a more specific example to handle signals, events, and
models.
June, 2003
23
Example 2
Visual3D Example 2:
For this example we will process some actual clinical data step by step from scratch
using the second example set of file downloaded form C-Motion’s web site –
CaseMVC.zip
Restart Visual3D
1.
Open Files
Open the raw C3D file
‘mvc002.c3d’ for processing
from the CaseMVC sample data
set.
If Visual3D is running, exit the program and restart it. Starting with a blank screen,
open the second movement trial in the directory:
File -> Open -> Case_MVC\ mvc002.c3d
The animation viewer shows the markers of this patient’s movement trial. Until a
model is applied, there are no segments defined, and no bones or other objects are
available for display.
The next step is to create a blank
model for this data.
Create Model
The next step, therefore, is to create a model for this data. Switch to the Model Mode
and set up a 6 DOF model for the data.
2.
Switch to Model Mode
3.
Create a 6 degree of freedom
model:
Model -> Create -> Visual3D 6
Degree of Freedom Model
Dialog boxes will appear asking
for more info…
June, 2003
24
The standing calibration file is mvc001.c3d. Use this file to get the initial targets, and
assign the model to the mvc0002.c3d data file.
4.
Use mvc001.c3d for the standing
trial data
5.
Assign to standing trial to the
newly created model.
The Target Label Icon:
•Click to view marker labels.
•Useful for verifying marker labels
June, 2003
25
Creating Segments
Creating Segments:
At this point we will play with the model builder and create a couple of segments
before loading in a pre-configured model.
In the Model Mode, let us define the pelvis segment and a thigh segment, and a joint
angle between them. We start by adding a segment to our blank model. First add the
Pelvis segment
Make sure the View Segments toolbar
icon is selected in order to see the
bones…
NOTE: The first time you add a segment, you will be asked to provide the patient’s
height and weight. Use 65Kg and 1.75m for this example.
Toggle between marker
numbers, names, or no labels. Very
useful when defining segments.
The first time you add a segment, you
will be asked to provide the patient’s
height and weight.
Hint: Use the Target Label Icon on the toolbar to see the marker labels.
It is extremely useful when defining segments. Clicking it several times toggles
between no labels, marker numbers, and marker names.
Now we will define the markers that make up this segment.
On the right side of the screen, we will enter markers PV1, PV2, PV3, and PV4 as
both segment markers, and the tracking markers. We can do this because these
markers are in common between the standing and walking trials. Tracking markers
must be visible in both standing and moving trials.
The DEPTH parameter is needed because the pelvis is described as having a
cylindrical geometry, so enter 0.1 meters here.
June, 2003
6.
Define a Pelvis segment.
Tracking markers must be visible in
both standing and moving trials.
26
Once the proximal and distal markers defining the ends of the segment are entered,
We need to select the tracking markers to follow.
7.
Enter the segment ends and
tracking markers.
8.
Open the Properties dialog to
adjust VRML or Wavefront .obj
graphics that go with a segment.
Defined Segment (pelvis)
Click to view the Pelvis bone object
PV1
PV3
PV2
PV4
Label Tag Toggle
Proximal
Distal
We can also replace the scalable background wireframe object to something
else. We will now let the artist in us run wild and replace the pelvis picture
with a skull, and change its position to be facing forward. ALWAYS CLICK
APPLY before CLOSING when changing properties in this dialog!
ALWAYS CLICK APPLY before
CLOSING when changing properties
in the Properties dialog.
Notice that the head is tilted a bit. We correct it by clicking on the properties box and
adjusting the orientation, scale, and rotation.
June, 2003
27
9.
1.
Open the Properties Dialog
2.
Change the segment background to a skull. (These objects were created in
Alias Wavefront format).
3.
The skull seems to be in a top down view at this point. Change the segment
orientation and the anterior/posterior view to –Z, and the D to P axis to
–Y. This is how you change the Segment’s Coordinate System (SCS).
4.
Use the Sagittal View to control the proper depth, and Rotate/Scale to line
the skull up properly.
Change the pelvis to a skull.
Click the Orientation button in
the Properties dialog to
reposition it (change the SCS Segment Coordinate System) .
10. Use the Rotate/Scale button to
tweak the wireframe. Changing
views (sagittal, etc.) sometimes
helps.
Next we will add a few more segments.
Note that a Radius is needed when a marker is missing (Right and Left Shanks).
We now have a model that looks quite silly in the event view…
To define the Left Shank, create a virtual target by double clicking right next to the
LK marker.
11. Create a Right Thigh segment
using the markers in the picture
on the left… These are
obviously incorrect on purpose.
12. Create the right and left shank
segments. A virtual target will
be needed for the left shank.
Create the VLK virtual marker at a .05 offset on the X axis, and use this as the
proximal / medial marker in the segment definition
June, 2003
28
You screen should now look like this:
June, 2003
29
Create Joint Angle
Next we will define a joint angle between two non-connected segments. A Joint
Center is created automatically when 2 joints are near each other. A joint angle is not
restricted to two linked segments.
Joint Centers are automatically
created when two joints are near each
other.
Joint Angles are angles between any
arbitrary segments.
Click CREATE before closing to save a new item or change an existing one.
Now save the model file as silly.mod in the CASE_MVC directory. From the menu
bar, select:
Model -> Save Model File
June, 2003
30
Reporting
Fro m the File menu, open the standard gait analysis report template mvc.rgt. When
you switch to the Report Mode, you will see many empty reports. This is because the
segments and processed data and events needed for the report have still not been
defined.
13. Open a report template.
We will address that by going to the Model Mode, and open a real model – Load
Model File mvc.mod from the CASE_MVC directory.
14. Load a REAL model file. Verify
report data has been graphed.
Switch to page 5 of the report (in the Report Mode) and see the blank reports filled in.
Now, open several other movement trials – mvc003.c3d, mvc004.c3d and
mvc005.c3d. Append these data files to the current ones rather than closing the
current one(s).
15. Add more motion capture files
(C3D) to the model.
Now assign the model to each of the open files (From the menu, Model -> Assign
Model To Motion Files), and push the re-calculate button on the toolbar.
Opening files and assigning them does not automatically cause the signals to be
processed and graphed. You can make changes, and then reprocess the data on
demand, as selected - regardless of which files are open.
16. Recalculate the results. Use the
recalculate button on the toolbar.
The report now shows
consolidated movement trial
data.
By changing the files assigned to the model, specific trial results can be viewed.
Notice that each movement trial has added its data to each graph.
June, 2003
31
Recalculate the results
Display All Files in the report
17. Notice that each trial is now
graphed as well.
Note and Warning: This sample data
is of a very abnormal gait. Automatic
event identification for these files is
different for each trial, and the events
need to be tweaked before the data in
these reports will make any sense.
This is unfortunate, but try to
remember that these exercises are for
learning the tool, not analyzing data,
but this will happen in the real world
as well.
Now, switch back to the event mode. Pick a signal and display a 2D signal graph.
Now, in the file list combo box on the toolbar, select ALL_FILES and look again at
the graph. The graphs change based on the files selected in the combo box.
18. Switch to event mode and see
how signal graphs change based
on files selected in toolbar
combo box.
June, 2003
32
Example 3
1.
Close and restart Visual3D.
2.
Open the pipeline
In this example, we will use the pipeline processor to script and automate Example 2.
The Pipeline
If Visual3D is running, save any work you were doing and restart the program with
nothing loaded.
From the Script menu item, choose Run Script to bring up the pipeline processor.
The Pipeline icon of the toolbar will do this as well.
June, 2003
33
Pipeline and Script Syntax
Visual3D’s Pipeline Processor:
The pipeline is a workflow utility for creating complex, interactive scripts that
automate processes in Visual3D. Runtime commands are available in the left
window, and the derived content and syntax for each command is presented in a
window on the right. The list of commands to execute (the pipeline) are presented in
the center window. These command lists can be saved as a script (an ASCII file) and
reloaded for use at a later time.
•
The pipeline is used to run or
create scripts and automate
processes.
•
Commands used in the pipeline
can be saved as scripts for later
use.
•
To edit command parameters,
edit the text directly or use the
dialogue windows.
•
Optional parameters have a “!”
in front of the line.
You simply choose the command you want in the left window, and then click the Add
button to move it into the command pipeline. Command parameters are entered or
modified in dialog boxes by highlighting the command in the pipeline window, and
then clicking the Edit button. If the dialog window seems too restrictive or limited, a
Text button provides an editable version of the derived script shown in the right
window. The up and down buttons to the right of the pipeline window let you
reposition a command in the list.
June, 2003
ü
The first line in a command script tells Visual3D the actual
command to run.
ü
Parameters are preceded with a “/” character.
ü
Comments have a “!” and a space in front. Optional parameters are
commented out by default, so the “!” must be removed to use that
parameter.
ü
Commands are terminated with a semicolon.
ü
The plus sign “+” is used for specifying multiple values to a
command parameter
34
Creating a workflow process
Now we create a workflow process to perform the tasks in Example 2. We will need
to:
•
•
•
•
•
•
•
•
Open the movement trial
Create a 6DOF model using a static trial
Open the model file with the segment definitions
Assign the model to movement trial(s)
Automatically label gait events
Process the signals
Open the report template
Create the report
3.
Automate the opening of a file.
Add the Open File command to
the pipeline. Set the optional
parameter to the mvc002.c3d
file. (Remember to delete the
“!”).
4.
Enter the remaining commands
needed to automate Example 2.
To open the movement trial, expand the File processes in the window on the left, and
highlight “Open File.” Click on the Add>>> button to move this process into the
pipeline.
The file name is an OPTIONAL parameter. If a name is not entered, the traditional
Open File window will pop up in response to this command. To fully automate the
process, remove the “! ” comment character from the optional parameter line, and
enter a valid file name. In our case, it is:
D:\ Documents and Settings\Administrator\My Documents\Case_MVC\ mvc002.c3d
Click on the EDIT button to set the parameters in any process. If the GUI dialog
seems to slow or restrictive, the TEXT button brings up an editable version of the raw
scripting text seen in the window on the right. The File Open command is one of
those rare cases where there is no dialog box at this time.
In a similar manner, we add the following seven commands and Edit them:
1.
Create_V3D_Model
Enter this command with the static trial as the parameter…
D:\...\My Documents\Case_MVC\mvc001.c3d
2.
Open_Model_File
D:\...\My Documents\Case_MVC\mvc.mod
(or silly.mod for fun)
(Note: no model name is needed if interactive script desired)
June, 2003
Entering no parameter (i.e. the file
name) means that a file, open dialog
box will pop up when the pipeline is
run. Scripts can be fully automated
or interactive.
35
3.
Assign_Model_File
/MODEL_NAME=
D:\...\My Documents\Case_MVC\mvc001.c3d
/MOTION_FILE_NAMES=
D:\...\My Documents\Case_MVC\mvc002.c3d
4.
Automatic_Gait_Events
Set the Z axis as the gravity axis
5.
Open_Report_Template
D:\Documents and Settings\Administrator\My
Documents\Case_MVC\mvc.rgt
6.
Open_File (note the plus sign is a continuation character for specifying
multiple parameters)
D:\...\My Documents\Case_MVC\mvc003.c3d+
D:\...\My Documents\Case_MVC\mvc004.c3d+
D:\...\My Documents\Case_MVC\mvc005.c3d
7.
Assign_Model_File
/MODEL_NAME=
D:\...\My Documents\Case_MVC\mvc001.c3d
/MOTION_FILE_NAMES=
D:\...\My Documents\Case_MVC\mvc002.c3d+
D:\...\My Documents\Case_MVC\mvc003.c3d+
D:\...\My Documents\Case_MVC\mvc004.c3d
Notes:
Once entered, Save the Script File (to avoid retyping later if you want to change
things) then click the Execute Pipeline button. A processing history box (See picture
on the next page) will appear with the status of each command as it was run. You
should scroll through this dialog and correct any errors in the command parameters (if
any).
•
Save script files to avoid creating
them again.
•
To create a generic script for
future use, remove file names.
5.
6.
Save the script.
Run the script (Execute Pipeline)
Saving and reloading the script is an easy way to re-run a workflow process and avoid
retyping. To generalize the script, specific file names can be removed, thus creating
an interactive script for generic signal processing.
June, 2003
36
June, 2003
7.
Debug the script (if needed):
•
•
Error count at the bottom
Use Previous and Next to view
results of each step of the
pipeline
37
Validate Results
To validate the results, close the pipeline window, click on the RECALCULATE icon
to update the report since new movement files were added.
8.
Recalculate the results. Use the
recalculate button on the toolbar.
9.
Switch to Report mode and view
the report.
In the Report Mode, you will see the multiple signals from each movement trial on
the reports.
This is the end of Example 3.
Remember these trivial examples are merely presented to acquaint the user with the
graphical interface and the workflow pipeline. They do not illustrate the true power
of Visual3D, nor its ability to integrate and extend its capabilities through the use of
plug-ins, but hopefully, you can see where everything fits together.
Many features and capabilities were skipped (such as synchronized video, which
require the proper codecs be installed) but are documented in the on-line help and
users reference guide.
Should you need any help or technical support, C-Motion support staff is always
available through the Internet based help-desk system, on-line FAQ’s, email, and
telephone technical support.
C-Motion can be reached at www.c-motion.com, support@c-motion.com, or
(301) 840-1919.
June, 2003
38
Download