Image Registration

The Image Registration Window

This window provides facilities that can be used both with and without position sensor information.

The remainder of this page describes use with position information. Use without position information is covered in the documentation on sensorless freehand 3D ultrasound.

You should first calibrate the system and acquire data in the usual way, as described in `Making the Recording'. Once the data set has been recorded (or a previously recorded data set has been loaded), you need to tell the registration algorithm which parts of the B-scans are valid data, and which parts are uninteresting background. This is done using the grey level sliders in the `Segmentation Thresholds and Gating' window to segment the data into valid parts (magenta) and invalid parts (not magenta). For instance, if the B-scan was recorded using a convex array probe,

Initial un-segmented review window

the sliders should be set to include the B-scan data, but not the outer edges of the window:

Segmented review window

Note that, for convex probes, a more accurate image registration will result if you have estimated the probe shape first.

The sliders can also be used to exclude bright text from the registration process: red or blue Doppler regions are always excluded. The setting of the thresholds is not critical: in general, it is better to include as much data as possible. If very little data is available for registration, Stradx will issue a message warning that the registration is bad, and discard the registration for that B-scan.

It is now necessary to decide which registration calculations will be performed. The more calculations you choose, the more options you will be able to evaluate once the calculation is complete, but the longer it will take. The system always performs a rigid registration of the B-scans parallel to the scan plane: an additional non-rigid registration, to compensate for variations in probe pressure, can be performed by selecting the `Do non-rigid registration' option. If information about the B-scan decompression parameter is available, then elevational registration can be performed to improve the spacing of the B-scans. This is selected by clicking the `Do elevational registration' option.

There is a slider (top right of the window) that sets the number of B-scans to jump between each reference frame. If this is set to 1, then each B-scan will be registered to the previous one. If it is set to two, then B-scans 1 and 2 will be registered to B-scan 0, B-scans 3 and 4 to B-scan 2, and so on. This facility can be used to eliminate errors caused by any persistence between the B-scan images recorded from the ultrasound machine.

Once the sliders have been set, and the appropriate types of registration chosen, the registration calculation is started by pressing the `Calculate' button.

The calculation may take some time, depending on the processor speed, the number of frames, the size of each B-scan and whether non-rigid registration is included. Typically, one or two frames are processed per second. While this is happening, all the other windows in Stradx can be used as normal. However, if a parameter is changed which affects the registration, for instance if the calibration parameters are changed, or if the `Image registration' window is closed, the process will be abandoned. You can stop the registration without losing the information which has already been calculated by pressing `Halt'. Bear in mind that this will result in a data set which is only partially corrected.

As the registration proceeds, two graphs are plotted. The lower graph, `Rigid displacement', shows the amount which each B-scan has been moved relative to the original position sensor reading, plotted for each frame in the sequence. The upper graph, `Non-rigid depth', shows the shift in the depth of the current B-scan, plotted against depth. This gives an indication of changes in probe pressure relative to the first B-scan in the sequence. Once the registration has finished, all these values are adjusted to ensure that the corrected 3D ultrasound data is faithful to the position sensor readings at a large scale, while preserving the new registration at a small scale. This adjustment causes the graphs to be redrawn at the end.

Image registration window with calculation

After the registration has been calculated, it is stored separately from the recorded data. You can examine the effects of the image registration using the three buttons at the top right of the `Image Registration' window. The first toggles the use of rigid registration, the second non-rigid registration, and the third includes rigid motion in the elevational direction. You cannot use non-rigid or elevational registration without rigid registration, neither can you use non-rigid or elevational registration if it has not been calculated. These buttons affect the `Review', `Outline', `Reslice', `Repanorama' and `Manifold' windows. If any of these windows are open when the buttons are clicked, they are redrawn with the appropriate registrations applied. For the `Reslice', `Repanorama' and `Manifold' windows, redrawing the display may take a few seconds with non-rigid registration, since all of the original data must be warped before it is displayed.

As an example, here is an image from a scan of the carotid artery. The `Review' window on the left shows the original data, while the window on the right shows the result of applying the non-rigid registration from the `Image Registration' window above. Note that the data has been warped in the depth (vertical) direction only: this is one of the approximations made in compensating for the effects of probe pressure.

Review window with no correction Review window with correction

Here is a reslice through a high resolution 3D data set of part of the forearm, deliberately acquired with varying probe pressure:

Reslice window with no correction

And here is the corrected version, after rigid and non-rigid registration:

Reslice window with correction

The process can also be used to correct data which has been acquired for panoramic visualisation. Here is a panorama of both lobes of the thyroid:

Repanorama window with no correction

and here is the same panorama after correction:

Repanorama window with correction

Using the elevational registration information to estimate the beam width profile.

If elevational registration has been performed, it is possible to estimate the width of the ultrasound beam at the top, middle, and bottom of the image based on the information from the position sensor. This can be done by pressing the button to indicate that the the system should `Recalculate beam width for elevational registration From the data'. If this button is pressed, the beam widths will be updated in the calibration controls window. Note that this process overwrites the previous beam width information which is lost if it has not previously been saved.

If you have reason to believe the beam widths are correct before you perform the registration, then you should not update them in this way. If however the beam widths are unknown in advance, then using this button provides two useful results: it improves the elevational registration of the current data, and provides useful estimates of the beam width profile which can be used should you wish to do sensorless scanning with the same probe.

Saving the registration information.

Once calculated, the registration results can either be used to update Stradx's internal representation of the 3D ultrasound data (the `Update' button), or saved as a separate `.sxr' file (the `Save' button - see the `Stradx Files' section for the .sxr file format). The advantage of the former approach is that subsequent visualisation of the data can be achieved at full speed. The latter approach preserves the original data but forces the visualisation algorithms to apply the registration `on the fly'. In both cases, the `Use registration' buttons determine whether rigid or non-rigid registrations are saved.

After you've saved a registration file, you'll notice the data file name in the main window highlighted in yellow, indicating that you may now wish to save the data file. This is because you've now associated this data file with a particular registration file. If you do save the data file, then next time you load the data file the corresponding registration file will be loaded automatically.

When you click the `Update' button, you are given an opportunity to select a new file name, so that the original data will not be overwritten: the new file becomes the current data set. After update, the registration values are cleared: they have been irreversibly applied to B-scans and their positions. Note that the `Update' button only affects Stradx's internal data representation: for a permanent record of the corrected data set, you must save the data in the usual way via the `Save' option from the file menu. Stradx will warn you that the data set has not been saved if you attempt to quit before doing this.

The `Save' button allows you to save the registration to a separate .sxr file. This file can be re-loaded at a later date using the `Load' button, provided that the data on which it was based has been re-loaded first. It is not possible to use .sxr files with data that has a different number of B-scans or a different image height. Once an .sxr file has been re-loaded, the graphs of displacement and depth are drawn exactly as if the registration had just been calculated.

Use the `Clear' button to clear the current registration values. Note that it is only possible to recalculate the registration if the current values have either been cleared, updated or saved to a file.