Registration: Manual 2D Series

From MIPAV
Revision as of 19:51, 11 July 2012 by Olga Vovk (Talk | contribs)

(diff) <previousrevision> | Latest revision (diff) | <nextrevision> (diff)
Jump to: navigation, search

The Manual 2D Series algorithm allows you to manually or semimanually register two 2D grayscale or color images by placing corresponding points on both images and then applying either the Landmark-Thin Plate Spline or Landmark-Least Squares algorithm. After applying one of these algorithms, you can then, if needed, use the other algorithm. In addition, at any time, you can manually adjust the alignment of each image.

The algorithm also lets you manually register different slices of a 2.5 image dataset in the same way as the 2D images.

Background

Registration: Manual 2D Series window

Through the Registration: Manual 2D Series window (Figure 1), this algorithm provides the tools for manually registering images and the ability to use two of the landmark registration algorithms. The Registration: Manual 2D Series window includes two tabs: Blended and Dual.

Blended tab

On the Blended page, the window superimposes the image to be registered on top of the reference image. This page includes icons for aligning, rotating, alphablending, and magnifying or minifying the images as well as icons for modifying the lookup table for each image and for applying a checkerboard pattern to assist in alignment.

Dual tab

Clicking the Dual tab opens the Dual page, which displays the images side by side. A number of icons appear in the toolbar. The red icons are color coded to the reference image, which appears on the left and is surrounded by a red border. The green icons apply to the image to be registered, which is shown on the right side of the page and is surrounded by a green border.

The Dual page displays the images side by side

Delineating corresponding points

Before being able to use either the Thin Plate Spline or Least Squares algorithm, you must first delineate a minimum of three corresponding points on both images. These points serve as guides, or landmarks, for aligning the images. In order for the points to be corresponding, you should delineate each point in the same sequence; i.e., the first point that you delineate on the reference image should be the first point delineated on the image to be registered, the second point on the reference image should be the second point delineated on the image to be registered, and so on.

To delete a point, you must first select the point and then use the appropriate Delete icon to delete it. However, before you can select the point, you need to return the cursor to its default mode using the IconReturntoDefaultMode.jpg icon.

On both the Blended and Dual pages, you can modify the lookup table (LUT) by clicking IconLookupTable.jpg , the LUT icon. When you select IconLookupTable.jpg , the Lookup Table window appears. This window includes two tabbed pages: one for Image A, the reference image, and one for Image B, the image to be registered.

A common icon-IconReset.jpg , the Reset icon-appears on both the Blended and Dual pages. Use this icon if you want to restore the original version of the images. This icon deletes all points on the reference image and on the image to be registered.

Note: If the Apply button has already been selected, the Reset icon undoes all changes that occurred since the last time the Apply button was selected.

Image types

You can apply this algorithm to 2D grayscale and color images.

The dimensions or image type of the image to be registered need not be the same as the dimensions or image type of the reference image. The registered image has the same image type as the image to be registered and the same extents as the reference image.

Special notes regarding the number of references points

The following notes apply:

  • For 2D images, three or more points are required. The algorithm may fail if nearly all of the points fall on the same line.
  • For 3D images, four or more points are required and the algorithm may fail if the points nearly all fall on the same plane.
div id="ApplyingOn2D">

Applying the Manual 2D Series algorithm on 2D images

The Load dialog box

1 Open two images: the reference image and the image that you want to register. 2 Select the reference image. 3 Select Algorithms > Registration > Manual 2D Series. The Load dialog box appears. 4 Select the image that you want to register to the reference image. If only two images are open, the Set as Image B box automatically selects the other open image-the one you did not select-as Image B, or the image to be registered. 5 To select a different image, click Browse to find and open another image file. 6 Click OK. The Manual 2D Series window opens.

Note: Opening this window automatically corrects image resolution and scaling. The algorithm window includes two tabs: Blended, which displays the Blended page Dual, which displays the Dual page The Blended page shows both images: the image to be registered superimposed on top of the reference image. Note that the icons near the top of the page allow you to move the image to be registered in all directions or specifically up, down, left, and right a certain number of pixels. You can also rotate the image to be registered clockwise or counterclockwise. 7 Click Dual to go to the Dual page.

The Dual page shows both the reference image and the image to be registered side by side in the image area at the bottom of the page. Note that the border around the reference image, the image on the left side of the page, appears in red. The border around the image to be registered, which is on the right side of the page, appears in green. Several of the icons near the top of the page are color coded to the images. That is, the red icons apply to the reference image, and the green icons apply to the image to be registered.


