Maverick/Slider: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
(Blanked the page)
Line 1: Line 1:
<h1><center><b>Slider</b></center></h1>
= Slider, a registration application part of the Maverick framework =
Slider registers (moving) image coordinates with other (fixed) image coordinates. It has been designed to be easy to use and efficient by following a very simple work-flow.


[[Image:Screenshot-Slider-1-LoadFixedImage.png|thumb|center|400px|Slider]]
= Before starting =
Images ( *.mha *.mhd *.gipl *.jpg *.bmp *.nrrd ) and scenes (*.mrml) can be imported by Slider. By loading a scene, you can extract its volumes. Importing a scene can be useful for LabelMap volumes because Slider needs the associated list of label descriptions (tissue file). If a LabelMap is loaded as an image (.mha) it will not contain the label descriptions. [[Maverick/Merlin|Merlin]] can be used to create MRML scenes ( e.g. use the Merlin resample module to lower the resolution of your images ).<br>
<br>
In this tutorial, we will register two volumes from the [http://www.itis.ethz.ch/index/index_humanmodels.html Virtual Family]. Duke, 34-year-old is the moving image and is registered with Billie, 11-year-old, the fixed image. At the end of the process, the saved result image is the body of Billie with the head of Duke. Billie and Duke are stored in separate MRML scene files. We previously made sure that they shared the same tissue file.<br>
List of the files used for this tutorial:
*Duke.mrml
**kwDuke_34y_V5_2mm.mha
**VirtualTissue.csv
*Billie.mrml
**kwBillie_11y_V2_2mm.mha
**VirtualTissue.csv
= Loading a Fixed Image =
<center>
{|
|[[Image:Screenshot-Slider-1-LoadFixedImageMenu.png|thumb|400px|Load Fixed Image menu]]
|[[Image:Screenshot-Slider-1b-LoadFixedImage.png|thumb|400px|Load Fixed Image from Scene menu]]
|}
</center>
The first screen invites you to select a fixed image. An image can be directly from a file or from a scene file. Loading a scene leads to another screen menu that lists all the volumes contained by the scene file. A volume must be selected from the list before clicking on <b>Load Image</b>. If the fixed and moving images are both contained by the loaded scene, <b>Load Image and Scene</b> loads the fixed image and cache the other volumes contained by the scene so they can be later used in the <b>Load Moving Image</b> menu.<br>
In our example, we first click on <b>Load Image from Scene File</b>, in the new menu we choose <i>kwBillie_11y_V2_2mm</i> in the volume list to finally click <b>Load Image</b>.<br>
The fixed image (the labelmap of Billie) is loaded in the top 3D and 2D views.
[[Image:Screenshot-Slider-1-LoadFixedImageResult.png|thumb|center|400px|kwBillie_11y_V2_2mm loaded as the fixed image]]
= Loading a Moving Image =
<center>
{|
|[[Image:Screenshot-Slider-2-LoadMovingImageMenu.png|thumb|400px|Load Moving Image menu]]
|[[Image:Screenshot-Slider-2b-LoadMovingImage.png|thumb|400px|Load Moving Image from Scene menu]]
|}
</center>
The second screen <b>Load Moving Image</b> invites you to select a moving image. This is the image to be registered with the already loaded fixed image. The process is the same than for the fixed image loading menu. If a scene has been previously loaded using <b>Load Image and Scene</b>, a third choice <b>Load Image from Current Scene</b> is available and allow the user to select a volume from the cache.<br>
In our example, we click on <b>Load Image from Scene File</b>, in the next menu we choose <i>kwDuke_34y_V5_2mm.mha</i> in the volume list to finally click <b>Load Image</b>.<br>
The moving image (the labelmap of Duke) is loaded in the bottom 3D and 2D views.
[[Image:Screenshot-Slider-2-LoadMovingImageResult.png|thumb|center|400px|kwDuke_34y_V5_2mm loaded as the moving image]]
= Defining a Region of Interest for the Fixed Image =
[[Image:Screenshot-Slider-3-FixedROI.png|thumb|center|400px|Fixed ROI]]
The fixed and moving images loaded, you can now define a region of interest for the fixed image. ROIs are used to limit the need of memory in the next steps. This is particularly useful when the images sizes and resolutions are different; the result image can get very big ( low-def heaf registered with a high-def eye, the result high-def head may use > 6GB of RAM ). Note: the registration algorithm is not sensitive to the ROI, the whole volume is used to register images.
<br>
By moving the anchor points of the 3D box widget in the 3D view, the final ROI of the fixed image is set. Click on <b>Next></b> to apply your changes.<br>
In our example we want to keep the whole volume of Billie, this is why set the size of the ROI to be the same than the volume ( default ).
= Defining a Region of Interest for the Moving Image =
[[Image:Screenshot-Slider-4b-MovingROI.png|thumb|center|400px|Moving ROI]]
Modify the moving image region of interest and click <b>Next</b> to apply.<br>
In our example, we shrink the ROI to the size of the head only as we want only the head of Duke in the final image.
= Initial Registration =
<center>
{|
|[[Image:Screenshot-Slider-5-InitialRegistration.png|thumb|center|400px|Initial registration]]
|[[Image:Screenshot-Slider-3-InitialRegistrationMenu.png|thumb|center|400px|Initial registration menu]]
|}
</center>
A new layout is applied. At any time you can display a different layout by clicking one of the top left icons [[Image:Screenshot-Slider-LayoutBar.png]] respectively: 3D, 2D, 3D+3x2D, 9x2D, 2x(3D+2D) and 2x2D+Checkerboard+3D ).<br>
On the left, a <b>Scene Browser</b> widget displays the hierarchy of all the objects of the scene. Visibility of the objects can be toggled by clicking on the eye icon [[Image:Screenshot-Slider-Visibility.png]]. A right click on the eye shows a slider bar that controls the objects opacity.<br>
The top left 2D view  and bottom left 2D view display the fixed image and the moving image respectively. The top right 2D view is a <b>checkerboard</b> view. It simultaneously displays the fixed and the moving image. The view would have only few discontinuities if the 2 images are well aligned. The bottom right 3D view is a view of the scene that contains the 3 orthogonal planes of the fixed and moving images.<br>
<br>
In order to help the registration algorithm, a basic alignment between the fixed and the moving images is needed. The 2 loaded images can have different orientation, spacing, size... The result of the misalignment between the volumes can be noticed in the top right 2D checkerboard view and in the bottom right 3D view. There are 4 different ways to align the fixed and the moving images together. The user can click on one of the following buttons:
*<b>Center of Mass</b>
The centers of mass of the images are computed. The moving image is then translated by a vector defined by the centers.
*<b>Center of Images</b>
The centers of the images are computed. The moving image is then translated by a vector defined by the centers.
*<b>Landmarks</b>
[[Image:Screenshot-Slider-6-LandmarksMenu.png|thumb|center|400px|Landmark menu]]
At least 3 landmarks must be dropped in the fixed and the moving image to define a transform matrix. The transform matrix is applied to the moving image. To refine the transformation, more landmarks can be used.<br>
For each landmark placed in the fixed image must correspond the same landmark in the moving image. For example, if you place the first landmark in the center of the left eye in the fixed image, the landmark in the moving image shall be in the center of the left eye as well (beware of the orientation of the 2D slices that can be different).<br>
Landmarks can be edited with a click and by using the drag&drop mechanism. When the <b>Add Landmark</b> button is clicked, 2 landmarks with the same colors are created. The first landmark is placed in the fixed image, the other in the moving image. The default location of the landmarks is the last position in the views the user clicked.<br>
A good practice is to blindly click where the next landmarks must placed in the fixed and the moving image. Click then on <b>Add Landmark</b>.<br>
If a landmark is selected ( bold and underline in the Scene Browser list ), any click in the 2D view moves the landmark. If you change the current view using the slider, the selected landmark moves. You can <b>lock</b> the landmark by clicking the locker [[Image:Screenshot-Slider-Mutable.png]] in the Scene Browser widget.<br>
<center>
{|
|[[Image:Screenshot-Slider-6a-AddLandmarks.png|thumb|center|200px|1st landmark in the right eye]]
|[[Image:Screenshot-Slider-6b-AddLandmarks.png|thumb|center|200px|2nd landmark in the left eye]]
|[[Image:Screenshot-Slider-6c-AddLandmarks.png|thumb|center|200px|3rd landmark in the corpus callosum ]]
|[[Image:Screenshot-Slider-6d-AddLandmarks.png|thumb|center|200px|4th landmark at the bottom of the chin]]
|-
|[[Image:Screenshot-Slider-6e-AddLandmarks.png|thumb|center|200px|5th landmark in the 5th vertebrae]]
|[[Image:Screenshot-Slider-6f-AddLandmarks.png|thumb|center|200px|6th landmark where the skull ends in the back of the head]]
|[[Image:Screenshot-Slider-6g-AddLandmarks.png|thumb|center|200px|7th landmark in the back of the neck]]
|[[Image:Screenshot-Slider-6h-AddLandmarks.png|thumb|center|200px|8th landmark in the trachea ]]
|}
</center>
After the 3rd landmark is placed, Dukes head is moved (by the computed transform matrix) to the same position of Billie's head. However, the scale and the orientation is still not correct. More landmarks are added to refine the alignment. The challenge in this example is that Duke is looking straight forward but Billie is looking down and the head is bended. Using the landmarks overcomes we can <i>bend</i> Duke's head.
[[Image:Screenshot-Slider-6i-AddLandmarks.png|thumb|center|400px|Final alignment]]
*<b>Load a Transform</b>
You can import any transform saved in a ITK transform file format. You can reload any previously saved transform. After placing landmarks on low-res images, you can <b>Save Transform</b> for a later useon  higher resolution images.
= Registration =
When the fixed and the moving images are correctly aligned, a click on <b>Next</b> goes to the optional Registration panel.<br>
[[Image:Screenshot-Slider-7-Registration.png|thumb|center|400px|Registration step]]
A method of registration can be selected from Rigid, Affine and BSpline. Click on <b>Register</b> to start the registration. Then click <b>Next</b> to go to the final step.
= Blending =
[[Image:Screenshot-Slider-8-Blending.png|thumb|center|400px|Blending menu]]
<br>
The blending step consists in choosing how the registered moving image is saved. Firstly, the <i>way</i> of blending must be set. It describes the relation between the 2 volume. Which volume is into the other ? <br>
In our example, the head of Duke is into the body of Billie, <b>Moving into Fixed</b> shall be selected.<br>
Then a method of how the voxels are blended together must be chosen. This applies when the fixed and moving image have voxels in the same physical coordinates. It describes how the voxel output value is computed. <b>Substitute</b> is the more likely choice.<br>
An advanced option can prevent a specified pixel value to be blended like the other pixels. When the blending algorithm find the specified pixel value, it automatically set the output pixel value to the other image pixel value.<br>
Select an image path and filename in <b>Output filename</b> and hit the <b>Blend</b> button. Your fixed and registered moving image will be blended together to generate a new image. You can use any Maverick application (Merlin, Slider, Cutter...) to visualize the generated image.

Revision as of 20:59, 20 March 2012