Difference between revisions of "Projects:RegistrationLibrary:RegLib C04"

From NAMIC Wiki
Jump to: navigation, search
Line 110: Line 110:
 
#to apply the transform and lock in the new position, right click on the volume and select ''Harden Transform'' from the popup menu. The node will move back out to the main level. Note that this applies the transform to the physical orientation info in the image header and does not actually perform a resampling. It is recommended to not apply resampling until the very end of an analysis pipeline, to avoid interpolation-related data loss. To perform a resampling follow steps below:
 
#to apply the transform and lock in the new position, right click on the volume and select ''Harden Transform'' from the popup menu. The node will move back out to the main level. Note that this applies the transform to the physical orientation info in the image header and does not actually perform a resampling. It is recommended to not apply resampling until the very end of an analysis pipeline, to avoid interpolation-related data loss. To perform a resampling follow steps below:
 
*'''Phase 4''': Resampling (optional)
 
*'''Phase 4''': Resampling (optional)
 
+
#go to [http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/BRAINSResample ''Resample Image (BRAINS)'' module] (in the Registration menu)
 
+
##''Image To Warp'': e2_PD
 
+
##''Reference Image'': e1_PD
 
+
##''Output Image'': create new & rename: e2_PD_Xf1
 
+
##''Pixel Type'': ushort
#Go to the ''Data'' module. You should see 6 images (e1_PD, e1_T2 etc.) and 3 solution transforms (Xform_...)
+
##''Warp By Transform'': Xf1_e21_Affine  created in Phase I above
#Set background view to e1_PD and foreground to e2_PD. Toggle to see misalignment
+
##''Interpolation Mode'': '''linear'''
#'''Align Exam 1:'''
+
#note to avoid multiple resampling, combine the two nested transforms for the two volumes before performing the resampling step above. Alternatively you can execute the ''Harden Transform'' step above first and then resample the volume after, by giving no transform (i.e. resampling in place) but listing the fixed image (e.g. e1_PD) as reference. This will resample the moving image into the same representation as the reference.
##Open ''Registration / BRAINSFit'' module
 
##To set all parameters from presets, from the ''ParameterSet'' menu, select Gd1-PD1, else choose settings below:
 
##Fixed Image: e1_PD, moving image: e1_T1
 
##Registration Phases: select ''Include Rigid'' and ''Include Affine''
 
##Output Settings: under SlicerLinear Transform, select "Create New Linear Transform'', then select ''Rename" and rename it to ''MyXform_Gd1-PD1''
 
##Registration Parameters: change the ''Number of Samples'' field to 200,000
 
##Leave all other settings at defaults
 
##Click Apply. Registration should complete within ~ 10 seconds
 
##Go back to the ''Data'' module: you should see the e1_T1Gd image moved under the newly created transform
 
##Select ''e1_T1Gd'' as new foreground, toggle to see alignment
 
#'''Align Exam 2:'''
 
##repeat the above steps for ''e2_PD'' as fixed and ''e2_T1Gd'' as moving
 
##To set all parameters from presets, from the ''ParameterSet'' menu, select Gd2-PD2
 
#'''Align Exam 2 with Exam 1:'''
 
##Open ''Registration / BRAINSFit'' module
 
##To set all parameters from presets, from the ''ParameterSet'' menu, select PD2-PD1, else choose settings below:
 
##Fixed Image: e1_PD, moving image: e2_PD
 
##Registration Phases: select ''Include Rigid'' and ''Include Affine''
 
##Output Settings: under SlicerLinear Transform, select "Create New Linear Transform'', then select ''Rename" and rename it to ''MyXform_PD2-PD1''
 
##Registration Parameters: change the ''Number of Samples'' field to 200,000
 
##Leave all other settings at defaults
 
##Click Apply. Registration should complete within ~ 10 seconds
 
##Go back to the ''Data'' module: you should see the e2_PD image moved under the newly created transform
 
##Select ''e2_PD'' as new foreground, toggle to see alignment
 
#'''Combine Transforms:'''
 
##move e2_T2 inside the PD2-PD1 transform (same level as e2_PD)
 
##move XForm_Gd2-PD2 and the image inside (e2_T1Gd) inside the PD2-PD1 transform
 
##see image below for how the Data Tree should look after nesting the transforms
 
##Select pairings as fore- and background and click toggle button to check alignment
 
