CalibrateDSX Overview

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

There are two calibration steps that must be performed before you can import X-ray and CT data into X4D for tracking.

     Uniformity-Correct_and_Distortion-Correct_the_X-ray_Images
DSX currently supports only one type of distortion grid.
If necessary, C-Motion will work with your lab to add support for the distortion grid and calibration object that you use.
You can also correct the X-ray images using your own software, and calculate the 3D configuration parameters and enter them into the subject file.
You can resize the x-ray images.
     Calculate_3D_Configuration_Parameters_of_the_X-ray_sources_and_Image_Sensors
CalibrateDSX should work with any calibration object
If necessary C-Motion will work with you lab to add support for the calibration object that you use.
CalibrateDSX provides the following functions:
Digitizing the beads in the calibration cube,
Calculating the 3D configuration parameters for each view, and
Calculating the transformation matrix between the x-ray frame defined by the calibration cube and the motion capture reference frame.

Note: The transform matrix between the x-ray frame and the motion capture reference frame is needed if you want to use motion capture data to seed the pose optimization in X4D.

The 3D parameters for each view are:
the XYZ position of the xray source in the lab frame
the XYZ position of the geometric center of the xray image (not the perpendicular point of the xray source) in the lab frame
the XYZ Euler angles (or 3x3 transform) expressing the orientation of the xray image in the lab frame
the XY pixel size of the xray image
The calibration object algorithms are implemented in a dll plugin framework, allowing the user to integrate his/her own code into the program.

CalDSX Full.png

     Menus
     File Menu

CalDSX LoadSubjectButton2.png Load Subject... - This control allows the user to load an existing subject .xml file. The Ctrl + O short cut can also be used.

CalDSX SaveSubjectButton2.png Save Subject - This control allows the user to save any changes that have been made to the currently loaded subject's .xml file. The Ctrl + S short cut can also be used.

CalDSX SaveSubjectAsButton2.png Save Subject As... - This control allows the user to save a new .xml subject file.

CalDSX Save2DPOILocationsButton2.png Save 2D POI Locations... - This control allows the user to save the current 2D POI Locations to a .txt file.

CalDSX ExitButton2.png Exit - This control allows the user to exit the program, any unsaved data will be lost. The program can also be exited by clicking on the X at the top right of the screen.

     View Menu

CalDSX DSXConfigurationButton2.png DSX Configuration - This controls the presence or the absence of the DSX Configuration widget on the left side of the screen. If there is a blue box with a checkmark in it to the left of the dropdown menu then the DSX Configuration widget is active. The Ctrl + Shift + D short cut can also be used.

CalDSX CalibrationButton2.png Calibration - This controls the presence or the absence of the Calibration widget on the left side of the screen. If there is a blue box with a checkmark in it to the left of the dropdown menu then the Calibration widget is active. The Ctrl + Shift + C short cut can also be used.

CalDSX ParametersButton2.png Parameters - This controls the presence or the absence of the Parameters widget on the left side of the screen. If there is a blue box with a checkmark in it to the left of the dropdown menu then the Parameters widget is active. The Ctrl + Shift + P short cut can also be used.

CalDSX ImageProcessing2.png Image Processing - This controls the presence or the absence of the Image Processing widget on the left hand side of the screen. If there is a blue box with a checkmark in it to the left of the dropdown menu then the Image Processing widget is active. The Ctrl + Shift + I short cut can also be used.

     Tools Menu

CalDSX PropagatePOIsButton2.png Propagate POIs - This control propagates all of the POIs in the current object to all of the frames selected in the Tracking slider. The Ctrl + P short cut can also be used.

CalDSX PredictPOILocationsButton2.png Predict POI Locations - This control predicts the locations of the undigitized POIs from the digitized ones. This view works on each view's current frame only, and requires a minimum of four digitized POIs in each view.

CalDSX Compute3DSetupButton2.png Compute3D Setup - This control 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 cube must be identified in at least one frame.

CalDSX CorrectAllTrialsButton2.png Correct All Trials - This control corrects the x-ray image files in all of the trials of the current configuration. The Ctrl + C short cut can also be used.

     MoCap Menu

