<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.slicer.org/w/index.php?action=history&amp;feed=atom&amp;title=Documentation%3ANightly%3ARegistration%3ARegistrationLibrary%3ARegLib_C08</id>
	<title>Documentation:Nightly:Registration:RegistrationLibrary:RegLib C08 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.slicer.org/w/index.php?action=history&amp;feed=atom&amp;title=Documentation%3ANightly%3ARegistration%3ARegistrationLibrary%3ARegLib_C08"/>
	<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation:Nightly:Registration:RegistrationLibrary:RegLib_C08&amp;action=history"/>
	<updated>2026-04-14T17:42:11Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation:Nightly:Registration:RegistrationLibrary:RegLib_C08&amp;diff=36859&amp;oldid=prev</id>
		<title>Meier: Created page with 'Back to Registration Library &lt;br&gt; =  Slicer Registration Library Case #8: Align PET/CT pair follow-up to baseline = == …'</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation:Nightly:Registration:RegistrationLibrary:RegLib_C08&amp;diff=36859&amp;oldid=prev"/>
		<updated>2013-12-17T21:05:44Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;&lt;a href=&quot;/wiki/Documentation/Nightly/Registration/RegistrationLibrary&quot; title=&quot;Documentation/Nightly/Registration/RegistrationLibrary&quot;&gt;Back to Registration Library&lt;/a&gt; &amp;lt;br&amp;gt; =  Slicer Registration Library Case #8: Align PET/CT pair follow-up to baseline = == …&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Documentation/Nightly/Registration/RegistrationLibrary|Back to Registration Library]] &amp;lt;br&amp;gt;&lt;br /&gt;