##inparticular see if e2_T1Gd is aligned with e1_T1Gd
 
#'''Harden/Export results:''''
 
##Select each registered image in turn, and from right-click menu select ''Harden Transform''. Then immediately rename the node (via MRML Node Inspector below the MRLML tree tab) to distinguish from the original
 
##Select the Xform_Gd2-PD2 when inside the XForm-PD2-PD1 and also select 'Harden Transform''. Then immediately rename to ''Xform_Gd2-PD1''.
 
##Choose ''File/Save'' to save results.
 
<br>
 
 
 
 
before registration: [[Image:RegLib_C04_DataTree.png|200px|Orig. MRML Data tree]]  
 
before registration: [[Image:RegLib_C04_DataTree.png|200px|Orig. MRML Data tree]]  
 
after registration: [[Image:RegLib_C04_DataTree2.png|200px|Registered. MRML Data tree: exam 2 is within nested affine transforms]]
 
after registration: [[Image:RegLib_C04_DataTree2.png|200px|Registered. MRML Data tree: exam 2 is within nested affine transforms]]

Revision as of 19:46, 12 June 2012

Home < Projects:RegistrationLibrary:RegLib C04

Back to ARRA main page
Back to Registration main page
Back to Registration Use-case Inventory

v3.6.3 Slicer cvers banner.png Slicer Registration Library Case 04: Multi-contrast brain MRI of Multiple Sclerosis

Input

this is the main fixed reference image. All images are ev. aligned into this space this is the main fixed reference image. All images are ev. aligned into this space lleft this is the intra-subject moving image.
exam 1: PD exam 1: T2 exam 1: T1-Gd
lleft
this is the inter-subject moving image, but also the reference for exam 2 this is the inter-subject moving image, but also the reference for exam 2 lleft this is the moving image.
exam 2: PD exam 2: T2 exam 2: T1-Gd

Slicer 4.1 recommended Modules

Objective / Background

This scenario occurs in many forms whenever we wish to assess change in a series of multi-contrast MRI. The follow-up scan(s) are to be aligned with the baseline, but also the different series within each exam need to be co-registered, since the subject may have moved between acquisitions. Hence we have a set of nested registrations. This particular exam features a dual echo scan (PD/T2), where the two structural scans are aligned by default. The post-contrast T1-GdDTPA scan however is not necessarily aligned with the dual echo. Also the post-contrast scan is taken with a clipped field of view (FOV) and a lower axial resolution, with 4mm slices and a 1mm gap (which we treat here as a de facto 5mm slice). read more about this dataset here

Download

Keywords

MRI, brain, head, intra-subject, multiple sclerosis, MS, multi-contrast, change assessment, dual echo, nested registration

Input Data

  • reference/fixed : PD.1 baseline exam , 0.9375 x 0.9375 x 3 mm voxel size, axial acquisition, RAS orientation.
  • fixed T2.1 baseline exam , 0.9375 x 0.9375 x 3 mm voxel size, axial acquisition, RAS orientation. -> (aligned with PD.1, not used for registering)
  • moving: T1.1 (GdDTPA contrast-enhanced scan) baseline exam 0.9375 x 0.9375 x 5 mm voxel size, axial acquisition.
  • moving: PD.2 follow-up exam 0.9375 x 0.9375 x 3 mm voxel size, axial acquisition.
  • moving: T2.2 follow-up exam 0.9375 x 0.9375 x 3 mm voxel size, axial acquisition. -> same orientation as PD2, will have same transform applied
  • moving:T1.2-GdDTPA follow-up exam0.9375 x 0.9375 x 5 mm voxel size, axial acquisition. -> undergoes 2 transforms: first to PD.2, then to PD.1

Registration Challenges

  • we have multiple nested transforms: each exam is co-registered within itself, and then the exams are aligned to eachother
  • potential pathology change can affect the registration
  • anisotropic voxel size causes difficulty in rotational alignment
  • clipped FOV and low tissue contrast of the post-contrast scan

Key Strategies

  • we first register the post-contrast scans within each exam to the PD
  • second we register the follow-up PD scan to the baseline PD
  • we also move the T2 exam within the same Xform
  • we then nest the first alignment within the second
  • because of the contrast differences and anisotropic resolution we use Mutual Information as cost function for better robustness

