CalibrateDSX Overview

From Visual3D Wiki Documentation
Jump to: navigation, search
Language:  English  • français • italiano • português • español 

CalibrateDSX prepares the X-ray images and calculates the configuration of the X-ray hardware. It performs three important tasks:

  1. correcting the X-ray images (uniformity, distortion, smoothing, resizing)
  2. calculating the 3D configuration of the X-ray hardware (the pose of the X-ray sources and camera image planes)
  3. calculating the transformation between the X-ray lab frame and the motion capture frame

CalDSX Full.png

     X-ray Correction

X-ray images typically suffer from uniformity and distortion errors due to cross-scatter, non-uniform beam intensity, and objects (other than the subject) in the field of view. CalibrateDSX corrects these errors using images taken with an empty field of view (“white” images) and images taken of a uniform grid of holes or beads at known locations (“grid” images). X-ray images of the calibration object and of the subject are corrected by first pre-processing the white and grid images as follows:
Stacks of white images are processed via these steps:

  1. remove outlier images (based on the mean intensity)
  2. average the remaining images
  3. if a non-zero Image Padding parameter is defined, the averaged image is padded
  4. if valid Corrected Image Size X and Corrected Image Size Y parameters are defined, the image is resized accordingly
  5. save the resulting image in TIFF format

Stacks of grid images are processed via these steps:

  1. remove outlier images (based on the mean intensity)
  2. if a non-zero Image Padding parameter is defined, the remaining images are padded
  3. if valid Corrected Image Size X and Corrected Image Size Y parameters are defined, the image is resized accordingly
  4. uniformity-correct the remaining images: output image = white image - grid image
  5. save the resulting image stack in TIFF format
  6. calculate a displacement map for each image
  7. average the displacement maps
  8. calculate initial pixel sizes from the displacements in the center of the map

Once the white and grid images have been processed, all other X-ray images (calibration object, static subject, motion subject, etc.) can be corrected with these steps:

  1. remove outlier images (calibration images only, based on the mean intensity)
  2. smooth remaining images with Gaussian filter
  3. if a non-zero Image Padding parameter is defined, the smoothed images are padded
  4. if valid Corrected Image Size X and Corrected Image Size Y parameters are defined, the image is resized accordingly
  5. uniformity-correct the remaining images: output image = white image - grid image
  6. distortion-correct the remaining images: use displacement maps to move each pixel to its proper location
  7. saving the resulting image stack in TIFF format
     3D X-ray Configuration

CalibrateDSX calculates the 3D configuration of the X-ray hardware (the Pose of the X-ray sources and image planes) from images of a rigid calibration object with precisely placed embedded radio opaque beads. Given corrected images of the calibration object, the 3D configuration of the X-ray hardware can be computed. The first step is to digitize the beads of the object in each X-ray view. Identification of the beads can be difficult if there are many of them in the object. A commonly used object contains 64 beads, but only 40 - 50 are visible in each view. To aid identification, uniquely shaped trinkets are sometimes added to the object. CalibrateDSX enables digitizing of the trinkets, or, if there aren’t any, 4 or 5 beads that are easy to identify. From these 4 - 5 trinket/bead locations, the software can calculate where the other beads are expected to be, and locate and identify their centroids on the images. The user can check these automatically digitized beads and manually digitize any that were misidentified. With this step complete, CalibrateDSX now has, for each X-ray view, a set of 2D bead locations in the image plane and a set of 3D bead locations in the lab frame. A simulated annealing algorithm is used for the DLT (direct linear transform) calculations, outputting the following parameters:

the XYZ position of the X-ray source in the lab frame
the XYZ position of the geometric center of the X-ray image (not the perpendicular point of the X-ray source) in the lab frame
the XYZ Euler angles (or 3x3 transform) expressing the orientation of the X-ray image in the lab frame
the XY pixel size of the X-ray image
     Motion Capture Transform