CalDSX ComputeDSX MocapTransformButton2.png ComputeDSX / Mocap Transform - This control computes the transformation matrix between the x-ray frame defined by the calibration cube and the motion capture frame.

CalDSX CreateMocapModelButton2.png Create Mocap Model - This control 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 short cut can also be used.

     Help Menu

CalDSX HelpButton2.png Help - This control opens the CalibrateDSX Overview Page so that the user can access the available documentation for the CalibrateDSX program. The F1 key can also be used as a shortcut.

     About

CalDSX AboutButton2.png About - This control opens the About dialog, which can be seen below.

CalDSX AboutDialogue.png

The About dialog contains basic information about the CalibrateDSX. This includes the version number, the release date, the copyright details, the C-Motion support desk e-mail (support@c-motion.com), the version number for the C-Motion Library being used by CalibrateDSX and the License number. Clicking the OK button or the x in the top right corner will close the About dialog. Clicking the Deactivate button removes the license key from the program and allows it to be used on another computer.

Screen Sections

The widgets in CalibrateDSX are controlled by the View dropdown menu.
The widgets can also be manipulated in the following ways:
they can be removed by clicking on the X in the top right corner of the widget,
they can be moved around the screen by selecting the grey bar at the top of the widget and then dragging it into the new position,
and they can be undocked from the main window by using the double square symbol at the top right of the widget.
     DSX Configuration

CalDSX DSXConfigurationWidget.png

     Subject
The Subject name is automatically entered based on the information in the subject file that had been loaded.
     Session
The Session names are automatically loaded into the drop down menu in CalibrateDSX.
In order to add or alter the Sessions in the drop down menu the changes need to be made in the subject file created by XManager.
     Configuration
The Configuration can not be selected until the Session has been selected.
The drop down menu is automatically populated by the content of the subject file.
Configurations can be added or altered by making changes to the subject file created by XManager.
     Trial
The Trials drop down menu is automatically populated once a subject has been loaded and a Configuration has been selected.
The Trials can be added or altered by making changes to the subject file created by XManager.
     Object
The Object list is automatically populated based once a subject has been loaded and a trial has been selected.
Objects can be added or altered by making changes to the subject file created by XManager.
The Object with the check mark next to it is the Object that is active in the Viewer.
     Calibration

CalDSX CalibrationWidget.png

The Calibration Widget drop down can be accessed by right clicking on the POIs table.

CalDSX CalibrationWidgetDropdown.png

     Add POI Before
This option allows the user to add a POI to the list in the POI table before the POI that is selected by the cursor.
     Add POI After
This option allows the user to add a POI to the list in the POI table after the POI that is selected by the cursor.
     Rename POI
This option places the cursor in the name cell of the POI that is selected by the cursor.
The user can then delete the name that exists and type in a new one.
CalibrateDSX will ask if you wish to change the name of the POI in all the 2D and 3D coordinate files in all trials that use the object.

CalDSX POIRenamePopup.png

     Delete POI
This option allows the user to delete the selected POI.
     Clear POI Location
This option removes the selected POI's location from the inline and offset views of the frame that is currently active in the 2D Viewer.
     Clear POI Location in All Frames
This option removes the selected POI's location from the inline and offset view and all of the frames.
     Disable
This option gray's out the selected POI in the POI's table.
Once the POI is grayed out the option in the drop down menu becomes Enable and allows the user to reactivate the disabled POI.
When the POI is disabled it will be skipped over when the POIs are being placed on the x-ray views.
     Parameters

CalDSX ParametersWidget2.png

     Centroid Threshold
The Centroid Threshold is the relative threshold for identifying pixels that belong to the POI.
Once a grayscale region has been identified as a POI, its centroid is calculated by a weighted average of all the pixels that have an intensity value greater than this percentage (0.0 to 1.0) of the maximum intensity.
     Click Search Factor
The Click Search Factor is used when digitizing POIs in the x-ray images.
If you click at point X,Y in an image, a region of the image is searched for the best location of a grayscale centroid.
This region is a square centered at X,Y with sides equal to two times the expected radius of the POI times the propagation search factor (default = 1.25).
     Corrected Image Size X