Procedure

  1. open the General Registration (BRAINS) module
    1. Fixed Image Volume: e1_PD
    2. Moving Image Volume: e2_PD
    3. Output Settings:
      1. Slicer BSpline Transform": none
      2. Slicer Linear Transform: create & rename new transform: Xf1_e21_Affine.tfm
      3. Output Image Volume: none
    4. Registration Phases: check boxes for Rigid and Affine
    5. Main Parameters
      1. Number of Samples: 200,000
    6. click: Apply; runtime < 1 min (MacPro QuadCore 2.4GHz)
  2. note that the Slicer4.1 version of BRAINS registration does not automatically place the moving volume inside the result transform, as it did for Slicer 3.6. In order to see the result, you must either go to the Data module and drag the moving volume inside the transform node, or select to generate a resampled Output Volume, as done above. The demo movie you can download here shows how to do this.
  • Phase 2: register intra-examT1Gd to PD
  1. open the General Registration (BRAINS) module
    1. Fixed Image Volume: e1_PD
    2. Moving Image Volume: e1_T1Gd
    3. Output Settings:
      1. Slicer BSpline Transform": none
      2. Slicer Linear Transform: create & rename new transform: Xf2_e1-T1Gd_Rigid.tfm
      3. Output Image Volume: none
    4. Registration Phases: check boxes for Rigid only
    5. Main Parameters
      1. Number of Samples: 200,000
    6. click: Apply; runtime < 1 min (MacPro QuadCore 2.4GHz)
  2. note that the Slicer4.1 version of BRAINS registration does not automatically place the moving volume inside the result transform, as it did for Slicer 3.6. In order to see the result, you must either go to the Data module and drag the moving volume inside the transform node, or select to generate a resampled Output Volume, as done above. The demo movie you can download here shows how to do this.
  3. repeat for exam 2, i.e
    1. Fixed Image Volume: e2_PD
    2. Moving Image Volume: e2_T1Gd
    3. Slicer Linear Transform: create & rename new transform: Xf3_e2-T1Gd_Rigid.tfm
  • Phase 3: organize transform hierarchies in the Data tree
  1. go to the Data module
    1. drag the volume node e1_T1Gd onto the transform Xf2_e1-T1Gd_Rigid; let go of the mouse button when you see a hilight box appear around the transform node name
    2. drag the volume node e2_T1Gd onto the transform Xf3_e2-T1Gd_Rigid;
    3. drag the volume node e2_PD and e2_T2 onto the transform Xf1_e21_Affine.tfm
    4. drag the transform node Xf3_e2_T1Gd_Rigid.tfm onto the transform Xf1_e21_Affine.tfm
    5. your MRML data tree should look like the image on the right
    6. different images into fore- and background, respectively, and use the fade slider to shift between fore- and background to view the registration quality. You can also use OPTION+CMD key and drag the mouse to fade between back- and foreground.
  2. to apply the transform and lock in the new position, right click on the volume and select Harden Transform from the popup menu. The node will move back out to the main level. Note that this applies the transform to the physical orientation info in the image header and does not actually perform a resampling. It is recommended to not apply resampling until the very end of an analysis pipeline, to avoid interpolation-related data loss. To perform a resampling follow steps below:
  • Phase 4: Resampling (optional)
  1. go to Resample Image (BRAINS) module (in the Registration menu)
    1. Image To Warp: e2_PD
    2. Reference Image: e1_PD
    3. Output Image: create new & rename: e2_PD_Xf1
    4. Pixel Type: ushort
    5. Warp By Transform: Xf1_e21_Affine created in Phase I above
    6. Interpolation Mode: linear
  2. note to avoid multiple resampling, combine the two nested transforms for the two volumes before performing the resampling step above. Alternatively you can execute the Harden Transform step above first and then resample the volume after, by giving no transform (i.e. resampling in place) but listing the fixed image (e.g. e1_PD) as reference. This will resample the moving image into the same representation as the reference.

before registration: Orig. MRML Data tree after registration: Registered. MRML Data tree: exam 2 is within nested affine transforms

Registration Results

Unregistered baseline data: PD vs. T1Gd Unregistered baseline data: PD vs. T1Gd
Unregistered followup data: PD exam 2 vs. exam 1 Unregistered followup data: PD exam 2 vs. exam 1
Registered baseline data Registered baseline data
Registered followup data Registered followup data
Lesion change visualization in 3DLesion change visualization in 3D
Lesion change via subtraction imaging of co-registered PDLesion change via subtraction imaging of co-registered PD