CalibrateDSX Overview: Difference between revisions

From Software Product Documentation
Jump to navigation Jump to search
 
 
(133 intermediate revisions by the same user not shown)
Line 4: Line 4:
| __TOC__
| __TOC__
|}
|}
[[Image:CalDSX_Full.png|800px]]


CalibrateDSX prepares the X-ray images and calculates the configuration of the X-ray hardware. It performs three important tasks:
CalibrateDSX prepares the X-ray images and calculates the configuration of the X-ray hardware. It performs three important tasks:
 
<!--
#correcting the X-ray images (uniformity, distortion, smoothing, resizing)
#correcting the X-ray images (uniformity, distortion, smoothing, resizing)
#calculating the 3D configuration of the X-ray hardware (the pose of the X-ray sources and camera image planes)  
#calculating the 3D configuration of the X-ray hardware (the pose of the X-ray sources and camera image planes)  
#calculating the transformation between the X-ray lab frame and the motion capture frame
#calculating the transformation between the X-ray lab frame and the motion capture frame
-->
[[Image:CalDSX_Full.png|600px]]


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
{| class="mw-collapsible mw-collapsed wikitable" width="80%" data-expandtext="&#9660;" data-collapsetext="&#9650;
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;X-ray Correction
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1. 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:</br>
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). Information on collecting white and grid images can be found [[CalibrateDSX_HowTo_Collect_Calibration_Images|here]]. X-ray images of the calibration object and of the subject are corrected by first pre-processing the white and grid images as follows:</br>
Stacks of white images are processed via these steps:
Stacks of white images are processed via these steps:
#remove outlier images (based on the mean intensity)
#remove outlier images (based on the mean intensity)
#average the remaining images
#average the remaining images
#if a non-zero [[CalibrateDSX_Parameters#Image Padding|Image Padding]] parameter is defined, the averaged image is padded
#add an optional border to the image, based on the value of the [[#Image Padding|Image Padding]] parameter
#if valid [[CalibrateDSX_Parameters#Corrected Image Size X|Corrected Image Size X]] and [[CalibrateDSX_Parameters#Corrected Image Size Y|Corrected Image Size Y]] parameters are defined, the image is resized accordingly
#resize the image to the size specified by the [[#Image Size|Image Size]] parameter
#save the resulting image in TIFF format
#save the resulting image in the TIFF format


Stacks of grid images are processed via these steps:
Stacks of grid images are processed via these steps:
#remove outlier images (based on the mean intensity)
#remove outlier images (based on the mean intensity)
#if a non-zero [[CalibrateDSX_Parameters#Image Padding|Image Padding]] parameter is defined, the remaining images are padded
#add an optional border to the images, based on the value of the [[#Image Padding|Image Padding]] parameter
#if valid [[CalibrateDSX_Parameters#Corrected Image Size X|Corrected Image Size X]] and [[CalibrateDSX_Parameters#Corrected Image Size Y|Corrected Image Size Y]] parameters are defined, the image is resized accordingly
#resize the images to the size specified by the [[#Image Size|Image Size]] parameter
#uniformity-correct the remaining images: output image = white image - grid image
#uniformity-correct the remaining images: output image = white image - grid image
#save the resulting image stack in TIFF format
#save the resulting image stack in the TIFF format
#calculate a displacement map for each image
#calculate a displacement map for the first image
#average the displacement maps
#calculate initial pixel sizes from the displacements in the center of the map
#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:
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:
#remove outlier images (calibration images only, based on the mean intensity)
#remove outlier images (calibration images only, based on the mean intensity)
#smooth remaining images with Gaussian filter
#optionally smooth the remaining images with a Gaussian filter
#if a non-zero [[CalibrateDSX_Parameters#Image Padding|Image Padding]] parameter is defined, the smoothed images are padded
#add an optional border to the images, based on the value of the [[#Image Padding|Image Padding]] parameter
#if valid [[CalibrateDSX_Parameters#Corrected Image Size X|Corrected Image Size X]] and [[CalibrateDSX_Parameters#Corrected Image Size Y|Corrected Image Size Y]] parameters are defined, the image is resized accordingly
#resize the images to the size specified by the [[#Image Size|Image Size]] parameter
#uniformity-correct the remaining images: output image = white image - grid image
#uniformity-correct the remaining images: output image = white image - input image
#distortion-correct the remaining images: use displacement maps to move each pixel to its proper location
#distortion-correct the remaining images: use the average displacement map to move each pixel to its proper location
#saving the resulting image stack in TIFF format
#saving the resulting image stack in the TIFF format


