πŸ“™
XROMM
  • Table of Contents
  • Introduction to XROMM
  • Model Generation
    • Model Generation: Creating 3D models using Amira software
    • Model Generation : Creating 3D models with Horos
    • Model Generation : Creating 3D models with 3D Slicer
    • Model Generation : 3D Marker Models with Horos
    • Model Generation : Cleaning up 3D models with Geomagic
    • Model Generation : Cleaning 3D models with MeshLab
    • Model Generation : Measure CT Marker Coordinates in Maya
  • Animate Bones and Markers
    • Animate Bones and Markers : Importing mesh models into Maya from Horos
    • Animate Bones and Markers : Animate Bones in Maya
    • Animate Bones and Markers : Check Your Animation with MayaCams
  • Maya Analysis and Visualization
    • Maya Analysis and Visualization : Working with joint coordinate systems (JCS)
    • Maya Analysis and Visualization : Measuring and exporting the distance between two points
    • Maya Analysis and Visualization : Measuring XYZ Coordinates of a Point Over Time
    • Maya Analysis and Visualization : Parent a camera to a reference bone
    • Maya Analysis and Visualization : Relative Motion
  • Scientific Rotoscoping
    • Scientific Rotoscoping : Recreate X-Ray cameras in Maya
    • Scientific Rotoscoping : Scientific Rotoscoping in Maya
      • Scientific Rotoscoping : Pan and Scan tools for Rotoscoping
    • Scientific Rotoscoping : Animating a Bone with One or Two Markers
  • Tips and Tools
    • Tips and Tools : Open Maya files from a newer version with older versions
    • Tips and Tools : Precision testing using frozen cadavers
    • Tips and Tools : Import XYZ points into Maya
  • XMAPortal User Manual
    • XMAPortal : Getting Started with XMAPortal
    • XMAPortal : How to Create a New Study
    • XROMM : How to Modify Study Metadata
    • XROMM : How to give access or revoke access to see your study
    • XMAPortal : Data Organization
    • XMAPortal : Metadata Pool
    • XMAPortal : How to Create Trials
    • XMAPortal : How to edit an existing trial
    • XMAPortal : How to upload files
      • XMAPortal : Clearing your browser history
      • XMAPortal : Changing how Java applet connects to the network
      • XMAPortal : Show Firefox developer window
    • XMAPortal : Hide Files
Powered by GitBook
On this page
  • Creating a skeleton setup Maya scene
  • For both one and two markers:
  • For one marker:
  • For two markers:
  • Animating the bone model
  • For both one and two markers:
  • For one marker:
  • For two markers:

Was this helpful?

  1. Scientific Rotoscoping

Scientific Rotoscoping : Animating a Bone with One or Two Markers

PreviousScientific Rotoscoping : Pan and Scan tools for RotoscopingNextTips and Tools

Last updated 5 years ago

Was this helpful?

If there are only one or two markers in a bone, you can still reconstruct 3D movement of the bone by combining marker-based and markerless (Scientific Rotoscoping) techniques. If other bones have 3 or more markers, you can simply animate those bones by following instructions for marker-based data (link).

Creating a skeleton setup Maya scene

For both one and two markers:

  1. Save your current Maya scene as your skeleton setup scene.

  2. In the skeleton setup scene, calculate the marker centroids for each marker using the . Be sure to use the same marker number(s) as in your digitized data. You do not need to export the CT marker centroid data.

For one marker:

  1. Parent the bone that you want to position to the locator (created by the vAvg marker centroid calculations) of the marker you want to use to position the bone. Do this by first selecting the bone, then shift+selecting the marker centroid locator, and then select Edit -> Parent (or press 'P').

  2. To prevent accidentally moving the bone relative to the marker, select the bone model and then select the translate, rotate and scale channels in the channel box. Right click and select β€œLock selected”.

  3. Your bone should now be a child of the marker centroid locator, and the bone’s translations and rotations should be locked. Save your skeleton setup scene and close it.

