The Dual Viewer Application

The Dual Viewer application is the most complex tool in BioImage Suite Web. It allows the user to display two sets of images side-by-side with linked cursors and to manipulate images from either viewer separately or in combination. It is primarily targeted for image registration applications, though advanced users may also take advantage of the extra image display capabilities.

Differences from the Single Viewer

Dual1 Figure 1: The dual viewer with different components highlighted.

Compared to the regular image viewer), you may notice the following:

The two viewers are separated by the dividing line D. The relative size of the two viewers can be adjusted by dragging this to the left or the right.

Image Processing and Segmentation Tools

These are identical to the tools for the single viewer — see the documents Image Processing and Segmentation Tools. We again highlight here that in the dual viewer you can select the input images in finer detail. As we mention in the description of the image processing tools, there is an additional set of options for setting the input and the output image in the dual viewer. As shown in the figure below, both the input and the output have an additional “Viewer” tab. In this way, one can choose to flip the image in viewer 1 and send the output to viewer 2 or any one of many other possible combinations. The rest of the functionality is identical.

dualviewer Figure 2: The input and output selector tabs for the dual viewer.

The Registration Tools

One of the most important and unique features of the dual viewer is its ability to run image registration tasks. These can be accessed from the Registration menu as shown below.

regmenu Figure 3: The registration tab.

The options are as follows:

Running a Linear Registration

This is often a straight-forward process. First load the reference image in Viewer 1 and then the target image in Viewer2. The tool will then try to create a transformation that can be used to reslice the target image to match the reference image using methodology from Studholme et al.

Loading the images to register

A. Under the File menu, use the Load Image option to load the reference image. B. Under the Image2 menu, use the Load Image option to load the target image.

For this example, we use the same images from the Deface Image Module, available from these links:

Once you click on these links, use the “Download” button to download the images.

Once the images are loaded, go to Registration->Linear Registration. You should see a view similar to the figure below.

linearreg Figure 4: The reference image (left) and target image (right) loaded into the dual viewer.

Note that the two images have different orientations — the one on the left is sagital whereas the one on the right is axial. The registration tools can handle this type of reorientation automatically.

Computing the Registration

C. In the registration tool, set the Mode parameter to Affine. D. In the registration tool, click the Run button.

At this point you may want to observe the computation by opening the JavaScript console in your browser. See the testing document for more information on this.

If the registration runs, you will be presented with something like the following:

linearregresult Figure 5: A successful reslicing. Note that the console is open in this image.

The resliced version of the input image is overlaid on the reference image using an Orange colormap. This can be saved under the Overlay menu. If you want to get to the actual transformation, you may access it from Registration->Transformation Manager. This will be expanded on in the next section.

The Transformation Manager

xformmanager Figure 6: A transformation displayed by the transformation manager.

This is a complex control that stores multiple transformations, which are either loaded from disk using the Add button below or created as a result of some operation. The list of all available transformations appears in the drop down menu A.

The current transformation is described in the text box B. All algorithms that require a transformation, will use this current transformation as their input if the user selects this (more on this later).

The buttons in bottom row perform the following:

Finally we have the two buttons marked as D and E. The arrow button D can be used to move the transformation control from the right sidebar of the viewer to the left sidebar, which will appear if it’s not already present. The close button E can be used to close the control and remove it from the sidebar.

Note: The file format that is used for the transformations is a JSON-style file unique to BioImage Suite web by default. If you want to use legacy BioImage Suite .matr or .grd formats, you will need to rename the transformation to have this extension prior to saving.

Back to the Linear Registration Computation – how was this performed?

linearegoptions Figure 7: Linear registration with its options expanded.

Let us now examine the options for linear registration. There are five different items that are worth highlighting, labelled A to E in the figure above:

Hence loading the images into Viewer 1 and Viewer 2 placed them in the default locations, but you could just as easily have loaded the target image into Viewer 1 overlay and then set the target image options (B) to point there.

Finally we have the registration options, which can be found under E. For the most part the defaults will work. These options to the following:

Finally the option Header Orient uses the orientation matrices of the two images to perform an initial alignment if it is selected.

There are more options under advanced which will not be described here for the most part. The most important of these is metric. The default value of this is NMI (normalized mutual information). Other options include SSD (Sum-of-squared differences) and CC (cross-correlation).

Reslice Image

Consider the scenario that a registration is computed between two images I and J so that it can be used to reslice a third image K to match I. Obviously J and K must live in the same coordinate space. Going back to the defacing example, we will use the estimated tranformation to reslice the mask used for image defacing to match our image by performing the following steps:

reslice Figure 8: The raw defacing mask.

You will see a defacing mask that looks like the figure above (note that only the right half of the dual viewer is shown). There are five items to highlight here, labeled A to E in the figure above.

Pressing the Reslice button will reslice the mask as shown below:

reslicemask Figure 9: The result of reslicing. Note the mask on the right, the reference on the left, and the resliced mask over the reference.

You can then use the Segmentation -> Mask Image to mask the anotomical image (see the description of the Segmentation Tools for more detail).

NonLinear Registration

This uses a B-Spline FFD Registration method deriving from Rueckert 1999. There are several options, the most important of which is control point spacing CP-spacing which defines the flexibility of the transformation. More to come.


[BioImage Suite Web Manual Table Of Contents]    [BioImage Suite Web Main Page]


This page is part of BioImage Suite Web. We gratefully acknowledge support from the NIH Brain Initiative under grant R24 MH114805 (Papademetris X. and Scheinost D. PIs, Dept. of Radiology and Biomedical Imaging, Yale School of Medicine.)