The Corrected Image Size X is the size, in pixels, of the corrected x-ray image on the x-axis.
The default value is -1, which preserves the original size.
     Corrected Image Size Y
The Corrected Image Size Y is the size, in pixels, of the corrected x-ray image on the y-axis.
The default value is -1, which preserves the original size.
     Edge Threshold
The Edge Threshold is the relative threshold for identifying suitable POIs.
For a grayscale region in an x-ray image to be considered a POI, the average edge value within the region must be at least at the Edge Threshold percentage (0.0 to 1.0) of the maximum edge value.
The default value is 0.10.
     Guess Kernel Size
The Gauss Kernel Size is the size of the Gaussian smoothing kernel used to reduce noise in the x-ray images during correction.
The acceptable values are 3 (for a 3x3 kernel), 5 (for a 5x5 kernel), and 7 (for a 7x7 kernel).
Any other value will turn off the x-ray smoothing. The default value is -1.
     Guess Sigma
The Gauss Sigma is the standard deviation of the Gaussian distribution curve used for x-ray smoothing.
The larger the value, the higher the weight of a pixel’s neighbors when smoothing that pixel.
The default value is 1.0.
     Grid Bead Threshold View 1
The Grid Bead Threshold is the relative intensity threshold for when processing calibration grid x-ray images for the first view.
Pixels with intensities below this percentage (0.0 to 1.0) of the maximum intensity are set to 0.
The default value is 0.3.
     Grid Bead Threshold View 2
The Grid Bead Threshold is the relative intensity threshold for when processing calibration grid x-ray images for the second view.
Pixels with intensities below this percentage (0.0 to 1.0) of the maximum intensity are set to 0.
The default value is 0.3.
     Grid Invert
The Grid Invert controls whether or not to invert the intensities of the grid image during correction.
If the grid object is radiopaque beads, this parameter should be false.
If your grid is holes in a radiopaque sheet, this parameter should be true.
The default is false.
In the corrected grid images the centroids used to perform distortion correction should be light regions on a dark background.
     Grid X Angle
The Grid X Angle is the angle between the X axis of grid beads/holes and the X axis of the grid image.
If the grid X axis is supposed to be aligned with the image intensifiers, set this parameter to 0.0.
If the alignment of the grid X axis is unknown (common with hex grids of holes), set this parameter to a value outside the range -360.0 to 360.0, which tells CalibrateDSX to calculate the alignment.
The default value is 999.9.
     Grid XY Angle
The Grid XY Angle is the angle between the X and Y axes of beads/holes in the grid object.
For hex grids, this parameter can be set between 60.0 and 120.0.
The default value is 90.0.
     Grid X Spacing
The Grid X Spacing is the distance between adjacent beads/holes, in the grid object, along the X axis.
The measure is in millimetres.
The default value is 10.0.
     Grid Y Spacing
The Grid Y Spacing is the distance between adjacent beads/holes, in the grid object, along the Y axis.
The measure is in millimetres.
The default value is 10.0.
     Image Distance Allowance
The Image Distance Allowance is used when calculating the 3D configuration parameters.
It is the amount by which the source-to-image-plane distance is allowed to change from the user-specified value.
The default value is 0.0.
     Image Padding
The Image Padding is the number of pixels to add onto all four sides of an x-ray image during distortion correcting.
The default value is 0.
     Intensity Threshold
The Intensity Threshold is the relative intensity threshold when uniformity-correcting images.
A pixel in the corrected image is set to zero if its corresponding pixel in the white image has an intensity less than this percentage (0.0 to 1.0) of the maximum intensity in the white image.
     Optimize Pixel Size
The Optimal Pixel Size controls whether or not to optimize the pixel size when calculating the 3D configuration parameters.
The default value is false.
     POI Scale
The POI Scale is used to calculate the expected radius, in pixels, of the POI in the x-ray images.
The expected radius is the physical size of the POI multiplied by the scale factor, divided by the pixel size.
The scale factor should increase with the distance between the POI and the image plane.
The default value is 1.0.
     Pose Map Cutoff Frequency
The Pose Map Cutoff Frequency is the low-pass cutoff frequency for smoothing the cubic splines in the POI pose map.
The default value is 20.0.
If the value is set to 0.0 or less the smoothing is turned off.
     Propagation Search Factor