8 Place at a minimum three landmarks, or points, on each of the images. On the reference image, click IconReferenceSliceMarkers.jpg , the Reference Slice Markers icon, and click the mouse on the reference image where the landmark should be located. The landmark appears on the image in red type and is sequentially numbered. Create at least two more landmarks on the image.

On the image to be registered, click IconAdjustedSliceMarkers.jpg , the Adjusted Slice Markers icon, and creates a landmark on the image by clicking the mouse. The landmark, which is sequentially numbered, appears in green type. Create a minimum of three landmarks on the image.

To delete a point on the reference image, you need to return the cursor to its default mode by clicking on IconReturntoDefaultMode.jpg . You can then select the point by clicking on it with the mouse and then delete it by clicking IconDeleteSelectedReferenceSliceMarkers.jpg , the Delete selected reference slice markers icon.

To delete a point on the image to be registered, or adjusted image, click IconReturntoDefaultMode.jpg , select the point, and then delete it by clicking IconDeleteSelectedAdjustedSliceMarkers.jpg , the Delete adjusted slice markers icon.


9 Select, if desired, either IconLeastSquaresAlignment.jpg , the Least Squares algorithm icon, or IconThinPlateSplineAlignment.jpg , the Thin Plate Spline algorithm, to register the images. The program registers the images and the landmarks appear in yellow type followed by the specific positions in parentheses.

10 At this point, you should determine the following: Whether there is a need to make manual adjustments to the registration. If so, return to the Blended page and use the direction or the rotation icons. Use IconWindowRegionofImageB.jpg to verify alignment (refer to [RegistrationManual2DSeries.html] and to the following tables for more information.

Whether to run the other algorithm. If so, simply click either IconLeastSquaresAlignment.jpg , the Least Squares algorithm, or IconThinPlateSplineAlignment.jpg Thin Plate Spline algorithm, as appropriate.


Whether to restore the image to its original form by clicking IconResetImagetoOriginalState.jpg.

Whether to select Apply to keep changes made by the algorithm.

Making manual adjustments to the image to be registered

After you apply either IconLeastSquaresAlignment.jpg , the Least Squares algorithm icon, or IconThinPlateSplineAlignment.jpg , the Thin Plate Spline algorithm on the images, you may want to manually ascertain whether key portions of the reference image and the image to be registered, or adjusted image, are in alignment. One way of checking alignment, or registration, is using IconWindowRegionofImageB.jpg , the Window region of image B icon. A recommended method for checking registration and for correcting it follows.

Checking registration

To check registration, do the following:

1 Click Blended in the Manual 2D Series window to display the Blended page. Both the reference image and the image to be registered, or adjusted image, appear at the bottom of the window. The adjusted image is superimposed over the reference image. 2 Note that the arrow on the Alphablending slider appears in the middle of the slider at 0.5R/A, which means that 50 percent of each image are shown on the page. 3 Slide the arrow on the Alphablending slider all the way to the right until it reaches the label "Adj. A." This label indicates that 100 percent of the adjusted image is displayed on the page and, therefore, the reference image does not appear.

Note: The label "0.75A" means that 75 percent of the adjusted image appears and only 25 percent of the reference image is displayed.

4 Click IconLookupTable.jpg , the Lookup Table icon, to display the Lookup Table window. Note that the window includes two tabs: one for Image A, the reference image, and one for Image B, the image to be registered.

5 Drag the image intensity line for the red channel up in the middle to adjust the color of the adjusted image. In this case, it creates a lighter colored red. The adjusted image now appears in pale red.

Note: Actually, you can change the color of the image to any color. The purpose in doing this task is to easily distinguish the adjusted image from the reference image. 6 Move the slider arrow all the way to the left on the slider. The label "Ref. R" indicates that the page now displays 100 percent of the reference and does not display the adjusted image. 7 Click IconWindowRegionofImageB.jpg and position the cursor over the reference image. Notice that a square box appears on the image. The box is filled with a red image, which is the adjusted image. You can use this box to look at the alignment of details in the images.

Tip: You may want to maximize the window and enlarge the images so that you can view details of the images while checking alignment. To maximize the window, simply click File:ButtonRestore.jpg , the Restore button. To maximize the image, click the Magnify image 2.0x icon, which magnifies the image to twice its current size, as many times as needed.

8 Determine whether you want to correct the alignment of the images. If you do, there are several ways to move the adjusted image:

  • Moving the image using IconTranslateImage.jpg,the Translate image icon;
  • Moving the image using the direction arrows;
  • Setting the number of pixels to move the image with the Set pixel increment icon;
  • Rotating the image.

Moving the adjusted image in any direction

The Translate image icon, or IconTranslateImage.jpg , allows you to move the adjusted image in any direction. This icon only appears on the Blended page, which is where all manual adjustments to image registration occurs.

To move the adjusted image, click IconTranslateImage.jpg , and, holding down the left mouse button, drag the icon in the direction in which to move the image, and then release the mouse button. After a few moments, the image appears in the new position. Note that, depending on where you moved the adjusted image, its outer portions may disappear beyond the outer edges of the reference image (see Figure 3).). In this case, you can use IconTranslateImage.jpg to move the adjusted image again.