'''Note: uniformity correction and distortion correction are both optional. If no white images are specified in the calibration data, uniformity correction will be skipped and the images to be corrected will simply be inverted. Similarly, if no grid images are specified, distortion correction will be skipped.'''
|}
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
{| class="mw-collapsible mw-collapsed wikitable" width="80%" data-expandtext="&#9660;" data-collapsetext="&#9650;
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3D X-ray Configuration
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2. 3D X-ray Configuration
|-
|-
|
|
Line 59: Line 60:
|}
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
{| class="mw-collapsible mw-collapsed wikitable" width="80%" data-expandtext="&#9660;" data-collapsetext="&#9650;
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Motion Capture Transform
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3. 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.
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 thus the transform between the lab and mocap frames can be computed.


|}
|}
Line 69: Line 70:
==Tutorials==
==Tutorials==


[[CalibrateDSX_Tutorial|How To: Using CalibrateDSX]]
<!-- Note: '====' gives '[edit] link; '<h4> doesn't -->
 
<h4><span id="CalDSXTutorials01"></span>[[CalibrateDSX: Correcting_Images_and_3D_Calibration|How To: Correct X-ray Images and Perform 3D Calibration]]</h4>
[[CalibrateDSX_HowTo_Calculate_3D_Configuration|How To: Calculate the 3D Configuration]]
<h4><span id="CalDSXTutorials02"></span>[[CalibrateDSX:_HowTo_Collect_Calibration_Images|How To: Collect Calibration Images]]</h4>
 