=  Slicer Registration Library Case #8: Align PET/CT pair follow-up to baseline =&lt;br /&gt;
== Input ==&lt;br /&gt;
{| style=&amp;quot;color:#bbbbbb; &amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot;&lt;br /&gt;
|[[Image:RegLib_C08_Thumb1.png|150px|left|this is the baseline PET/CT exam]] &lt;br /&gt;
|[[Image:RegArrow_NonRigid.png|100px|left]] &lt;br /&gt;
|[[Image:RegLib_C08_Thumb2.png|150px|left|this is the follow-up exam, i.e. the moving image, to be aligned with the baseline]]&lt;br /&gt;
|-&lt;br /&gt;
|fixed image/target&amp;lt;br&amp;gt;baseline PET/CT&lt;br /&gt;
|&lt;br /&gt;
|moving image&amp;lt;br&amp;gt;follow-up PET/CT&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
We have two sets of PET/CT scans we wish to align. Each exam has PET and CT already aligned to eachother by acquisition. &amp;lt;br&amp;gt;&lt;br /&gt;
'''Approach''': we calculate a transform to align the follow-up CT to the baseline and then apply this transform to the follow-up PET. We proceed in two steps of first affine and then BSpline registration. We also show the use of a new extension module to visualize deformation fields.&lt;br /&gt;
&lt;br /&gt;
== Modules used ==&lt;br /&gt;
*[[Documentation/Nightly/Modules/BRAINSFit| ''General Registration (BRAINS)'']]&lt;br /&gt;
* [[Documentation/Nightly/Modules/BRAINSResample|''Registration / Resample Volume (BRAINS)'' module]]&lt;br /&gt;
*[[Documentation/Nightly/Extensions/TransformVisualizer| ''TransformVisualizer'']]&lt;br /&gt;
&lt;br /&gt;
== Download (from NAMIC MIDAS) ==&lt;br /&gt;
&amp;lt;small&amp;gt;''Why 2 sets of files?  The &amp;quot;input data&amp;quot; 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. ''&amp;lt;/small&amp;gt;&lt;br /&gt;
*[http://slicer.kitware.com/midas3/download/?items=116262 '''RegLib_C08.mrb''': input data only, use this to run the tutorial from the start &amp;lt;small&amp;gt;(Slicer mrb file. 76 MB). &amp;lt;/small&amp;gt;]&lt;br /&gt;
*[http://slicer.kitware.com/midas3/download/?items=116261 '''RegLib_C08_full.mrb''': includes raw data + all solutions and intermediate files, use to browse/verify &amp;lt;small&amp;gt;(Slicer mrb file. 171 MB). &amp;lt;/small&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
== Screencasts / Video ==&lt;br /&gt;
#[[Media:RegLib_C20_1_DisplayAndCenter.mov|Loading volumes, setting colormaps, centering volumes]]&lt;br /&gt;
#[[Media:RegLib_C20_2_RegisterCT.mov|perform affine and BSpline registration of the CT volumes]]&lt;br /&gt;
#[[Media:RegLib_C20_3_ApplyTransformToPET.mov|apply the BSpline transform to the PET]]&lt;br /&gt;
#[[Media:RegLib_C20_4_InstallTransformVisualizer.mov|optional: install TransformVisualizer extension module]]&lt;br /&gt;
#[[Media:RegLib_C20_5_UseTransformVisualizer.mov|optional: use TransformVisualizer extension module] to visualize the registration deformation field ]]&lt;br /&gt;
&lt;br /&gt;
== Keywords ==&lt;br /&gt;
PET/CT, full-body, intra-subject, nonrigid&lt;br /&gt;
&lt;br /&gt;
== Procedure ==&lt;br /&gt;
It is possible to perform both steps of affine and BSpline registration in a single pass within the  [[Documentation/Nightly/Modules/BRAINSFit|''General Registration (BRAINS)'' module]], but to better show/judge progress we perform each separately and feed the results of one the the next step. Hence we first run an affine registration, then use that as starting point for a BSpline registration.&lt;br /&gt;
#'''Load &amp;amp; Center Volumes''': [[Media:RegLib_C20_1_DisplayAndCenter.mov|(screencast for this step)]]&lt;br /&gt;
##the original unregistered PET/CT pair have very different image origins. When loaded into Slicer there is very little overlap between the two sets. We first re-center all the volumes to correct for this. Alternatively you can select the &amp;quot;Center Volume&amp;quot; option in the File dialog when loading the images.&lt;br /&gt;
##open to the [[Documentation/Nightly/Modules/Volumes|''Volumes'' module]]&lt;br /&gt;
###''Active Volume'': CT_1&lt;br /&gt;
###scroll down and click on the ''Center Volume'' button.&lt;br /&gt;
###repeat for &amp;quot;CT_2&amp;quot;, &amp;quot;PET_1&amp;quot; and &amp;quot;PET_2&amp;quot; volumes&lt;br /&gt;
#'''Set the display properties:'''&lt;br /&gt;
##the CT and PET have very distinct colormaps. Slicer provides presets for both types&lt;br /&gt;
##open to the [[Documentation/Nightly/Modules/Volumes|''Volumes'' module]]&lt;br /&gt;
###''Active Volume'': CT_1&lt;br /&gt;
###''Window/Level editor presets'': click on the &amp;quot;CT-abdomen&amp;quot; button (3rd from the right). &lt;br /&gt;
###repeat for volume &amp;quot;CT_2&amp;quot;&lt;br /&gt;
###for &amp;quot;PET_1&amp;quot; and &amp;quot;PET_2&amp;quot; select the &amp;quot;PET&amp;quot; preset (3rd from the left)&lt;br /&gt;
###since zero in the PET colormap is red, we set a threshold to suppress this: from ''Threshold'' menu, select &amp;quot;Manual&amp;quot; and set the left/lower threshold to ~ 600. You can also drag the pop-up slider until most of the red background turns to black.&lt;br /&gt;
#'''Register: Compute Affine Registration''':  [[Media:RegLib_C20_2_RegisterCT.mov|(screencast for this step)]]&lt;br /&gt;
##open to the [[Documentation/Nightly/Modules/BRAINSFit|''General Registration (BRAINS)'' module]]&lt;br /&gt;
##''Input Images: Fixed Image Volume'': CT_1&lt;br /&gt;
##''Input Images: Moving Image Volume'': CT_2&lt;br /&gt;
##''Output Settings'': &lt;br /&gt;
###''Slicer Linear Transform'': (create new transform, rename to: &amp;quot;Xf1_Affine&amp;quot;)&lt;br /&gt;
###''Output Image Volume'': none (we need no resampled volume at this stage, only the transform)&lt;br /&gt;
##''Initialization'': none&lt;br /&gt;
##''Initialize Transform Mode'': switch to ''Off'' (there is sufficient overlap)&lt;br /&gt;
##''Registration Phases'':  'check ''Rigid'',  ''Rigid+Scale'' and ''Affine'' only&lt;br /&gt;
##''Main Parameters'': &lt;br /&gt;
###increase ''Number Of Samples'' to at least 200,000&lt;br /&gt;
##Leave all other settings at default&lt;br /&gt;
##click: ''Apply''; runtime &amp;lt; 2 min.&lt;br /&gt;
##check the result&lt;br /&gt;
###Place &amp;quot;CT_1&amp;quot; in the background and &amp;quot;CT_2&amp;quot; in the foreground&lt;br /&gt;
###switch to the [[Documentation/Nightly/Modules/Data|''Data'' module]], verify that  the &amp;quot;CT_2&amp;quot; node is inside the newly created &amp;quot;Xf1_Affine&amp;quot; node. The registration module should do that automatically for you. You may see a small &amp;quot;+&amp;quot; next to the &amp;quot;Xf1_Affine&amp;quot; node, click on it to reveal the contents.&lt;br /&gt;
###fade between background and foreground to judge the alignment.&lt;br /&gt;
#'''Compute BSpline Registration''':  [[Media:RegLib_C20_2_RegisterCT.mov|(screencast for this step)]]&lt;br /&gt;
##return to the [[Documentation/Nightly/Modules/BRAINSFit|''General Registration (BRAINS)'' module]]&lt;br /&gt;
##''Input Images: Fixed Image Volume'': CT_1&lt;br /&gt;
##''Input Images: Moving Image Volume'': CT_2&lt;br /&gt;
##''Output Settings'': &lt;br /&gt;
###''Slicer BSpline Transform'': Create and rename new. Rename to &amp;quot;Xf2_BSpline&amp;quot;&lt;br /&gt;
###''Slicer Linear Transform'': set to ''none''&lt;br /&gt;
###''Output Image Volume'': Create and rename new. Rename to &amp;quot;CT_2_Xf2&amp;quot; (we need a resampled volume to visualize the result. Nonrigid transforms cannot be visualized on the fly)&lt;br /&gt;
##''Initialization'':  for the ''Initialization transform'' select the &amp;quot;Xf1_Affine&amp;quot; transform created above. &lt;br /&gt;
##''Initialize Transform Mode'': switch to ''Off''&lt;br /&gt;
##''Registration Phases'':  '''un'''check ''Rigid+Scale'' and ''Affine'' and select ''BSpline'' only&lt;br /&gt;
##''Main Parameters'': &lt;br /&gt;
###increase ''Number Of Samples'' to 300,000&lt;br /&gt;
###set ''B-Spline Grid Size'' to 11,11,7&lt;br /&gt;
##Leave all other settings at default&lt;br /&gt;
##click: ''Apply''; runtime for this will be more than 1 minute, depending on CPU.&lt;br /&gt;
##check the result&lt;br /&gt;
###Place &amp;quot;CT_1&amp;quot; in the background and &amp;quot;CT_2_Xf2&amp;quot; in the foreground&lt;br /&gt;
###fade between background and foreground to judge the alignment.&lt;br /&gt;
#'''Apply transform to PET''':  [[Media:RegLib_C20_3_ApplyTransformToPET.mov|(screencast for this step)]]&lt;br /&gt;
##open the [[Documentation/Nightly/Modules/BRAINSResample|''Registration / Resample Volume (BRAINS)'' module]]&lt;br /&gt;
##''Image To Warp: PET_2&lt;br /&gt;
##''Reference Image'': PET_1&lt;br /&gt;
##''Pixel Type'': short&lt;br /&gt;
##''Warping Parameters / Transform file'': &amp;quot;Xf2_BSpline&amp;quot;&lt;br /&gt;
##''Output Image'': create and rename new: &amp;quot;PET_2_Xf2&amp;quot; &lt;br /&gt;
##Leave all other settings at default&lt;br /&gt;
##click: ''Apply''&lt;br /&gt;
##Go to the [[Documentation/Nightly/Modules/Volumes|''Volumes'' module]] and set the PET colormap and threshold for the new volume:&lt;br /&gt;
###''Active Volume'': PET_2_Xf2&lt;br /&gt;
###''Window/Level editor presets'': click on the &amp;quot;PET&amp;quot; preset (3rd button from the left)&lt;br /&gt;
###from ''Threshold'' menu, select &amp;quot;Manual&amp;quot; and set the left/lower threshold to ~ 600. You can also drag the pop-up slider until most of the red background turns to black.&lt;br /&gt;
#'''optional: Visualize Deformation''': install the '' [[Documentation/Nightly/Extensions/TransformVisualizer| ''TransformVisualizer'']]:  [[Media:RegLib_C20_4_InstallTransformVisualizer.mov|(screencast for this step)]] &lt;br /&gt;
##open the [[Documentation/Nightly/SlicerApplication/ExtensionsManager| ''ExtensionsManager'']] [[Image:ExtensionManagerIcon.png|50px]]&lt;br /&gt;
##locate the ''Transform Visualizer&amp;quot; extension. Click on the &amp;quot;Install&amp;quot; button&lt;br /&gt;
##you will need to restart Slicer to complete the installation. '''Make sure to save all your work before restarting.'''&lt;br /&gt;
[[Media:RegLib_C20_4_InstallTransformVisualizer.mov|(screencast for this step)]] &lt;br /&gt;
#'''optional: Visualize Deformation''': use the '' [[Documentation/Nightly/Extensions/TransformVisualizer| ''TransformVisualizer'']]:   [[Media:RegLib_C20_5_UseTransformVisualizer.mov|(screencast for this step)]] &lt;br /&gt;
##upon restart, reload &amp;quot;CT1&amp;quot; and &amp;quot;Xf2_BSpline&amp;quot;&lt;br /&gt;
##to allow fast interactive use we need to subsample the large CT volumes:&lt;br /&gt;
##Go to the  ''Registration / Resize Image (BRAINS)'' module&lt;br /&gt;
###''Image To Warp'': CT_1&lt;br /&gt;
###'''Output Image'': create &amp;amp; rename new: CT_1s&lt;br /&gt;
###''Pixel Type'': short&lt;br /&gt;
###''Scale Factor'': 3&lt;br /&gt;
###Click ''Apply''. This will create a subsampled version of CT_1 that we can use as reference for the Transform Visualizer.&lt;br /&gt;
## under ''All Modules'' select the TransformVisualizer&lt;br /&gt;
###''Input/Deformation'': select &amp;quot;Xf2_BSpline&amp;quot;&lt;br /&gt;
###&amp;quot;Reference Image'': select the &amp;quot;CT_1s&amp;quot; we created above&lt;br /&gt;
###''Output Model'': create &amp;amp; rename new Model. e.g. rename to &amp;quot;Xf2_DeformationModel'' &lt;br /&gt;
###''Visualization Mode'': e.g. select &amp;quot;Block&amp;quot;&lt;br /&gt;
###click ''Apply''. You will see a model of the deformation field in the 3D view.&lt;br /&gt;
###Go to the  [[Documentation/Nightly/Modules/Models|''Models'' module]] &lt;br /&gt;
###select the new model and reduce the opacity for better visibility.&lt;br /&gt;
###experiment with other view types, esp. GridSlice , Glyph, Contour.&lt;br /&gt;
&lt;br /&gt;
==Registration Results==&lt;br /&gt;
&lt;br /&gt;
{|cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot;&lt;br /&gt;
|[[Image:RegLib_C20_unregistered.gif|300px]] before registration (click to enlarge)&lt;br /&gt;
|-&lt;br /&gt;
|[[Image:RegLib_C20_registered.gif|300px]] after affine+nonrigid registration (click to enlarge)&lt;br /&gt;
|-&lt;br /&gt;
|[[Image:RegLib_C20_registered2.gif|300px]] after affine+nonrigid registration (click to enlarge)&lt;br /&gt;
|-&lt;br /&gt;
|[[Image:RegLib_C20_DeformationGrid.png|300px]] BSpline deformation grid (click to enlarge)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Acknowledgments ===&lt;/div&gt;</summary>
		<author><name>Meier</name></author>
		
	</entry>
</feed>