Registration: Manual 2D Series

From MIPAV
Revision as of 15:12, 7 February 2012 by Angelfish100 (Talk)

Jump to: navigation, search

Mipavfinallogo.gif


Registration: Manual 2D Series

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

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.
Figure 1. Registration: Manual 2D Series window


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.

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.

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

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.

References

Refer to the following references for more information:
"Least-Squares Fitting of Two 3-D Point Sets" by K.S. Arun, T.S. Huang, and S.D. Blostein, 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.

Applying the Manual 2D Series algorithm on 2D images

To run this algorithm, complete the following steps:
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.
Figure 2. The Load dialog box


{| align="center"

File:DialogboxLoada.jpg



|}


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.

Note that this 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#1049995 "Making manual adjustments to the image to be registered" on page 632] 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.

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.

File:RegistrationManual2DSeries99.gif


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.

File:RegistrationManual2DSeries105.gif


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:

File:RegistrationManual2DSeries111.gif


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 File:RegistrationManual2DSeries54.gif , 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 (refer to [RegistrationManual2DSeries.html#1051945 "Moving the adjusted image in any direction" on page 635])
Moving the image using the direction arrows (refer to [RegistrationManual2DSeries.html#1052122 "Moving the adjusted image with the direction arrows" on page 636]):
IconMoveImageUp.jpg , the Move image up icon
IconMoveImageDown.jpg , the Move image down icon
IconMoveImageRight.jpg , the Move image right icon
IconMoveImageLeft.jpg , the Move image left icon
Setting the number of pixels to move the image with IconSetPixelIncrement.jpg , the Set pixel increment icon
Rotating the image with the following icons (refer to [RegistrationManual2DSeries.html#1051981 "Rotating the adjusted image" on page 636]):
IconRotateImage.jpg , the Rotate image icon
IconRotateClockwise.jpg , the Rotate clockwise icon
IconRotateCounterClockwise.jpg , the Rotate counterclockwise icon
IconSetPixelIncrement.jpg , the Set degree increment icon

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 ([RegistrationManual2DSeries.html#1147547 Figure 3]). In this case, you can use IconTranslateImage.jpg to move the adjusted image again.

Figure 3. The Blended page of the Manual 2D Series window showing the adjusted image moved down and to the right


{| align="center"

File:WindowManual2DSeries MovedImage.jpg



|}



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 ([RegistrationManual2DSeries.html#1535769 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 .

Figure 4. Manual 2D Series window showing center of rotation


{| align="center"

File:WindowManual2DSeries Center.jpg



|}