<h4><span id="CalDSXTutorials03"></span>[[CalibrateDSX:_How_to_Digitize_Points_of_Interest|How To: Digitize Points of Interest]]</h4>
[[CalibrateDSX_HowTo_Collect_Calibration_Images|How To: Collect Calibration Images]]
<h4><span id="CalDSXTutorials04"></span>[[CalibrateDSX:_The_Importance_of_Image_Smoothing_and_Downsampling|The Importance of Image Smoothing and Downsampling]]</h4>
<h4><span id="CalDSXTutorials05"></span>[[https://youtu.be/FYXnMrDlXvE| Video Tutorial on Calibration]]</h4>


==Menus==
==Menus==
<!-- Note: '====' gives '[edit] link; '<h4> doesn't -->


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
<h4><span class="mw-customtoggle-File"><span class="mw-customtoggletext" style="color:rgb(6,69,173);">File Menu</span></span></h4>
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File Menu
<div id="mw-customcollapsible-File" class="toccolours mw-collapsible mw-collapsed" style="margin-left:1em; width:80%;">
|-
|
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Image:CalDSX_LoadSubjectButton.png]]
|-
|
:The <i>Load Subject</i> command loads a Subject file.
:This command can also be accessed with the Ctrl + O shortcut.
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
[[File:CalDSX_FileMenu.png|right]]
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Image:CalDSX_SaveSubjectButton.png]]
|-
|
:The <i>Save Subject</i> command saves the currently loaded subject to its existing Subject file.
:This command can also be accessed with the Ctrl + S shortcut.
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
;Open Subject... (Ctrl + O)
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Image:CalDSX_SaveSubjectAsButton.png]]
: loads a subject file.  
|-
|
:The <i>Save Subject As</i> command saves the currently loaded subject to a new Subject file.
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
;Save Subject (Ctrl+ S)
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Image:CalDSX_Save2DPOILocationsButton.png]]
: saves the currently loaded subject to its existing subject file.  
|-
|
:The <i>Save 2D POI Locations...</i> 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.
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
;Save Subject As...
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Image:CalDSX_ExitButton.png]]
: saves the currently loaded subject to a new subject file.
|-
|
:The <i>Exit</i> 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.
|}
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
;Save 2D POI Locations...
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;View Menu
: 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.
|-
|
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Image:CalDSX_DSXConfigurationButton2.png]]
|-
|
:The <i>DSX Configuration</i> control toggles the appearance of the dockable <i>DSX Configuration</i> widget. It can also be controlled using the Ctrl + Shift + D shortcut.
|}
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Image:CalDSX_CalibrationButton2.png]]
|-
|
:The <i>Calibration</i> control toggles the appearance of the dockable <i>Calibration</i> widget. It can also be controlled using the Ctrl + Shift + C shortcut.
|}
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Image:CalDSX_ParametersButton2.png]]
|-
|
:The <i>Parameters</i> control toggles the appearance of the dockable <i>Parameters</i> widget. It can also be controlled using the Ctrl + Shift + P shortcut.
|}
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Image:CalDSX_ImageProcessing2.png]]
|-
|
:The <i>Image Processing</i> control toggles the appearance of the dockable <i>Image Processing</i> widget. It can also be controlled using the Ctrl + Shift + I shortcut.
|}
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
;Exit
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tools Menu
: exits the program. The program can also be closed by using the X in the top right corner of the program window.
|-
|
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Image:CalDSX_PropagatePOIsButton.png]]
|-
|
:The <i>Propagate POIs</i> command propagates all of the POIs in the current object to all of the frames selected in the <i>Tracking</i> slider. The Ctrl + P shortcut can also be used.
|}
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Image:CalDSX_PredictPOILocationsButton.png]]
|-
|
:The <i>Predict POI Locations</i> 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.
|}
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Image:CalDSX_Compute3DConfiguration.png]]
|-
|
:The <i>Compute 3D Configuration</i> 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.
|}
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Image:CalDSX_CorrectAllTrialsButton.png]]
|-
|
:The <i>Correct All Trials in Configuration</i> command corrects the x-ray image files in all of the trials of the current configuration. The Ctrl + C shortcut can also be used.
|}
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Image:CalDSX_ShowPerfectCalibrationButton.png]]
|-
|
:The <i>Show Perfect Calibration Beads</i> command displays projections of the calibration beads onto the X-ray images of the calibration trial. Once the 3D configuration has been computed, rays can be projected from the X-ray sources through each bead until they intersect the images. These intersections, shown as small crosshairs, represent a "perfect" calibration of the system. That is, if all of the digitized calibration beads (POIs) are coincident with these bead projections, the residuals of the 3D configuration computation will be zero.
|}
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
</div>
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mocap Menu
|-
|
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Image:CalDSX_ComputeDSX_MocapTransformButton2.png]]
|-
|
:The <i>Compute DSX/Mocap Transform</i> command computes the transformation matrix between the X-ray frame defined by the calibration object and the motion capture frame.
|}
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Image:CalDSX_CreateMocapModelButton2.png]]
|-
|
:The <i>Create Mocap Model</i> 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.
|}
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
<h4><span class="mw-customtoggle-View"><span class="mw-customtoggletext" style="color:rgb(6,69,173);">View Menu</span></span></h4>
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Help Menu
<div id="mw-customcollapsible-View" class="toccolours mw-collapsible mw-collapsed" style="margin-left:1em; width:80%;">
|-
|
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Image:CalDSX_HelpButton2.png]]
|-
|
:The ''Help'' command opens the CalibrateDSX wiki page in the default browser. The F1 shortcut can also be used.
|}
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Image: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==
[[File:CalDSX_ViewMenu.png|right]]


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
;DSX Configuration (Ctrl + Shift + D)
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DSX Configuration
: toggles the appearance of the dockable <i>DSX Configuration</i> widget.
|-
|
[[Image:CalDSX_DSXConfigurationWidget.png]]


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
;Calibration Object (Ctrl+ Shift + C)
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Subject
: toggles the appearance of the dockable <i>Calibration Object</i> widget.
|-
|
:The <i>Subject</i> field is automatically populated with the ID of the subject when you load a subject file.
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
;3D Calibration (Ctrl+ Shift + 3)
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Session
: toggles the appearance of the dockable <i>3D Calibration</i> widget.
|-
|
:The <i>Session</i> drop down menu is automatically populated with all of the sessions available available for the current subject.  
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
;Image Correction (Ctrl+ Shift + I)
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Configuration
: toggles the appearance of the dockable <i>Image Correction</i> widget.
|-
|
:The <i>Configuration</i> drop down menu is automatically populated with all of the configurations available for the current session.  
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
;Image Preview (Ctrl+ Shift + P)
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Trial
: toggles the appearance of the dockable <i>Image Preview</i> widget.
|-
|
:The <i>Trial</i> drop down menu is automatically populated with all of the trials available for the current configuration.  
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
</div>
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Object
|-
|
:The <i>Object</i> 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.
|}