If traditional motion capture data (e.g., surface markers, inertial sensors) are collected in conjunction with X-ray data, they can be used in X4D to speed the tracking process by determining initial Poses of the bones. CalibrateDSX calculates the transform between the X-ray (lab) frame and the frame of the motion capture system (mocap frame) so that the mocap-based bone Poses can be converted to the lab frame. It does this using surface markers fixed to the calibration object. The 3D positions of these markers are known in the lab frame, which is embedded in the object. The motion capture system records their 3D positions in the mocap frame, and is thus able to compute the transform between the lab and mocap frames.

Tutorials

How To: Using CalibrateDSX

How To: Calculate the 3D Configuration

How To: Collect Calibration Images

Menus

     File Menu
     CalDSX LoadSubjectButton.png
The Load Subject command loads a Subject file.
This command can also be accessed with the Ctrl + O shortcut.
     CalDSX SaveSubjectButton.png
The Save Subject command saves the currently loaded subject to its existing Subject file.
This command can also be accessed with the Ctrl + S shortcut.
     CalDSX SaveSubjectAsButton.png
The Save Subject As command saves the currently loaded subject to a new Subject file.
     CalDSX Save2DPOILocationsButton.png
The Save 2D POI Locations... command saves the current 2D POI locations to text files, one for each view. If names for these files are not already specified in the subject file, you will be prompted to browse for them. Links to these files will then be added to the subject file.
     CalDSX ExitButton.png
The Exit command exits the program and all unsaved data will be lost.
The program can also be closed by using the X in the top right corner of the program window.
     View Menu
     CalDSX DSXConfigurationButton2.png
The DSX Configuration control toggles the appearance of the dockable DSX Configuration widget. It can also be controlled using the Ctrl + Shift + D shortcut.
     CalDSX CalibrationButton2.png
The Calibration control toggles the appearance of the dockable Calibration widget. It can also be controlled using the Ctrl + Shift + C shortcut.
     CalDSX ParametersButton2.png
The Parameters control toggles the appearance of the dockable Parameters widget. It can also be controlled using the Ctrl + Shift + P shortcut.
     CalDSX ImageProcessing2.png
The Image Processing control toggles the appearance of the dockable Image Processing widget. It can also be controlled using the Ctrl + Shift + I shortcut.
     Tools Menu
     CalDSX PropagatePOIsButton.png
The Propagate POIs command propagates all of the POIs in the current object to all of the frames selected in the Tracking slider. The Ctrl + P shortcut can also be used.
     CalDSX PredictPOILocationsButton.png
The Predict POI Locations command predicts the locations of the undigitized POIs from the digitized ones. It works on each view's current frame only, and requires a minimum of four digitized POIs in each view.
     CalDSX Compute3DConfiguration.png
The Compute 3D Configuration command computes the 3D configuration parameters for both views. The source-to-image distance and initial pixel sizes must be specified for both views. At least three POIs on the calibration object must be identified in at least one frame.
     CalDSX CorrectAllTrialsButton.png
The Correct All Trials in Configuration command corrects the x-ray image files in all of the trials of the current configuration. The Ctrl + C shortcut can also be used.
     Mocap Menu
     CalDSX ComputeDSX MocapTransformButton2.png
The Compute DSX/Mocap Transform command computes the transformation matrix between the X-ray frame defined by the calibration object and the motion capture frame.
     CalDSX CreateMocapModelButton2.png
The Create Mocap Model command creates a Visual3D model customized to the subject. A reference trial must be selected and the bones in that trial must have already been tracked for at least one reporting time. The Ctrl + M shortcut can also be used.
     Help Menu
     CalDSX HelpButton2.png
The Help command opens the CalibrateDSX wiki page in the default browser. The F1 shortcut can also be used.
     CalDSX AboutButton2.png
The About option displays a dialog with information about CalibrateDSX, including the installed version number. It also contains the Deactivate button, for deactivating your DSX suite license.

Widgets

     DSX Configuration

