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.
- 1 Background
- 2 Image types
- 3 Special notes regarding the number of references points
- 4 Applying the Manual 2D Series algorithm on 2D images
- 5 Making manual adjustments to the image to be registered
- 6 Checking registration
- 7 Applying the Manual 2D Series algorithm on 2.5 images
- 8 References
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.
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.
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 icon.
On both the Blended and Dual pages, you can modify the lookup table (LUT) by clicking , the LUT icon. When you select , 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- , 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.
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.
Applying the Manual 2D Series algorithm on 2D images
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 , 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 , 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 . You can then select the point by clicking on it with the mouse and then delete it by clicking , the Delete selected reference slice markers icon.
9 Select, if desired, either , the Least Squares algorithm icon, or , 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 to verify alignment (refer to [RegistrationManual2DSeries.html] and to the following tables for more information.
Whether to select Apply to keep changes made by the algorithm.
Making manual adjustments to the image to be registered
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 ,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
To move the adjusted image, click , 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 to move the adjusted image again.
Moving the adjusted image with the direction arrows
The icons that display direction arrows ( , the Move image up icon; , the Move image down icon; , the Move image right icon; and , 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.
Rotating the adjusted image
To select the center of rotation for the image, click 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 ; and to rotate the image counterclockwise, click .
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 , 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: Dual tab
Applying the Manual 2D Series algorithm on 2.5 images
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.
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.