|}
<h4><span class="mw-customtoggle-Tools"><span class="mw-customtoggletext" style="color:rgb(6,69,173);">Tools Menu</span></span></h4>
<div id="mw-customcollapsible-Tools" class="toccolours mw-collapsible mw-collapsed" style="margin-left:1em; width:80%;">


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
[[File:CalDSX_ToolsMenu.png|right]]
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calibration
|-
|
The <i>Calibration</i> 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 <i>DSX Configuration</i> widget, if it contains a calibration object that object will automatically be selected as well. The table in the <i>Calibration</i> widget will be filled with the object's POIs.


[[Image:CalDSX_CalibrationWidget.png]]
;Propagate POIs (Ctrl + P)
: propagates all of the digitized POIs in the current object to all of the frames selected in the <i>Tracking</i> slider.


When you right-click on a POI in the table, the following menu is displayed with commands for editing the POIs:
;Predict POI Locations
: 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.


[[Image:CalDSX_CalibrationWidgetDropdown.png]]
;Compute 3D Configuration
: 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.


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
;Correct All Trials in Configuration (Ctrl + C)
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add POI Before
: corrects the X-ray image files in all of the trials of the current configuration.
|-
|
:This command adds a POI to the list before the POI that you clicked on.
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
;Re-correct Current Trial
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add POI After
: corrects the current trial (whether it's already corrected or not) using the settings in the '''Image Correction''' widget.
|-
|
:This command adds a POI to the list after the POI that you clicked on.
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
;Show Perfect Calibration Beads
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Rename POI
: toggles the display of projections of the calibration beads onto the X-ray images of the calibration trial. Once the 3D configuration has been computed, rays can be projected from the X-ray sources through each bead until they intersect the images. These intersections, shown as small Xs, represent a "perfect" calibration of the system. That is, if all of the digitized calibration beads (POIs) are coincident with these bead projections, the residuals of the 3D configuration computation will be zero.
|-
|
: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.


[[Image:CalDSX_POIRenamePopup.png]]
</div>
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
<h4><span class="mw-customtoggle-Mocap"><span class="mw-customtoggletext" style="color:rgb(6,69,173);">Mocap Menu</span></span></h4>
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Delete POI
<div id="mw-customcollapsible-Mocap" class="toccolours mw-collapsible mw-collapsed" style="margin-left:1em; width:80%;">
|-
|
:This command deletes the POI that you clicked on.
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
[[File:CalDSX_MocapMenu.png|right]]
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Clear POI Location
|-
|
:This command removes the selected POI's location from both views of the current reporting time.
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
;Compute DSX/Mocap Transform
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Clear POI Location in All Frames
: computes the transformation matrix between the X-ray frame defined by the calibration object and the motion capture frame.
|-
|
:This command removes the selected POI's location from both views for all reporting times.
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
;Create Mocap Model (Ctrl + M)
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Disable
: 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.
|-
|
: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 <i>Enable</i> so that you can re-enable it at a later time.
|}
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
</div>
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calibration Parameters
|-
|
[[Image:CalDSX_ParametersWidget2.png]]


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
<h4><span class="mw-customtoggle-Options"><span class="mw-customtoggletext" style="color:rgb(6,69,173);">Options Menu</span></span></h4>
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;X-ray Image Correction
<div id="mw-customcollapsible-Options" class="toccolours mw-collapsible mw-collapsed" style="margin-left:1em; width:80%;">
|-
|


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
[[File:CalDSX_OptionsMenu.png|right|100px]]
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Image Size
|-
|
:The desired size of the corrected X-ray images, in pixels. When the X-ray images for a trial (raw or corrected) are loaded, the Image Size will always be set to the actual size of the images being displayed.
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
;Settings...
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Image Padding
: opens a dialog containing application-wide settings and parameters.
|-
|
<i>Image Padding</i> is the number of pixels to add onto all four sides of an X-ray image during distortion correction. The default value is 0.
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
</div>
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Image Threshold
|-
|
:<i>Image Threshold</i> is an absolute intensity threshold when uniformity-correcting X-ray images. A pixel in the corrected image is set to zero if its value in the uncorrected image has an intensity below this value. The default is 1.0.
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
<h4><span class="mw-customtoggle-Help"><span class="mw-customtoggletext" style="color:rgb(6,69,173);">Help Menu</span></span></h4>
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gauss Kernel Size
<div id="mw-customcollapsible-Help" class="toccolours mw-collapsible mw-collapsed" style="margin-left:1em; width:80%;">
|-
|
:<i>Gauss Kernel Size</i> is the size of the Gaussian smoothing kernel used to reduce noise in the X-ray images during correction. The default value of ''no smoothing'' turns off smoothing.
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
[[File:CalDSX_HelpMenu.png|right]]
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gauss Sigma
|-
|
:<i>Gauss Sigma</i> 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.
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
;Help (F1)
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Smoothing Threshold
: opens the CalibrateDSX wiki page in the default browser.
|-
|
:When smoothing a pixel, pixels in the kernel that are not within this threshold of the value of the pixel being smoothed are ignored. This can be useful when trying to preserve the sharpness of edges when smoothing. This threshold is a percentage (0.0 to 1.0) of the maximum intensity in the emtire image. A negative value indicates that no thresholding will occur. The default value is -1.0.
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
;About
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;White Threshold
: displays a dialog with information about CalibrateDSX, including the installed version number. It also contains the ''Deactivate'' button, for deactivating your DSX suite license.
|-
|
:<i>White Threshold</i> 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. The default is 0.3.
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
</div>
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Grid Bead Threshold View 1
|-
|
:<i>Grid Bead Threshold View 1</i> is the relative intensity threshold 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.
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
==Widgets==
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Grid Bead Threshold View 2
|-
|
:<i>Grid Bead Threshold View 2</i> is the relative intensity threshold 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.
|}


{| class="mw-collapsible mw-collapsed wikitable" width="80%"
<!-- Note: '====' gives '[edit] link; '<h4> doesn't -->
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Grid Centroid Min Size
<h4><span id="CalDSXWidgets01"></span>[[CalibrateDSX: DSX Configuration|DSX Configuration]]</h4>
|-
<h4><span id="CalDSXWidgets02"></span>[[CalibrateDSX: Calibration Object|Calibration Object]]</h4>
|
<h4><span id="CalDSXWidgets03"></span>[[CalibrateDSX: 3D Calibration|3D Calibration ]]</h4>
:<i>Grid Centroid Min Size</i> is the smallest allowable size, in pixels, of the centroids representing the beads/holes in the grid images. Centroids smaller than this size are ignored for the purposes of distortion correction. The default value is 9.
<h4><span id="CalDSXWidgets04"></span>[[CalibrateDSX: Image Correction|Image Correction]]</h4>
|}
<h4><span id="CalDSXWidgets05"></span>[[CalibrateDSX: Image Preview|Image Preview]]</h4>
 
<h4><span id="CalDSXWidgets06"></span>[[CalibrateDSX: 2D X-ray Windows|2D X-ray Windows]]</h4>
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
<h4><span id="CalDSXWidgets07"></span>[[CalibrateDSX: Settings Dialog|Settings Dialog]]</h4>
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Grid Min Num Centroids
|-
|
:<i>Grid Min Num Centroids</i> is the minimum number of bead/hole centroids allowable in each grid image. If fewer than this number are found, the image is not used for distortion correction.
|}
 
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Positive Frame Times
|-
|
:<i>Positive Frame Times</i> is a boolean indicating whether or not to shift all frame times so that none of them is negative. If true, the frame times for both views will be shifted by the same amount so that the smallest frame time is 0.0. If reporting times are already defined when the X-ray view data is corrected, they will be shifted as well. Lastly, the ''Time Offset'' value in the mocap parameters will be shifted by the same amount.
|}
 
|}
 
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;POI Digitization
|-
|
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;POI Scale
|-
|
:<i>POI Scale</i> 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.
|}
 
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Click Search Factor
|-
|
:<i>Click Search Factor</i> 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 click search factor (default = 1.25).
|}
 
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Propagation Search Factor
|-
|
:<i>Propagation Search Factor</i> is used when propagating POIs. In order to propagate a POI (at coordinates X, 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.
|}
 
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Centroid Threshold
|-
|
:<i>Centroid Threshold</i> 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.
|}
 
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Edge Threshold
|-
|
:<i>Edge Threshold</i> 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 <i>Edge Threshold</i> percentage (0.0 to 1.0) of the maximum edge value. The default value is 0.10.
|}
 
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Pose Map Cutoff Frequency
|-
|
:<i>Pose Map Cutoff Frequency</i> is the low-pass cutoff frequency for smoothing the cubic splines in the POI pose maps. The default value is 20.0. If the value is set to 0.0 smoothing is turned off.
|}
 
|}
 
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3D Calibration
|-
|
 
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Image Distance Allowance
|-
|
:<i>Image Distance Allowance</i> 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.
|}
 
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Optimize Pixel Size
|-
|
:<i>Optimal Pixel Size</i> specifies whether or not to optimize the pixel size when calculating the 3D configuration parameters. The default value is false.
|}
 
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Square Pixels
|-
|
:<i>Square Pixels</i> specifies 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.
|}
 
|}
 
|}
 
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Image Processing
|-
|
 
[[Image:CalDSX_ImageProcessingWidget.png]]
 
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Show Processed Xrays
|-
|
:The <i>Show Processed Xrays</i> check box controls whether the original Xrays or the thresholded Xrays are displayed in the 2D Xray windows.
|}
 
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Xray Threshold
|-
|
:Pixels in the Xray images whose intensities are below <i>Xray Threshold</i> 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 <i>Grid Bead Threshold View 1</i> and <i>Grid Bead Threshold View 2</i>.
|}
|}
 
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.
 
[[Image:CalDSX_2DViewWithPOI.png|600px]]
 
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.
|}
 
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.
|}
 
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.
|}
 
{| class="mw-collapsible mw-collapsed wikitable" width="80%"
! style="text-align:left;" | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;POI Selection
|-
|
:When a POI is selected in the <i>Calibration</i> 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 <i>POI Scale</i> and <i>Click Search Factor</i>.
:After you digitize the POI location in both views, the <i>Calibration</i> 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.
|}
|}

Latest revision as of 17:11, 4 February 2021

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. 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). Information on collecting white and grid images can be found here. 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. add an optional border to the image, based on the value of the Image Padding parameter
  4. resize the image to the size specified by the Image Size parameter
  5. save the resulting image in the TIFF format

Stacks of grid images are processed via these steps:

  1. remove outlier images (based on the mean intensity)
  2. add an optional border to the images, based on the value of the Image Padding parameter
  3. resize the images to the size specified by the Image Size parameter
  4. uniformity-correct the remaining images: output image = white image - grid image
  5. save the resulting image stack in the TIFF format
  6. calculate a displacement map for the first image
  7. 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. optionally smooth the remaining images with a Gaussian filter
  3. add an optional border to the images, based on the value of the Image Padding parameter
  4. resize the images to the size specified by the Image Size parameter
  5. uniformity-correct the remaining images: output image = white image - input image
  6. distortion-correct the remaining images: use the average displacement map to move each pixel to its proper location
  7. saving the resulting image stack in the TIFF format

Note: uniformity correction and distortion correction are both optional. If no white images are specified in the calibration data, uniformity correction will be skipped and the images to be corrected will simply be inverted. Similarly, if no grid images are specified, distortion correction will be skipped.

     2. 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
     3. 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 thus the transform between the lab and mocap frames can be computed.

Tutorials

How To: Correct X-ray Images and Perform 3D Calibration

How To: Collect Calibration Images

How To: Digitize Points of Interest

The Importance of Image Smoothing and Downsampling

[Video Tutorial on Calibration]

Menus

File Menu

Open Subject... (Ctrl + O)
loads a subject file.
Save Subject (Ctrl+ S)
saves the currently loaded subject to its existing subject file.
Save Subject As...
saves the currently loaded subject to a new subject file.
Save 2D POI Locations...
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.
Exit
exits the program. The program can also be closed by using the X in the top right corner of the program window.

View Menu

DSX Configuration (Ctrl + Shift + D)
toggles the appearance of the dockable DSX Configuration widget.
Calibration Object (Ctrl+ Shift + C)
toggles the appearance of the dockable Calibration Object widget.
3D Calibration (Ctrl+ Shift + 3)
toggles the appearance of the dockable 3D Calibration widget.
Image Correction (Ctrl+ Shift + I)
toggles the appearance of the dockable Image Correction widget.
Image Preview (Ctrl+ Shift + P)
toggles the appearance of the dockable Image Preview widget.

Tools Menu

Propagate POIs (Ctrl + P)
propagates all of the digitized POIs in the current object to all of the frames selected in the Tracking slider.
Predict POI Locations
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.
Compute 3D Configuration
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.
Correct All Trials in Configuration (Ctrl + C)
corrects the X-ray image files in all of the trials of the current configuration.
Re-correct Current Trial
corrects the current trial (whether it's already corrected or not) using the settings in the Image Correction widget.
Show Perfect Calibration Beads
toggles the display of projections of the calibration beads onto the X-ray images of the calibration trial. Once the 3D configuration has been computed, rays can be projected from the X-ray sources through each bead until they intersect the images. These intersections, shown as small Xs, represent a "perfect" calibration of the system. That is, if all of the digitized calibration beads (POIs) are coincident with these bead projections, the residuals of the 3D configuration computation will be zero.

Mocap Menu

Compute DSX/Mocap Transform
computes the transformation matrix between the X-ray frame defined by the calibration object and the motion capture frame.
Create Mocap Model (Ctrl + M)
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.

Options Menu

Settings...
opens a dialog containing application-wide settings and parameters.

Help Menu

Help (F1)
opens the CalibrateDSX wiki page in the default browser.
About
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

Calibration Object

3D Calibration

Image Correction

Image Preview

2D X-ray Windows

Settings Dialog

Retrieved from ""