Moving the adjusted image with the direction arrows

The icons that display direction arrows (IconMoveImageUp.jpg , the Move image up icon; IconMoveImageDown.jpg , the Move image down icon; IconMoveImageRight.jpg , the Move image right icon; and IconMoveImageLeft.jpg , the Move image left icon) let you move the adjusted image in one direction only by a specified number of pixels. The default number of pixels is 1; however, the number of pixels may be from 0.01 to 2048.0. Therefore, the direction arrows provide the greatest specificity in moving the image, which is perfect for fine adjustments.

To change the number of pixels, click IconSetPixelIncrement.jpg , the Set pixel increment icon; enter a number in the Pixel Increment box; and click Apply.

Rotating the adjusted image

If the rotation of the adjusted image is incorrect, you can change the rotation of the image with the rotation icons: IconRotateImage.jpg , the Rotate image icon; IconRotateClockwise.jpg , the Rotate clockwise icon; and IconRotateCounterClockwise.jpg , the Rotate counterclockwise icon.

To select the center of rotation for the image, click IconRotateImage.jpg and set the center by clicking with the mouse on the image. The letter C appears with a yellow crosshair cursor (see Figure 4]). You can then drag a line from the center of rotation to move the image above or below the center of rotation. To rotate the image clockwise, click IconRotateClockwise.jpg ; and to rotate the image counterclockwise, click IconRotateCounterClockwise.jpg .


As with the direction arrow icons, you change the degree increment to achieve exact registration. The default degree increment is 1.0, but you can specify from 0.01 to 360 degrees. To change the degree increment, click IconSetPixelIncrement.jpg , the Set degree increment icon. The Change Degree Increment dialog box appears. Enter the degree increment in the Degree Increment box, and click Apply.

Registration: Manual 2D Series: Blended tab

Manual 2D Series window showing the Blended page