For two markers:

  1. Create a new locator (Create -> Locator) and name it controlParent. Then create a duplicate of controlParent by selecting the controlParent locator and select Edit->Duplicate. Name the newly duplicated locator controlChild and parent it under controlParent (select controlChild, then controlParent, then Edit->Parent).

  2. Create a point constraint. Shift+select the two marker centroid locators (created by the vAvg marker centroid calculations) being used to position the bone. Then shift+select controlParent (all three locators should now be selected, with controlParent last). Under the Animation menu set, choose Constrain -> Point. Make sure that under Point Constraint Options (click on square to right of Point in Constrain menu), the β€œMaintain offset” box is unchecked.

  3. Create an aim constraint. Select ONE of the marker centroid locators being used to position the bone; it does not matter which one. Then shift+select controlParent (two locators should now be selected) and choose Constrain->Aim.

  4. Select controlChild and figure out which rotation (X, Y, or Z) spins about the axis between the two markers. Do this by selecting controlChild and using the Rotate Tool to rotate each axis independently. When you have determined the correct rotation axis, return all controlChild translations and rotations to zero (use the channel box). Select the other two rotation axes and lock by selecting them in the channel box, right-clicking, and selecting β€œLock selected”.

  5. Parent the bone model under controlChild. Your hierarchy should now look like this:

  6. Save your skeleton setup scene and close it.

Animating the bone model

For both one and two markers:

  1. Reference the skeleton setup scene by Choosing File-> Create Reference and navigate the skeleton setup scene you wish to use.

For one marker:

  1. Select the marker centroid locator that is the parent of the bone model you are animating. You should have digitized data (xyzpts.csv file) for this marker.

  2. Type impOneMarker (your marker number here) in the MEL command line. For example, if your marker centroid locator is β€œm001”, type impOneMarker(001). This, like all MEL commands, is case-sensitive. A dialog box will open, allowing you to select your digitized data (xyzpts.csv) file.

  3. The previous step will β€œpin” your bone model to the digitized position of the selected maker and set keyframes on the Translate X, Translate Y, and Translate Z channels. Tip: If your bone model does not appear to move to its digitized position, move to a different frame of the animation. Changing the frame seems to "refresh" the animation, and the bone will appear in its proper position in all frames.

    1. you only need to manipulate rotations to align the bone model and

For two markers:

  1. Select the two marker centroid locators. You should have digitized data (xyzpts.csv file) for these markers.

  2. Type impTwoMarker (marker1 number, marker2 number) in the MEL command line. For example, if your marker centroid locators are β€œm001” and β€œm002”, type impTwoMarker(001, 002). This, like all MEL commands, is case-sensitive. A dialog box will open, allowing you to select your digitized data (xyzpts.csv) file. Be sure that you enter your marker numbers in the same order that you selected the locators. For example, if you selected centroid locator 001 and then centroid locator 002, you should type impTwoMarker(001,002).

  3. The position and orientation of controlParent locator (and thus the bone model) will be dictated by the position of the two markers. Tip: If your bone model does not appear to move to its digitized position, move to a different frame of the animation. Changing the frame seems to "refresh" the animation, and the bone will appear in its proper position in all frames.

Create an animation scene by and loading the undistorted video on the appropriate cameras.

Now you can select the marker centroid locator and use the rotation tool to properly orient the bone according to the x-ray video images. You are now ready to rotoscope your bone (see instructions for using the). The only differences from markerless rotoscoping is that

you will be changing the rotations of the marker centroid locator, not the bone model itself.

You should now be able to align the bone model to the x-ray video images by rotating the controlChild locator about its single unlocked rotation. The only differences from markerless rotoscoping is that 1) you only need to manipulate a single rotation to align the bone model and 2) you will be changing the rotations of the controlChild locator, not the bone model itself.

importing both x-ray cameras
Pan and Scan tool
vAvg shelf tool