The Propagation Search Factor is used when propagating POIs.
In order to propagate a POI, at the coordinates X and Y in one frame, to the next frame a region of the next frame is searched for the best location of a grayscale centroid.
This region is a square centered at X, Y with sides equal to two times the expected radius of the POI times the propagation search factor.
The default value is 2.0.
     Square Pixels
The Square Pixels control whether or not to force the X and Y pixel sizes to be the same when distortion-correcting an x-ray image.
The default value is true.
     Image Processing

CalDSX ImageProcessingWidget.png

     Show Processed X-rays
The Show Processed Xrays check box allows the user to use the Xray Threshold control to change the threshold of the x-ray image.
     Xray Threshold
The X-Ray Threshold can either be controlled with the slider in the center or the counter on the far right. The values range from 0.00 to 1.00.
     2D Viewer

The 2D Viewer shows the x-ray images that are loaded with the object that is selected in the DSX Configuration Widget. It also allows the user to place Points of Interest.

CalDSX 2DViewWithPOI.png

     Views
There are two 2D Views in CalibrateDSX.
The view on the left is the x-ray image of the inline x-ray source and the view on the right is the x-ray image of the offset x-ray source.
The time that the image was captured is in the bottom left corner of the x-ray image.
The frame number of the image is in the bottom right corner of the x-ray image.
     Slider
The x-ray frames can be navigated using the slider at the bottom of the screen section.
Clicking and dragging the slider allows the user to navigate the x-ray images.
The slider can also be controlled by using the arrows in the counter on the far right.
The number in the counter should match the time number in the bottom left hand corner of the x-ray images.
     Image Intensity
The x-ray image can be made brighter by clicking on the x-ray image and dragging the cursor either to the right or down. The x-ray image can be made darker by clicking on the x-ray image and dragging the cursor up and to the left.
     Image Size
To change the size of the x-ray view place the cursor over the x-ray image and use your mouse`s roller or track pad's scroll function and zoom in and out.
Placing the cursor over the x-ray view and pressing the R key to return the x-ray image to its original size.
     POI Selection
When a POI is selected in the Calibration widget and the cursor is moved to the x-ray image it will turn to a square with a circle inside.
The turquoise circle represents the expected side of the POI on the image and the yellow square is the search box that represents the region that will be searched when looking for the gray scale shape 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 relevant parameters in the Parameters widget.

Correcting Images

The following correcting processes occur automatically when a file is opened that has not yet been corrected. The white, grid, and cube images are taken from the intensity, distortion, and calibration trials.

     Uniformity Correction Images

Stacks of uniformity correction images (white images) are processed as follows:

  1. the outlier images are removed;
  2. the remaining images are averaged;
  3. if a non-zero Image Padding parameter is defined, then the averaged image is padded;
  4. if valid Corrected Image Size X and Corrected Image Size Y parameters are defined, then the image is resized accordingly; and
  5. the resulting image is saved in TIFF format.
     Distortion Correction Images

Stacks of distortion correction images (grid images) are processed as follows:

  1. the outlier images are removed;
  2. if a non-zero Image Padding parameter is defined, then the remaining images are padded;
  3. if valid Corrected Image Size X and Corrected Image Size Y parameters are defined, then the image is resized accordingly;
  4. the remaining frames are uniformity-corrected using already processed uniformity correction images;
  5. the resulting image stack is saved in TIFF format;
  6. a displacement map is calculated for each frame;
  7. the displacement maps are averaged; and
  8. the initial pixel sizes is calculated from the displacements in the center of the map.
     Calibration Images & Motion Trial Images

Stacks of calibration images (cube images) and motion trial images are processed as follows:

  1. the outlier images are removed;
  2. the remaining images are smoothed with a Gaussian filter;
  3. if a non-zero Image Padding parameter is defined, then the smoothed images are padded;
  4. if valid Corrected Image Size X and Corrected Image Size Y parameters are defined, then the images are resized accordingly;
  5. the images are corrected using already processed uniformity correction and distortion correction images; and
  6. the resulting image stack is saved in TIFF format.
Retrieved from ""