Difference between revisions of "Documentation:Nightly:Registration:RegistrationLibrary:RegLib C17"
(Created page with 'Back to Registration Library <br> = Slicer Registration Library Case #17: Abdominal MR/CT = == Input == {| style="colo…') |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
== Input == | == Input == | ||
{| style="color:#bbbbbb; " cellpadding="10" cellspacing="0" border="0" | {| style="color:#bbbbbb; " cellpadding="10" cellspacing="0" border="0" | ||
− | |[[Image: | + | |[[Image:RegLib_C17_Thumb1.png|150px|left|this is the fixed CT reference image. All images are aligned into this space]] |
|[[Image:RegArrow_Affine.png|100px|left]] | |[[Image:RegArrow_Affine.png|100px|left]] | ||
− | |[[Image: | + | |[[Image:RegLib_C17_Thumb2.png|150px|left|this is the moving MR image, to be aligned with the reference on the left]] |
|- | |- | ||
|fixed image/target<br>intra-op CT | |fixed image/target<br>intra-op CT | ||
Line 12: | Line 12: | ||
|} | |} | ||
− | == | + | == Description == |
− | Goal is to align the pre-op MRI to the intra-op interventional CT. The MR contains detail about location and extent of the pathology not apparent on the CT. Hence we register the MR to the CT to help guide the intervention. | + | Goal is to align the pre-op MRI to the intra-op interventional CT. The MR contains detail about location and extent of the pathology not apparent on the CT. Hence we register the MR to the CT to help guide the intervention. <br> |
+ | '''Approach:''' because the field of view and orientation of the two images is so different, we must tackle the registration in several steps: we first generate a rough manual alignment that corrects for the strong rotation and translation between the two images. We then build a set of masks that limit the registration to content that has reliable contrast in both images. Using those masks we finally compute an automated registration and then apply it to the target volume '''without''' resampling. | ||
== Modules used == | == Modules used == | ||
Line 22: | Line 23: | ||
== Download (from NAMIC MIDAS) == | == Download (from NAMIC MIDAS) == | ||
<small>''Why 2 sets of files? The "input data" mrb includes only the unregistered data to try the method yourself from start to finish. The full dataset includes intermediate files and results (transforms, resampled images etc.). If you use the full dataset we recommend to choose different names for the images/results you create yourself to distinguish the old data from the new one you generated yourself. ''</small> | <small>''Why 2 sets of files? The "input data" mrb includes only the unregistered data to try the method yourself from start to finish. The full dataset includes intermediate files and results (transforms, resampled images etc.). If you use the full dataset we recommend to choose different names for the images/results you create yourself to distinguish the old data from the new one you generated yourself. ''</small> | ||
− | *[http://slicer.kitware.com/midas3/download/?items= | + | *[http://slicer.kitware.com/midas3/download/?items=115376 '''RegLib_C17.mrb''': input data only, use this to run the tutorial from the start <small>(Slicer mrb file. 10 MB). </small>] |
− | *[http://slicer.kitware.com/midas3/download/?items= | + | *[http://slicer.kitware.com/midas3/download/?items=115375 '''RegLib_C17_full.mrb''': includes raw data + all solutions and intermediate files, use to browse/verify <small>(Slicer mrb file. 12 MB). </small>] |
== Keywords == | == Keywords == | ||
Line 30: | Line 31: | ||
== Video Screencasts == | == Video Screencasts == | ||
Below 3 movies/screencasts showing workflow for Case #17, in three parts: | Below 3 movies/screencasts showing workflow for Case #17, in three parts: | ||
− | #[[Media:RegLib_C17_01_ManualInitialRegistration.mov| | + | #[[Media:RegLib_C17_01_ManualInitialRegistration.mov|'''manual initial alignment''']] |
− | #[[Media:RegLib_C17_02_Masks.mov| | + | #[[Media:RegLib_C17_02_Masks.mov|'''generating masks defining the region of interest''']] |
− | #[[Media:RegLib_C17_03_AutomatedRegistration.mov| | + | #[[Media:RegLib_C17_03_AutomatedRegistration.mov|'''automated registration''']] |
== Procedure == | == Procedure == |
Latest revision as of 18:51, 28 August 2013
Home < Documentation:Nightly:Registration:RegistrationLibrary:RegLib C17Contents
Slicer Registration Library Case #17: Abdominal MR/CT
Input
fixed image/target intra-op CT |
moving image pre-op MRI |
Description
Goal is to align the pre-op MRI to the intra-op interventional CT. The MR contains detail about location and extent of the pathology not apparent on the CT. Hence we register the MR to the CT to help guide the intervention.
Approach: because the field of view and orientation of the two images is so different, we must tackle the registration in several steps: we first generate a rough manual alignment that corrects for the strong rotation and translation between the two images. We then build a set of masks that limit the registration to content that has reliable contrast in both images. Using those masks we finally compute an automated registration and then apply it to the target volume without resampling.
Modules used
- Transforms (for manual initial alignment)
- Editor (for mask generation)
- General Registration (BRAINS)
Download (from NAMIC MIDAS)
Why 2 sets of files? The "input data" mrb includes only the unregistered data to try the method yourself from start to finish. The full dataset includes intermediate files and results (transforms, resampled images etc.). If you use the full dataset we recommend to choose different names for the images/results you create yourself to distinguish the old data from the new one you generated yourself.
- RegLib_C17.mrb: input data only, use this to run the tutorial from the start (Slicer mrb file. 10 MB).
- RegLib_C17_full.mrb: includes raw data + all solutions and intermediate files, use to browse/verify (Slicer mrb file. 12 MB).
Keywords
MRI, CT, abdominal, image-guided surgery, interventional radiology, intra-subject
Video Screencasts
Below 3 movies/screencasts showing workflow for Case #17, in three parts:
Procedure
- Compute Initial Registration: see also movie above (1.manual initial alignment)
- Open the Data module
- right-click on the "Scene" node, select "Insert Transform" from the pulldown menu. This creates an "empty" transform we will use for the manual initial alignment. Rename it to "Xf1_Manual" or similar.
- left-click on the "MRI" node and drag it onto the new transform node "Xf1_Manual". This places the MRI volume under the transform.
- go to the Transforms module
- Under Active Transform, select the "Xf1_Manual" we just created
- Place the "MR" in the background and the "CT" in the foreground and set the fade slider about halfway, so that you can see both images superimposed.
- Use the "Rotation-IS" slider to rotate the MR volume around the z-axis by about 120 degrees.
- Use the "Translation-LR" slider to shift the MR volume left by about 112mm. As you do this you should see the two volumes get into better correspondence.
- continue adjusting the sliders until you have a good alignment for the kidney. This need not be perfect because we only use it as a starting point for the automated registration.
- Build Registration Masks: see also movie above (2.generating masks defining the region of interest). You can also use the provided masks as part of the full dataset. Note these masks need not be precise segmentations but merely a rough definition of the region we want the automated registration to use. Since we have very limited FOV in the CT, there are not many structures common to both images, mainly the kidney, vertebrae, vena cava and some surrounding structures. Hence we limit our mask to that region.
- Open the Editor module
- Select "MRI" as the Master volume, accept the suggested colormap in the dialog.
- Select the Brush tool and increase the radius to about 50mm.
- Switch the view to "Red Slice Only". Locate the kidney and vertebra on the axial slice and draw the brush over that region to select. Repeat for all slices showing the kidney and 1-2 slices beyond.
- repeat the same for the CT.
- Test/Pilot Registration: see also movie above (3.automated registration). This pilot test is intended to see if the automated registration will converge to a stable result with the input we have at this point. We have an initial alignment and 2 masks. If this is insufficient as a starting point, the rigid registration will stray from the manual alignment we gave. If it does converge we can continue to higher DOF. If you're confident/adventurous you may skip this step and continue straight to the affine portion.
- open the General Registration (BRAINS) module
- Input Images: Fixed Image Volume: CT
- Input Images: Moving Image Volume: MRI
- Output Settings:
- Slicer Linear Transform (create new transform, rename to: "Xf2_Rigid")
- Output Image Volume none. No resampling required for linear transforms
- Initialization transform: select the "Xf1_Manual" transform we created above.
- Initialization Transform Mode: Off
- Registration Phases: select/check Rigid
- Main Parameters:
- increase Number Of Samples to 300,000 (because we expect to loose points by having a small mask, we choose a higher number here)
- Mask Option: ROI
- Masking input fixed: CT-label (mask generated above)
- Masking input fixed: MRI-label (mask generated above)
- Leave all other settings at default
- click: Apply; runtime < 1 min.
- Test: upon completion the MR volume should be placed within the new transform "Xf2_Rigid". Verify that 1) the new position is different from the one of the manual transform (you may also compare the transforms directly); and 2) the new position is a better or comparable position than before. If that is the case we can proceed to higher DOF.
- Affine Registration: see also movie above (3.automated registration).
- open the General Registration (BRAINS) module
- Input Images: Fixed Image Volume: CT
- Input Images: Moving Image Volume: MRI
- Output Settings:
- Slicer Linear Transform (create new transform, rename to: "Xf3_Affine")
- Output Image Volume none. No resampling required for linear transforms
- Initialization transform: select the "Xf2_Rigid" transform we created above.
- Initialization Transform Mode: Off
- Registration Phases: select/check Rigid
- Main Parameters:
- increase Number Of Samples increase to 400,000 (because we expect to loose points by having a small mask, we choose a higher number here)
- Mask Option: ROI
- Masking input fixed: CT-label (mask generated above)
- Masking input fixed: MRI-label (mask generated above)
- Leave all other settings at default
- click: Apply
- Apply Transform without resampling:
- Go to the Data module
- left click on the moving image node and drag it into/onto the transform node. You should see a "+" sign appear next to the transform node indicating the volume is now placed under that transform. If the image is in either foreground or background and visible in the slice views or 3D view, you will see the image update to its new position immediately.
- right click on the image node and from the pop-up menu, select Harden Transform. This will apply the transform and move the image node back outside onto the main level.
- double click on the image node and rename it to document that this is no longer the original image but the reoriented one. Note that the image in its original position is replaced in memory and no longer accessible. There is no "undo" for this step, so if you wish to return to the original image, you must reload it from the original file. Be careful not to accidentally overwrite the original image file with the resampled one. Use a new filename when saving the image.
- Alternative: Apply Transform with resampling:
- Go to the BRAINSResample module
- Image To Warp: select MRI
- Reference Image: select CT
- Outputs:OutputImage: create & rename new, rename to "MRI_Xf2"
- Pixel Type: select short , or match the datatype of the original image.
- Transform File: select "Xf2_Affine"
- Interpolation Mode: select "WindowedSinc" (recommended for 3D MRI). For labelmaps select Nearest Neighbor
- Click Apply. This will generate a new volume with the same resolution as the reference image.
- Go to the BRAINSResample module
Registration Results
![]() |
MR/CT before registration (click to enlarge) |
![]() |
MR/CT after affine alignment (click to enlarge) |