https://public.kitware.com/Wiki/index.php?title=ITK/Examples/Registration/MutualInformation&feed=atom&action=history
ITK/Examples/Registration/MutualInformation - Revision history
2024-03-28T12:44:58Z
Revision history for this page on the wiki
MediaWiki 1.38.6
https://public.kitware.com/Wiki/index.php?title=ITK/Examples/Registration/MutualInformation&diff=63708&oldid=prev
Mathew-seng: Deprecated content that is moved to sphinx
2019-06-07T15:05:24Z
<p>Deprecated content that is moved to sphinx</p>
<a href="https://public.kitware.com/Wiki/index.php?title=ITK/Examples/Registration/MutualInformation&diff=63708&oldid=50976">Show changes</a>
Mathew-seng
https://public.kitware.com/Wiki/index.php?title=ITK/Examples/Registration/MutualInformation&diff=50976&oldid=prev
Lorensen at 17:26, 25 December 2012
2012-12-25T17:26:10Z
<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 17:26, 25 December 2012</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l351">Line 351:</td>
<td colspan="2" class="diff-lineno">Line 351:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></source></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></source></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>{{ITKCMakeLists|<del style="font-weight: bold; text-decoration: none;">MutualInformation</del>}}</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>{{ITKCMakeLists|<ins style="font-weight: bold; text-decoration: none;">{{SUBPAGENAME}}</ins>}}</div></td></tr>
</table>
Lorensen
https://public.kitware.com/Wiki/index.php?title=ITK/Examples/Registration/MutualInformation&diff=49449&oldid=prev
Lorensen at 00:10, 26 November 2012
2012-11-26T00:10:23Z
<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 00:10, 26 November 2012</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l351">Line 351:</td>
<td colspan="2" class="diff-lineno">Line 351:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></source></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></source></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>{{<del style="font-weight: bold; text-decoration: none;">ITKVTKCMakeLists</del>|MutualInformation}}</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>{{<ins style="font-weight: bold; text-decoration: none;">ITKCMakeLists</ins>|MutualInformation}}</div></td></tr>
</table>
Lorensen
https://public.kitware.com/Wiki/index.php?title=ITK/Examples/Registration/MutualInformation&diff=49448&oldid=prev
Lorensen at 00:08, 26 November 2012
2012-11-26T00:08:42Z
<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 00:08, 26 November 2012</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l351">Line 351:</td>
<td colspan="2" class="diff-lineno">Line 351:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></source></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></source></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">==CMakeLists.txt==</del></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">{{ITKVTKCMakeLists|</ins>MutualInformation}<ins style="font-weight: bold; text-decoration: none;">}</ins></div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"><source lang="cmake"></del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">cmake_minimum_required(VERSION 2.6)</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">PROJECT(</del>MutualInformation<del style="font-weight: bold; text-decoration: none;">)</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">FIND_PACKAGE(ITK REQUIRED)</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">INCLUDE(${ITK_USE_FILE</del>}<del style="font-weight: bold; text-decoration: none;">)</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">ADD_EXECUTABLE(MutualInformation MutualInformation.cxx)</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">TARGET_LINK_LIBRARIES(MutualInformation ITKIO ITKNumerics)</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></source></del></div></td><td colspan="2" class="diff-side-added"></td></tr>
</table>
Lorensen
https://public.kitware.com/Wiki/index.php?title=ITK/Examples/Registration/MutualInformation&diff=44557&oldid=prev
Lorensen: ITKv4 API change
2011-12-11T16:36:55Z
<p>ITKv4 API change</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 16:36, 11 December 2011</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l187">Line 187:</td>
<td colspan="2" class="diff-lineno">Line 187:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> try</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> try</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> {</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> {</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> registration-><del style="font-weight: bold; text-decoration: none;">StartRegistration</del>();</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> registration-><ins style="font-weight: bold; text-decoration: none;">Update</ins>();</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> std::cout << "Optimizer stop condition: "</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> std::cout << "Optimizer stop condition: "</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> << registration->GetOptimizer()->GetStopConditionDescription()</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> << registration->GetOptimizer()->GetStopConditionDescription()</div></td></tr>
</table>
Lorensen
https://public.kitware.com/Wiki/index.php?title=ITK/Examples/Registration/MutualInformation&diff=37867&oldid=prev
Lorensen: Procedures should be static for test driver
2011-02-23T04:23:58Z
<p>Procedures should be static for test driver</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 04:23, 23 February 2011</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l19">Line 19:</td>
<td colspan="2" class="diff-lineno">Line 19:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>typedef itk::Image< PixelType, Dimension > ImageType;</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>typedef itk::Image< PixelType, Dimension > ImageType;</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>void CreateEllipseImage(ImageType::Pointer image);</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">static </ins>void CreateEllipseImage(ImageType::Pointer image);</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>void CreateCircleImage(ImageType::Pointer image);</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">static </ins>void CreateCircleImage(ImageType::Pointer image);</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>int main( int argc, char *argv[] )</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>int main( int argc, char *argv[] )</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l349">Line 349:</td>
<td colspan="2" class="diff-lineno">Line 349:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> image->Graft(imageFilter->GetOutput());</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> image->Graft(imageFilter->GetOutput());</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>}</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>}</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></source></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></source></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
</table>
Lorensen
https://public.kitware.com/Wiki/index.php?title=ITK/Examples/Registration/MutualInformation&diff=36331&oldid=prev
Daviddoria: Created page with "==MutualInformation.cxx== <source lang="cpp"> #include "itkImageRegistrationMethod.h" #include "itkTranslationTransform.h" #include "itkMutualInformationImageToImageMetric.h" #in..."
2011-01-07T17:44:30Z
<p>Created page with "==MutualInformation.cxx== <source lang="cpp"> #include "itkImageRegistrationMethod.h" #include "itkTranslationTransform.h" #include "itkMutualInformationImageToImageMetric.h" #in..."</p>
<p><b>New page</b></p><div>==MutualInformation.cxx==<br />
<source lang="cpp"><br />
#include "itkImageRegistrationMethod.h"<br />
#include "itkTranslationTransform.h"<br />
#include "itkMutualInformationImageToImageMetric.h"<br />
#include "itkGradientDescentOptimizer.h"<br />
#include "itkNormalizeImageFilter.h"<br />
#include "itkDiscreteGaussianImageFilter.h"<br />
#include "itkResampleImageFilter.h"<br />
#include "itkCastImageFilter.h"<br />
#include "itkCheckerBoardImageFilter.h"<br />
#include "itkEllipseSpatialObject.h"<br />
#include "itkSpatialObjectToImageFilter.h"<br />
#include "itkImageFileWriter.h"<br />
<br />
const unsigned int Dimension = 2;<br />
typedef unsigned char PixelType;<br />
<br />
typedef itk::Image< PixelType, Dimension > ImageType;<br />
<br />
void CreateEllipseImage(ImageType::Pointer image);<br />
void CreateCircleImage(ImageType::Pointer image);<br />
<br />
int main( int argc, char *argv[] )<br />
{<br />
// Generate synthetic fixed and moving images<br />
ImageType::Pointer fixedImage = ImageType::New();<br />
CreateCircleImage(fixedImage);<br />
ImageType::Pointer movingImage = ImageType::New();<br />
CreateEllipseImage(movingImage);<br />
<br />
// Write the two synthetic inputs<br />
typedef itk::ImageFileWriter< ImageType > WriterType;<br />
<br />
WriterType::Pointer fixedWriter = WriterType::New();<br />
fixedWriter->SetFileName("fixed.png");<br />
fixedWriter->SetInput( fixedImage);<br />
fixedWriter->Update();<br />
<br />
WriterType::Pointer movingWriter = WriterType::New();<br />
movingWriter->SetFileName("moving.png");<br />
movingWriter->SetInput( movingImage);<br />
movingWriter->Update();<br />
<br />
// We use floats internally<br />
typedef float InternalPixelType;<br />
typedef itk::Image< float, 2> InternalImageType;<br />
<br />
// Normalize the images<br />
typedef itk::NormalizeImageFilter<ImageType, InternalImageType> NormalizeFilterType;<br />
<br />
NormalizeFilterType::Pointer fixedNormalizer = NormalizeFilterType::New();<br />
NormalizeFilterType::Pointer movingNormalizer = NormalizeFilterType::New();<br />
<br />
fixedNormalizer->SetInput( fixedImage);<br />
movingNormalizer->SetInput( movingImage);<br />
<br />
// Smooth the normalized images<br />
typedef itk::DiscreteGaussianImageFilter<InternalImageType,InternalImageType> GaussianFilterType;<br />
<br />
GaussianFilterType::Pointer fixedSmoother = GaussianFilterType::New();<br />
GaussianFilterType::Pointer movingSmoother = GaussianFilterType::New();<br />
<br />
fixedSmoother->SetVariance( 2.0 );<br />
movingSmoother->SetVariance( 2.0 );<br />
<br />
fixedSmoother->SetInput( fixedNormalizer->GetOutput() );<br />
movingSmoother->SetInput( movingNormalizer->GetOutput() );<br />
<br />
typedef itk::TranslationTransform< double, Dimension > TransformType;<br />
typedef itk::GradientDescentOptimizer OptimizerType;<br />
typedef itk::LinearInterpolateImageFunction<<br />
InternalImageType,<br />
double > InterpolatorType;<br />
typedef itk::ImageRegistrationMethod<<br />
InternalImageType,<br />
InternalImageType > RegistrationType;<br />
typedef itk::MutualInformationImageToImageMetric<<br />
InternalImageType,<br />
InternalImageType > MetricType;<br />
<br />
TransformType::Pointer transform = TransformType::New();<br />
OptimizerType::Pointer optimizer = OptimizerType::New();<br />
InterpolatorType::Pointer interpolator = InterpolatorType::New();<br />
RegistrationType::Pointer registration = RegistrationType::New();<br />
<br />
registration->SetOptimizer( optimizer );<br />
registration->SetTransform( transform );<br />
registration->SetInterpolator( interpolator );<br />
<br />
MetricType::Pointer metric = MetricType::New();<br />
registration->SetMetric( metric );<br />
<br />
// The metric requires a number of parameters to be selected, including<br />
// the standard deviation of the Gaussian kernel for the fixed image<br />
// density estimate, the standard deviation of the kernel for the moving<br />
// image density and the number of samples use to compute the densities<br />
// and entropy values. Details on the concepts behind the computation of<br />
// the metric can be found in Section<br />
// \ref{sec:MutualInformationMetric}. Experience has<br />
// shown that a kernel standard deviation of $0.4$ works well for images<br />
// which have been normalized to a mean of zero and unit variance. We<br />
// will follow this empirical rule in this example.<br />
<br />
metric->SetFixedImageStandardDeviation( 0.4 );<br />
metric->SetMovingImageStandardDeviation( 0.4 );<br />
<br />
registration->SetFixedImage( fixedSmoother->GetOutput() );<br />
registration->SetMovingImage( movingSmoother->GetOutput() );<br />
<br />
fixedNormalizer->Update();<br />
ImageType::RegionType fixedImageRegion =<br />
fixedNormalizer->GetOutput()->GetBufferedRegion();<br />
registration->SetFixedImageRegion( fixedImageRegion );<br />
<br />
typedef RegistrationType::ParametersType ParametersType;<br />
ParametersType initialParameters( transform->GetNumberOfParameters() );<br />
<br />
initialParameters[0] = 0.0; // Initial offset along X<br />
initialParameters[1] = 0.0; // Initial offset along Y<br />
<br />
registration->SetInitialTransformParameters( initialParameters );<br />
<br />
// Software Guide : BeginLatex<br />
//<br />
// We should now define the number of spatial samples to be considered in<br />
// the metric computation. Note that we were forced to postpone this setting<br />
// until we had done the preprocessing of the images because the number of<br />
// samples is usually defined as a fraction of the total number of pixels in<br />
// the fixed image.<br />
//<br />
// The number of spatial samples can usually be as low as $1\%$ of the total<br />
// number of pixels in the fixed image. Increasing the number of samples<br />
// improves the smoothness of the metric from one iteration to another and<br />
// therefore helps when this metric is used in conjunction with optimizers<br />
// that rely of the continuity of the metric values. The trade-off, of<br />
// course, is that a larger number of samples result in longer computation<br />
// times per every evaluation of the metric.<br />
//<br />
// It has been demonstrated empirically that the number of samples is not a<br />
// critical parameter for the registration process. When you start fine<br />
// tuning your own registration process, you should start using high values<br />
// of number of samples, for example in the range of $20\%$ to $50\%$ of the<br />
// number of pixels in the fixed image. Once you have succeeded to register<br />
// your images you can then reduce the number of samples progressively until<br />
// you find a good compromise on the time it takes to compute one evaluation<br />
// of the Metric. Note that it is not useful to have very fast evaluations<br />
// of the Metric if the noise in their values results in more iterations<br />
// being required by the optimizer to converge. You must then study the<br />
// behavior of the metric values as the iterations progress.<br />
<br />
const unsigned int numberOfPixels = fixedImageRegion.GetNumberOfPixels();<br />
<br />
const unsigned int numberOfSamples =<br />
static_cast< unsigned int >( numberOfPixels * 0.01 );<br />
<br />
metric->SetNumberOfSpatialSamples( numberOfSamples );<br />
<br />
// Since larger values of mutual information indicate better matches than<br />
// smaller values, we need to maximize the cost function in this example.<br />
// By default the GradientDescentOptimizer class is set to minimize the<br />
// value of the cost-function. It is therefore necessary to modify its<br />
// default behavior by invoking the \code{MaximizeOn()} method.<br />
// Additionally, we need to define the optimizer's step size using the<br />
// \code{SetLearningRate()} method.<br />
<br />
optimizer->SetLearningRate( 15.0 );<br />
optimizer->SetNumberOfIterations( 200 );<br />
optimizer->MaximizeOn(); // We want to maximize mutual information (the default of the optimizer is to minimize)<br />
<br />
// Note that large values of the learning rate will make the optimizer<br />
// unstable. Small values, on the other hand, may result in the optimizer<br />
// needing too many iterations in order to walk to the extrema of the cost<br />
// function. The easy way of fine tuning this parameter is to start with<br />
// small values, probably in the range of $\{5.0,10.0\}$. Once the other<br />
// registration parameters have been tuned for producing convergence, you<br />
// may want to revisit the learning rate and start increasing its value until<br />
// you observe that the optimization becomes unstable. The ideal value for<br />
// this parameter is the one that results in a minimum number of iterations<br />
// while still keeping a stable path on the parametric space of the<br />
// optimization. Keep in mind that this parameter is a multiplicative factor<br />
// applied on the gradient of the Metric. Therefore, its effect on the<br />
// optimizer step length is proportional to the Metric values themselves.<br />
// Metrics with large values will require you to use smaller values for the<br />
// learning rate in order to maintain a similar optimizer behavior.<br />
<br />
try<br />
{<br />
registration->StartRegistration();<br />
std::cout << "Optimizer stop condition: "<br />
<< registration->GetOptimizer()->GetStopConditionDescription()<br />
<< std::endl;<br />
}<br />
catch( itk::ExceptionObject & err )<br />
{<br />
std::cout << "ExceptionObject caught !" << std::endl;<br />
std::cout << err << std::endl;<br />
return EXIT_FAILURE;<br />
}<br />
<br />
ParametersType finalParameters = registration->GetLastTransformParameters();<br />
<br />
double TranslationAlongX = finalParameters[0];<br />
double TranslationAlongY = finalParameters[1];<br />
<br />
unsigned int numberOfIterations = optimizer->GetCurrentIteration();<br />
<br />
double bestValue = optimizer->GetValue();<br />
<br />
<br />
// Print out results<br />
std::cout << std::endl;<br />
std::cout << "Result = " << std::endl;<br />
std::cout << " Translation X = " << TranslationAlongX << std::endl;<br />
std::cout << " Translation Y = " << TranslationAlongY << std::endl;<br />
std::cout << " Iterations = " << numberOfIterations << std::endl;<br />
std::cout << " Metric value = " << bestValue << std::endl;<br />
std::cout << " Numb. Samples = " << numberOfSamples << std::endl;<br />
<br />
typedef itk::ResampleImageFilter<<br />
ImageType,<br />
ImageType > ResampleFilterType;<br />
<br />
TransformType::Pointer finalTransform = TransformType::New();<br />
<br />
finalTransform->SetParameters( finalParameters );<br />
finalTransform->SetFixedParameters( transform->GetFixedParameters() );<br />
<br />
ResampleFilterType::Pointer resample = ResampleFilterType::New();<br />
<br />
resample->SetTransform( finalTransform );<br />
resample->SetInput( movingImage);<br />
<br />
resample->SetSize( fixedImage->GetLargestPossibleRegion().GetSize() );<br />
resample->SetOutputOrigin( fixedImage->GetOrigin() );<br />
resample->SetOutputSpacing( fixedImage->GetSpacing() );<br />
resample->SetOutputDirection( fixedImage->GetDirection() );<br />
resample->SetDefaultPixelValue( 100 );<br />
<br />
WriterType::Pointer writer = WriterType::New();<br />
writer->SetFileName("output.png");<br />
writer->SetInput( resample->GetOutput() );<br />
writer->Update();<br />
<br />
return EXIT_SUCCESS;<br />
}<br />
<br />
<br />
void CreateEllipseImage(ImageType::Pointer image)<br />
{<br />
typedef itk::EllipseSpatialObject< Dimension > EllipseType;<br />
<br />
typedef itk::SpatialObjectToImageFilter<<br />
EllipseType, ImageType > SpatialObjectToImageFilterType;<br />
<br />
SpatialObjectToImageFilterType::Pointer imageFilter =<br />
SpatialObjectToImageFilterType::New();<br />
<br />
ImageType::SizeType size;<br />
size[ 0 ] = 100;<br />
size[ 1 ] = 100;<br />
<br />
imageFilter->SetSize( size );<br />
<br />
ImageType::SpacingType spacing;<br />
spacing.Fill(1);<br />
imageFilter->SetSpacing(spacing);<br />
<br />
EllipseType::Pointer ellipse = EllipseType::New();<br />
EllipseType::ArrayType radiusArray;<br />
radiusArray[0] = 10;<br />
radiusArray[1] = 20;<br />
ellipse->SetRadius(radiusArray);<br />
<br />
typedef EllipseType::TransformType TransformType;<br />
TransformType::Pointer transform = TransformType::New();<br />
transform->SetIdentity();<br />
<br />
TransformType::OutputVectorType translation;<br />
TransformType::CenterType center;<br />
<br />
translation[ 0 ] = 65;<br />
translation[ 1 ] = 45;<br />
transform->Translate( translation, false );<br />
<br />
ellipse->SetObjectToParentTransform( transform );<br />
<br />
imageFilter->SetInput(ellipse);<br />
<br />
ellipse->SetDefaultInsideValue(255);<br />
ellipse->SetDefaultOutsideValue(0);<br />
imageFilter->SetUseObjectValue( true );<br />
imageFilter->SetOutsideValue( 0 );<br />
<br />
imageFilter->Update();<br />
<br />
image->Graft(imageFilter->GetOutput());<br />
<br />
}<br />
<br />
void CreateCircleImage(ImageType::Pointer image)<br />
{<br />
typedef itk::EllipseSpatialObject< Dimension > EllipseType;<br />
<br />
typedef itk::SpatialObjectToImageFilter<<br />
EllipseType, ImageType > SpatialObjectToImageFilterType;<br />
<br />
SpatialObjectToImageFilterType::Pointer imageFilter =<br />
SpatialObjectToImageFilterType::New();<br />
<br />
ImageType::SizeType size;<br />
size[ 0 ] = 100;<br />
size[ 1 ] = 100;<br />
<br />
imageFilter->SetSize( size );<br />
<br />
ImageType::SpacingType spacing;<br />
spacing.Fill(1);<br />
imageFilter->SetSpacing(spacing);<br />
<br />
EllipseType::Pointer ellipse = EllipseType::New();<br />
EllipseType::ArrayType radiusArray;<br />
radiusArray[0] = 10;<br />
radiusArray[1] = 10;<br />
ellipse->SetRadius(radiusArray);<br />
<br />
typedef EllipseType::TransformType TransformType;<br />
TransformType::Pointer transform = TransformType::New();<br />
transform->SetIdentity();<br />
<br />
TransformType::OutputVectorType translation;<br />
TransformType::CenterType center;<br />
<br />
translation[ 0 ] = 50;<br />
translation[ 1 ] = 50;<br />
transform->Translate( translation, false );<br />
<br />
ellipse->SetObjectToParentTransform( transform );<br />
<br />
imageFilter->SetInput(ellipse);<br />
<br />
ellipse->SetDefaultInsideValue(255);<br />
ellipse->SetDefaultOutsideValue(0);<br />
imageFilter->SetUseObjectValue( true );<br />
imageFilter->SetOutsideValue( 0 );<br />
<br />
imageFilter->Update();<br />
<br />
image->Graft(imageFilter->GetOutput());<br />
}<br />
<br />
</source><br />
<br />
==CMakeLists.txt==<br />
<source lang="cmake"><br />
cmake_minimum_required(VERSION 2.6)<br />
<br />
PROJECT(MutualInformation)<br />
<br />
FIND_PACKAGE(ITK REQUIRED)<br />
INCLUDE(${ITK_USE_FILE})<br />
<br />
ADD_EXECUTABLE(MutualInformation MutualInformation.cxx)<br />
TARGET_LINK_LIBRARIES(MutualInformation ITKIO ITKNumerics)<br />
<br />
<br />
</source></div>
Daviddoria