Show VOIs in blended window
Displays, on the Blended page, the VOIs that you delineated on the Dual page.
Blended tab
Displays the Blended page, which shows the image to be registered superimposed on the reference image. This page allows you to move and align the image to be registered with the reference image.
Dual tab
Displays the Dual page, which shows each image side by side, and allows you to delineate three or more landmarks on each image before you apply the Landmark-Least Squares algorithm or the Landmark-Thin Plate Spline algorithm to the images.
Alphablending slider
Adjusts the translucency of the alpha channels in each image using the alphablending technique. When two images share a window, you can adjust the alphablending settings so that you can see a blend of both images and can compare overlapping regions in two datasets.
IconLookupTable.jpg Lookup table
Displays the Lookup Table window, which includes two tabs: Image A, the reference image, and Image B, the image to be registered.
IconCheckerboard.jpg Checkerboard A & B
Displays a checkerboard pattern on the images. You can use this pattern for assistance in aligning the images.
RegistrationManual2DSeries39.gif Magnify image 2.0x
Doubles the size of images, magnifying them to twice their current size. If an image is too large for the current window size, scroll bars appear, and you may need to manually adjust the size of the window.
To restore an image to its original size, use IconMinifyImage.jpg , the Magnify image 0.5x icon, as many times as you used this icon.
IconMinifyImage.jpg Magnify image 0.5x
Reduces the magnification level of images in half. To restore images to their original size, use the Magnify image 2.0x icon, as many times as you used this icon.
IconWindowRegionofImageB.jpg Window region of image B
Hides the reference image below a windowed mouse cursor; slide alphablending slider to the reference image
IconResetImagetoOriginalState.jpg Reset image to original state
Restores image to its original state. This icon deletes all points on the reference image and on the image to be registered. If the Apply button has already been selected, the Reset icon undoes all changes that occurred since the last time the Apply button was selected.
BtnApply.jpg Apply
Commits the changes that you made to the images, but it leaves the window open for you to make further changes if desired.
IconSetPixelIncrement.jpg Set pixel increment
Determines the number of pixels to use when any of the move image icons are used. When you click this icon, the Change Pixel Increment dialog box opens.
DialogboxChangePixelIncrement.jpg Although the default is 1.0, when the pixel increment is changed to another number, that number displays on the toolbar rather than 1.0. For example, if you changed the pixel increment to 550.0, this number would appear in the icon on the toolbar. You can use any pixel increment from 0.01 to 2048.00.
IconTranslateImage.jpg Translate image
Moves Image B, the image to be registered, in any direction you drag the image by the number of pixels indicated in the Set Pixel Increment icon.
IconMoveImageUp.jpg Move image up
Moves Image B, the image to be registered, up by the number of pixels indicated in the Set Pixel Increment icon.
IconMoveImageDown.jpg Move image down
Moves Image B, the image to be registered, down by the number of pixels indicated in the Set Pixel Increment icon.
IconMoveImageRight.jpg Move image right
Moves Image B, the image to be registered, right by the number of pixels indicated in the Set Pixel Increment icon.
IconMoveImageLeft.jpg Move image left
Moves Image B, the image to be registered, left by the number of pixels indicated in the Set Pixel Increment icon.
DialogboxChangeDegreeIncrement.jpg Set degree increment
Determines the degree to use when rotating images, rotating images clockwise, or rotating images counterclockwise. When you click this icon, the Change Degree Increment dialog box opens. Although the default degree increment is 1.0, when the degree increment is changed to another degree, that degree increment displays on the toolbar rather than 1.0. For example, if you changed the degree increment to 180.0, IconDegree180.jpg would appear on the toolbar. You can set the degree increment from 0.01 to 360.0.
IconRotateImage.jpg Rotate image
Allows you to select a center of rotation by clicking on the image with the mouse. It then allows you to then move the image above or below the center of rotation by dragging a line from the center of rotation.
IconRotateClockwise.jpg Rotate clockwise
Rotates the image to be registered clockwise by the number of degrees indicated as the degree increment. To restore the image to its original rotation, click IconReset.jpg , the Reset image to original state icon.
IconRotateCounterClockwise.jpg Rotate counterclockwise
Rotates the image to be registered counterclockwise by the number of degrees incited as the degree increment. To restore the image to its original rotation, click IconReset.jpg , the Reset image to original state icon.
Image area
Superimposes the image to be registered on the reference image and allows for the image to be registered to be moved, magnified, or rotated.

Manual 2D Series: Dual tab

Figure 6. Manual 2D Series window showing the Dual page