CalDSX DSXConfigurationWidget.png

     Subject
The Subject field is automatically populated with the ID of the subject when you load a subject file.
     Session
The Session drop down menu is automatically populated with all of the sessions available available for the current subject.
     Configuration
The Configuration drop down menu is automatically populated with all of the configurations available for the current session.
     Trial
The Trial drop down menu is automatically populated with all of the trials available for the current configuration.
     Object
The Object list is automatically populated with all of the objects in the current trial. Each object is enabled if it has at least one point of interest (POI) that can be digitized in the X-ray images.
     Calibration

The Calibration widget is for digitizing the points of interest (POIs) on the calibration object, so you can calculate the 3D configuration of the X-ray equipment. When you select a trial in the DSX Configuration widget, if it contains a calibration object that object will automatically be selected as well. The table in the Calibration widget will be filled with the object's POIs.

CalDSX CalibrationWidget.png

When you right-click on a POI in the table, the following menu is displayed with commands for editing the POIs:

CalDSX CalibrationWidgetDropdown.png

     Add POI Before
This command adds a POI to the list before the POI that you clicked on.
     Add POI After
This command adds a POI to the list after the POI that you clicked on.
     Rename POI
This command lets you change the name of the POI that you clicked on. You can also achieve this by double-clicking on the POI name. If you change the name, CalibrateDSX will ask if you want to change the name of the POI in all the 2D coordinate files in all trials that use the object.

CalDSX POIRenamePopup.png

     Delete POI
This command deletes the POI that you clicked on.
     Clear POI Location
This command removes the selected POI's location from both views of the current reporting time.
     Clear POI Location in All Frames
This command removes the selected POI's location from both views for all reporting times.
     Disable
This command disables the POI that you clicked on, so that it will be skipped over when POIs are being digitized in the X-rays. Once the POI is disabled, this command in the menu changes to Enable so that you can re-enable it at a later time.
     Parameters
CalDSX ParametersWidget2.png

The Parameters widget displays all the program-wide parameters that can be changed by the user. It is populated when a Subject file is loaded. The descriptions of the parameters can be found here.

     Image Processing

CalDSX ImageProcessingWidget.png

     Show Processed Xrays
The Show Processed Xrays check box controls whether the original Xrays or the thresholded Xrays are displayed in the 2D Xray windows.
     Xray Threshold
Pixels in the Xray images whose intensities are below Xray Threshold are set to 0.0. The threshold is a percentage with a range of 0.0 to 1.0. Changing this value to interactively threshold the Xray images is helpful for determining appropriate values of other parameters, such as Grid Bead Threshold View 1 and Grid Bead Threshold View 2.
     2D Xray Windows

The 2D Xray windows show the X-ray images for both views of the current trial. They also show the digitized points of interest of the current object.

CalDSX 2DViewWithPOI.png

     Slider
The reporting times of the current trial can be navigated using the slider underneath the X-ray images. Each X-ray view shows the time and index of the frame of data being displayed for that view.
     Image Brightness and Contrast
To change the brightness of the X-ray image in either view, left-click on the image and drag the cursor up or down. To change the contrast, left-click and drag the cursor left or right. Press Shift-R to reset the brightness and contrast.
     Image Size
You can zoom in and out of the X-ray image in either view using the mouse wheel. You can also pan the image by middle-clicking on it and dragging it around. Press 'r' to reset the view.
     POI Selection
When a POI is selected in the Calibration widget and the cursor is over one of the X-ray images, it will turn into a square with a circle inside. The cyan circle represents the expected size of the POI on the image and the yellow square is the search box that defines the region that will be searched when looking for the gray scale circle representing the POI. The size of the circle and the search box are calculated based on the POI size defined in the subject file and the parameters POI Scale and Click Search Factor.
After you digitize the POI location in both views, the Calibration widget will automatically advance the current POI to the next one that does not have both locations defined. You can digitize a POI in the two views in whichever order you want.
Retrieved from ""