Show VOIs in blended window
Displays, on the Blended page, the VOIs that you delineated on the Dual page.
Blended tab
Displays the Blended page, which shows the image to be registered superimposed on the reference image. This page allows you to move and align the image to be registered with the reference image.
Dual tab
Displays the Dual page, which shows each image side by side, and allows you to delineate three or more landmarks on each image before you apply the Landmark-Least Squares algorithm or the Landmark-Thin Plate Spline algorithm to the images.
IconLookupTable.jpg Lookup Table
Displays the Lookup Table window, which includes two tabs: Image A, the reference image, and Image B, the image to be registered.
IconMagnifyReferenceImageto2.0x.jpg Magnify reference image 2.0x
Doubles the size of reference images, magnifying them to twice their current size. If an image is too large for the current window size, scroll bars appear, and you may need to manually adjust the size of the window.
To restore reference images to their original size, use IconMagnifyReferenceImageto0.5x.jpg , the Magnify reference image 0.5x icon, as many times as you used this icon.
IconMagnifyReferenceImageto0.5x.jpg Magnify reference image 0.5x
Reduces the magnification level of reference images in half. To restore reference images to their original size, use IconMagnifyReferenceImageto2.0x.jpg , the Magnify reference image 2.0x icon, as many times as you used this icon.
IconMagnifyAdjustedImage 2.0x.jpg Magnify adjusted image 2.0x
Doubles the size of adjusted images, magnifying them to twice their current size. If an image is too large for the current window size, scroll bars appear, and you may need to manually adjust the size of the window.
To restore adjusted images to their original size, use IconMagnifyAdjustedImage 0.5x.jpg , the Magnify reference image 0.5x icon, as many times as you used this icon.
IconMagnifyAdjustedImage 0.5x.jpg Magnify adjusted image 0.5x
Reduces the magnification level of adjusted images in half. To restore adjusted images to their original size, use IconMagnifyAdjustedImage 2.0x.jpg , the Magnify reference image 2.0x icon, as many times as you used this icon.
IconLeastSquaresAlignment.jpg Apply least squares alignment
Applies the Landmark-Least Squares algorithm to the image to be registered. After the algorithm is applied, if needed, you can apply the Landmark-Thin Plate Splines algorithm on the image, or you can manually adjust the alignment of the image on the Blended page.
IconThinPlateSplineAlignment.jpg Apply thin plate spline alignment
Applies the Landmark-Thin Plate Spline algorithm to the image to be registered. After this algorithm is applied, if needed, you can apply the Landmark-Least Squares algorithm on the image, or you can manually adjust the alignment of the image on the Blended page.
IconReset.jpg Reset image to original state
Restores the image to be registered to its original state. Restores image to its original state. This icon deletes all points on the reference image and on the image to be registered. If the Apply button has already been selected, the Reset icon undoes all changes that occurred since the last time the Apply button was selected.
IconReferenceSliceMarkers.jpg Reference slice markers
Adds a point to the reference image each time you click the left mouse button. Note that the points are sequentially labeled from 1 on in the order in which you created them. To remove points, return the cursor to its default mode by clicking IconReturntoDefaultMode.jpg , select the point to be deleted, and click IconDeleteSelectedReferenceSliceMarkers.jpg , Delete selected reference slice markers.
IconAdjustedSliceMarkers.jpg Adjusted slice markers
Adds a point to the adjusted image each time you click the left mouse button. Note that the points are sequentially labeled from 1 on in the order in which you created them. To remove points, return the cursor to its default mode by clicking IconReturntoDefaultMode.jpg , select the point to be deleted, and click IconDeleteSelectedAdjustedSliceMarkers.jpg , Delete selected adjusted slice markers.
IconDeleteSelectedReferenceSliceMarkers.jpg Delete selected reference slice markers
Removes the point that you selected in the reference image. To remove a point, first return the cursor to its default mode by clicking IconReturntoDefaultMode.jpg , select the point to be deleted, and click IconDeleteSelectedReferenceSliceMarkers.jpg , Delete selected reference slice markers.
IconDeleteSelectedAdjustedSliceMarkers.jpg Delete selected adjusted slice markers
Removes the point that you selected in the image to be registered. To remove a point, first return the cursor to its default mode by clicking IconReturntoDefaultMode.jpg , select the point to be deleted, and click IconDeleteSelectedAdjustedSliceMarkers.jpg , Delete selected adjusted slice markers.
IconReturntoDefaultMode.jpg Return to default mode
Returns the cursor to its default mode, which allows you to change from adding points to deleting points from the image.
BtnApply.jpg Apply
Commits the changes that you made to the images, but it leaves the window open for you to make further changes if desired.

Applying the Manual 2D Series algorithm on 2.5 images

To run this algorithm on 2.5D images, complete the following steps:
1 Open a single 2.5 image dataset. When you apply this algorithm, you select the slices in the dataset that you want to register.
2 Perform, as an option, any other image processing, except scaling, on the image dataset.
3 Select Algorithms > Registration > Manual 2D Series. The Manual 2D Series window for 2.5D images (see Figure 7]) opens.
Because you are registering slices of an image, and not separate images, all of the necessary icons and controls appear in a simple window that does not include tabbed pages. Note that there are two sliders at the top of the page:
Reference slice slider-Allows you to choose which slice to use as a reference image.
Adjusted slice slider-Allows you to choose which slice to use as an image to be registered.
The boxes to the right of each slider indicate which slice you are currently viewing.
All of the remaining icons and controls work in the same way that they do on the Manual 2D Series window for 2D images (refer to Figure 5 and Figure 6).

For 2.5D images, the algorithm's window does not include the Blended and Dual tabbed pages. Rather is incorporates some of the same interface controls that appear on the Blended and Dual pages, such as icons and the alphablending slider. Note that you can place landmarks on the image in this window.

References

For more information, refer to:

K.S. Arun, T.S. Huang, and S.D. Blostein, "Least-Squares Fitting of Two 3-D Point Sets" , IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. PAMI-9, No. 5, September, 1987, pp. 698-700.

David Eberly, "Thin Plate Splines" of Magic Software at http://www.magic-software.com. Also at the same site are the files: MgcInterp2DThinPlateSpline.h, MgcInterp2DThinPlateSpline.cpp, MgcInterp3DThinPlateSpline.h, MgcInterp3DThinPlateSpline.cpp Paper that explains warping from one x,y source to another x,y target set.

Fred L. BookStein, "Principal Warps: Thin-Plate Splines and the Decompositions of Deformations," IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 11, No. 6, June 1989, pp. 567-585.