<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Ali,</div><div><br></div><div>Glad to hear the registration iteration graphs where effective.</div><div><br></div>Yes, you are right you can initialize the parameters of the second stage affine registration. Specifically the Center. However, it not readily apparent ( no example, no filter/initializer ) how that center fixed parameter should be initialized. And the "CenteredTransformInitializer" is not the correct way.<div><br></div><div><span style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; text-align: justify; background-color: rgb(255, 255, 255);">For a Composite transformed defined as </span><span class="MathJax_Preview" style="color: rgb(136, 136, 136); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; text-align: justify; background-color: rgb(255, 255, 255);"></span><span class="MathJax" id="MathJax-Element-66-Frame" role="textbox" aria-readonly="true" style="display: inline; font-size: 14px; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; border: 0px; padding: 0px; margin: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgb(255, 255, 255);"><nobr style="transition: none; -webkit-transition: none; border: 0px; padding: 0px; margin: 0px; max-width: 5000em; max-height: 5000em; vertical-align: 0px;"><span class="math" id="MathJax-Span-1023" style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 6.875em;"><span style="transition: none; -webkit-transition: none; display: inline-block; position: relative; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 5.714em; height: 0px; font-size: 17px;"><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; clip: rect(1.698em 1000em 2.943em -0.509em); top: -2.56em; left: 0em;"><span class="mrow" id="MathJax-Span-1024" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="mi" id="MathJax-Span-1025" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-family: STIXGeneral-Italic;">ϕ</span><span class="mo" id="MathJax-Span-1026" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px 0px 0px 0.313em; margin: 0px; vertical-align: 0px; font-family: STIXGeneral-Regular;">=</span><span class="msubsup" id="MathJax-Span-1027" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px 0px 0px 0.313em; margin: 0px; vertical-align: 0px;"><span style="transition: none; -webkit-transition: none; display: inline-block; position: relative; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 1.01em; height: 0px;"><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; clip: rect(1.728em 1000em 2.738em -0.477em); top: -2.56em; left: 0em;"><span class="mi" id="MathJax-Span-1028" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-family: STIXGeneral-Italic;">T<span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; overflow: hidden; height: 1px; width: 0.077em;"></span></span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.56em;"></span></span><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; top: -2.112em; left: 0.578em;"><span class="mn" id="MathJax-Span-1029" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXGeneral-Regular;">0</span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.262em;"></span></span></span></span><span class="mo" id="MathJax-Span-1030" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-family: STIXGeneral-Regular;">(</span><span class="msubsup" id="MathJax-Span-1031" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span style="transition: none; -webkit-transition: none; display: inline-block; position: relative; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 1.01em; height: 0px;"><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; clip: rect(1.728em 1000em 2.738em -0.477em); top: -2.56em; left: 0em;"><span class="mi" id="MathJax-Span-1032" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-family: STIXGeneral-Italic;">T<span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; overflow: hidden; height: 1px; width: 0.077em;"></span></span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.56em;"></span></span><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; top: -2.112em; left: 0.578em;"><span class="mn" id="MathJax-Span-1033" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXGeneral-Regular;">1</span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.262em;"></span></span></span></span><span class="mo" id="MathJax-Span-1034" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-family: STIXGeneral-Regular;">(</span><span class="texatom" id="MathJax-Span-1035" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="mrow" id="MathJax-Span-1036" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="mi" id="MathJax-Span-1037" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-family: STIXGeneral; font-weight: bold;">x</span></span></span><span class="mo" id="MathJax-Span-1038" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-family: STIXGeneral-Regular;">)</span><span class="mo" id="MathJax-Span-1039" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-family: STIXGeneral-Regular;">)</span></span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.56em;"></span></span></span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border-width: 0px 0px 0px 0em; border-left-style: solid; padding: 0px; margin: 0px; vertical-align: -0.317em; overflow: hidden; width: 0px; height: 1.208em;"></span></span></nobr></span><span style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; text-align: justify; background-color: rgb(255, 255, 255);"> where </span><span class="MathJax_Preview" style="color: rgb(136, 136, 136); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; text-align: justify; background-color: rgb(255, 255, 255);"></span><span class="MathJax" id="MathJax-Element-67-Frame" role="textbox" aria-readonly="true" style="display: inline; font-size: 14px; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; border: 0px; padding: 0px; margin: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgb(255, 255, 255);"><nobr style="transition: none; -webkit-transition: none; border: 0px; padding: 0px; margin: 0px; max-width: 5000em; max-height: 5000em; vertical-align: 0px;"><span class="math" id="MathJax-Span-1040" style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 10.089em;"><span style="transition: none; -webkit-transition: none; display: inline-block; position: relative; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 8.393em; height: 0px; font-size: 17px;"><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; clip: rect(1.698em 1000em 3.034em -0.509em); top: -2.56em; left: 0em;"><span class="mrow" id="MathJax-Span-1041" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="mi" id="MathJax-Span-1042" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-family: STIXGeneral-Italic;">ϕ</span><span class="mo" id="MathJax-Span-1043" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px 0px 0px 0.313em; margin: 0px; vertical-align: 0px; font-family: STIXGeneral-Regular;">:</span><span class="msubsup" id="MathJax-Span-1044" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px 0px 0px 0.313em; margin: 0px; vertical-align: 0px;"><span style="transition: none; -webkit-transition: none; display: inline-block; position: relative; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 2.337em; height: 0px;"><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; clip: rect(1.705em 1000em 2.738em -0.507em); top: -2.56em; left: 0em;"><span class="mi" id="MathJax-Span-1045" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-family: STIXGeneral-Regular;">Ω</span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.56em;"></span></span><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; top: -2.112em; left: 0.774em;"><span class="texatom" id="MathJax-Span-1046" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="mrow" id="MathJax-Span-1047" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="mi" id="MathJax-Span-1048" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXGeneral-Italic;">f<span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; overflow: hidden; height: 1px; width: 0.103em;"></span></span><span class="mi" id="MathJax-Span-1049" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXGeneral-Italic;">i</span><span class="mi" id="MathJax-Span-1050" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXGeneral-Italic;">x<span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; overflow: hidden; height: 1px; width: 0.002em;"></span></span><span class="mi" id="MathJax-Span-1051" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXGeneral-Italic;">e</span><span class="mi" id="MathJax-Span-1052" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXGeneral-Italic;">d<span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; overflow: hidden; height: 1px; width: 0.019em;"></span></span></span></span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.262em;"></span></span></span></span><span class="mo" id="MathJax-Span-1053" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px 0px 0px 0.313em; margin: 0px; vertical-align: 0px; font-family: STIXGeneral-Regular;">→</span><span class="msubsup" id="MathJax-Span-1054" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px 0px 0px 0.313em; margin: 0px; vertical-align: 0px;"><span style="transition: none; -webkit-transition: none; display: inline-block; position: relative; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 2.992em; height: 0px;"><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; clip: rect(1.705em 1000em 2.738em -0.507em); top: -2.56em; left: 0em;"><span class="mi" id="MathJax-Span-1055" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-family: STIXGeneral-Regular;">Ω</span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.56em;"></span></span><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; top: -2.112em; left: 0.774em;"><span class="texatom" id="MathJax-Span-1056" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="mrow" id="MathJax-Span-1057" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="mi" id="MathJax-Span-1058" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXGeneral-Italic;">m</span><span class="mi" id="MathJax-Span-1059" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXGeneral-Italic;">o</span><span class="mi" id="MathJax-Span-1060" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXGeneral-Italic;">v</span><span class="mi" id="MathJax-Span-1061" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXGeneral-Italic;">i</span><span class="mi" id="MathJax-Span-1062" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXGeneral-Italic;">n</span><span class="mi" id="MathJax-Span-1063" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXGeneral-Italic;">g</span></span></span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.262em;"></span></span></span></span></span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.56em;"></span></span></span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border-width: 0px 0px 0px 0em; border-left-style: solid; padding: 0px; margin: 0px; vertical-align: -0.427em; overflow: hidden; width: 0px; height: 1.318em;"></span></span></nobr></span><span style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; text-align: justify; background-color: rgb(255, 255, 255);"> then if </span><span class="MathJax_Preview" style="color: rgb(136, 136, 136); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; text-align: justify; background-color: rgb(255, 255, 255);"></span><span class="MathJax" id="MathJax-Element-68-Frame" role="textbox" aria-readonly="true" style="display: inline; font-size: 14px; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; border: 0px; padding: 0px; margin: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgb(255, 255, 255);"><nobr style="transition: none; -webkit-transition: none; border: 0px; padding: 0px; margin: 0px; max-width: 5000em; max-height: 5000em; vertical-align: 0px;"><span class="math" id="MathJax-Span-1064" style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0.946em;"><span style="transition: none; -webkit-transition: none; display: inline-block; position: relative; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0.774em; height: 0px; font-size: 17px;"><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; clip: rect(1.69em 1000em 2.757em -0.487em); top: -2.56em; left: 0em;"><span class="mrow" id="MathJax-Span-1065" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="texatom" id="MathJax-Span-1066" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="mrow" id="MathJax-Span-1067" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="mi" id="MathJax-Span-1068" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-family: STIXGeneral; font-weight: bold;">C</span></span></span></span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.56em;"></span></span></span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border-width: 0px 0px 0px 0em; border-left-style: solid; padding: 0px; margin: 0px; vertical-align: -0.094em; overflow: hidden; width: 0px; height: 0.995em;"></span></span></nobr></span><span style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; text-align: justify; background-color: rgb(255, 255, 255);"> such that </span><span class="MathJax_Preview" style="color: rgb(136, 136, 136); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; text-align: justify; background-color: rgb(255, 255, 255);"></span><span class="MathJax" id="MathJax-Element-69-Frame" role="textbox" aria-readonly="true" style="display: inline; font-size: 14px; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; border: 0px; padding: 0px; margin: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgb(255, 255, 255);"><nobr style="transition: none; -webkit-transition: none; border: 0px; padding: 0px; margin: 0px; max-width: 5000em; max-height: 5000em; vertical-align: 0px;"><span class="math" id="MathJax-Span-1069" style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 6.018em;"><span style="transition: none; -webkit-transition: none; display: inline-block; position: relative; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 5em; height: 0px; font-size: 17px;"><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; clip: rect(1.69em 1000em 3.034em -0.487em); top: -2.56em; left: 0em;"><span class="mrow" id="MathJax-Span-1070" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="texatom" id="MathJax-Span-1071" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="mrow" id="MathJax-Span-1072" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="mi" id="MathJax-Span-1073" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-family: STIXGeneral; font-weight: bold;">C</span></span></span><span class="mo" id="MathJax-Span-1074" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px 0px 0px 0.313em; margin: 0px; vertical-align: 0px; font-family: STIXGeneral-Regular;">∈</span><span class="msubsup" id="MathJax-Span-1075" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px 0px 0px 0.313em; margin: 0px; vertical-align: 0px;"><span style="transition: none; -webkit-transition: none; display: inline-block; position: relative; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 2.992em; height: 0px;"><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; clip: rect(1.705em 1000em 2.738em -0.507em); top: -2.56em; left: 0em;"><span class="mi" id="MathJax-Span-1076" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-family: STIXGeneral-Regular;">Ω</span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.56em;"></span></span><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; top: -2.112em; left: 0.774em;"><span class="texatom" id="MathJax-Span-1077" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="mrow" id="MathJax-Span-1078" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="mi" id="MathJax-Span-1079" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXGeneral-Italic;">m</span><span class="mi" id="MathJax-Span-1080" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXGeneral-Italic;">o</span><span class="mi" id="MathJax-Span-1081" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXGeneral-Italic;">v</span><span class="mi" id="MathJax-Span-1082" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXGeneral-Italic;">i</span><span class="mi" id="MathJax-Span-1083" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXGeneral-Italic;">n</span><span class="mi" id="MathJax-Span-1084" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXGeneral-Italic;">g</span></span></span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.262em;"></span></span></span></span></span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.56em;"></span></span></span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border-width: 0px 0px 0px 0em; border-left-style: solid; padding: 0px; margin: 0px; vertical-align: -0.426em; overflow: hidden; width: 0px; height: 1.327em;"></span></span></nobr></span><span style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; text-align: justify; background-color: rgb(255, 255, 255);"> is the correct center initialization for </span><span class="MathJax_Preview" style="color: rgb(136, 136, 136); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; text-align: justify; background-color: rgb(255, 255, 255);"></span><span class="MathJax" id="MathJax-Element-70-Frame" role="textbox" aria-readonly="true" style="display: inline; font-size: 14px; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; border: 0px; padding: 0px; margin: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgb(255, 255, 255);"><nobr style="transition: none; -webkit-transition: none; border: 0px; padding: 0px; margin: 0px; max-width: 5000em; max-height: 5000em; vertical-align: 0px;"><span class="math" id="MathJax-Span-1085" style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 1.161em;"><span style="transition: none; -webkit-transition: none; display: inline-block; position: relative; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0.952em; height: 0px; font-size: 17px;"><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; clip: rect(1.371em 1000em 2.531em -0.477em); top: -2.202em; left: 0em;"><span class="mrow" id="MathJax-Span-1086" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="msubsup" id="MathJax-Span-1087" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span style="transition: none; -webkit-transition: none; display: inline-block; position: relative; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 1.01em; height: 0px;"><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; clip: rect(1.728em 1000em 2.738em -0.477em); top: -2.56em; left: 0em;"><span class="mi" id="MathJax-Span-1088" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-family: STIXGeneral-Italic;">T<span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; overflow: hidden; height: 1px; width: 0.077em;"></span></span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.56em;"></span></span><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; top: -2.112em; left: 0.578em;"><span class="mn" id="MathJax-Span-1089" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXGeneral-Regular;">1</span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.262em;"></span></span></span></span></span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.202em;"></span></span></span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border-width: 0px 0px 0px 0em; border-left-style: solid; padding: 0px; margin: 0px; vertical-align: -0.251em; overflow: hidden; width: 0px; height: 1.106em;"></span></span></nobr></span><span style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; text-align: justify; background-color: rgb(255, 255, 255);">, then the correct center initialization for </span><span class="MathJax_Preview" style="color: rgb(136, 136, 136); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; text-align: justify; background-color: rgb(255, 255, 255);"></span><span class="MathJax" id="MathJax-Element-71-Frame" role="textbox" aria-readonly="true" style="display: inline; font-size: 14px; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; border: 0px; padding: 0px; margin: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgb(255, 255, 255);"><nobr style="transition: none; -webkit-transition: none; border: 0px; padding: 0px; margin: 0px; max-width: 5000em; max-height: 5000em; vertical-align: 0px;"><span class="math" id="MathJax-Span-1090" style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 1.161em;"><span style="transition: none; -webkit-transition: none; display: inline-block; position: relative; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0.952em; height: 0px; font-size: 17px;"><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; clip: rect(1.371em 1000em 2.541em -0.477em); top: -2.202em; left: 0em;"><span class="mrow" id="MathJax-Span-1091" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="msubsup" id="MathJax-Span-1092" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span style="transition: none; -webkit-transition: none; display: inline-block; position: relative; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 1.01em; height: 0px;"><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; clip: rect(1.728em 1000em 2.738em -0.477em); top: -2.56em; left: 0em;"><span class="mi" id="MathJax-Span-1093" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-family: STIXGeneral-Italic;">T<span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; overflow: hidden; height: 1px; width: 0.077em;"></span></span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.56em;"></span></span><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; top: -2.112em; left: 0.578em;"><span class="mn" id="MathJax-Span-1094" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXGeneral-Regular;">0</span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.262em;"></span></span></span></span></span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.202em;"></span></span></span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border-width: 0px 0px 0px 0em; border-left-style: solid; padding: 0px; margin: 0px; vertical-align: -0.263em; overflow: hidden; width: 0px; height: 1.118em;"></span></span></nobr></span><span style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; text-align: justify; background-color: rgb(255, 255, 255);"> when in the composite transform is </span><span class="MathJax_Preview" style="color: rgb(136, 136, 136); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; text-align: justify; background-color: rgb(255, 255, 255);"></span><span class="MathJax" id="MathJax-Element-72-Frame" role="textbox" aria-readonly="true" style="display: inline; font-size: 14px; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; border: 0px; padding: 0px; margin: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgb(255, 255, 255);"><nobr style="transition: none; -webkit-transition: none; border: 0px; padding: 0px; margin: 0px; max-width: 5000em; max-height: 5000em; vertical-align: 0px;"><span class="math" id="MathJax-Span-1095" style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 6.661em;"><span style="transition: none; -webkit-transition: none; display: inline-block; position: relative; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 5.536em; height: 0px; font-size: 17px;"><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; clip: rect(1.523em 1000em 3.026em -0.487em); top: -2.56em; left: 0em;"><span class="mrow" id="MathJax-Span-1096" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="texatom" id="MathJax-Span-1097" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="mrow" id="MathJax-Span-1098" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="msup" id="MathJax-Span-1099" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span style="transition: none; -webkit-transition: none; display: inline-block; position: relative; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 1.146em; height: 0px;"><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; clip: rect(1.69em 1000em 2.757em -0.487em); top: -2.56em; left: 0em;"><span class="mi" id="MathJax-Span-1100" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-family: STIXGeneral; font-weight: bold;">C</span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.56em;"></span></span><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; top: -2.68em; left: 0.774em;"><span class="mo" id="MathJax-Span-1101" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXVariants;">′</span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.262em;"></span></span></span></span></span></span><span class="mo" id="MathJax-Span-1102" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px 0px 0px 0.313em; margin: 0px; vertical-align: 0px; font-family: STIXGeneral-Regular;">=</span><span class="msubsup" id="MathJax-Span-1103" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px 0px 0px 0.313em; margin: 0px; vertical-align: 0px;"><span style="transition: none; -webkit-transition: none; display: inline-block; position: relative; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 1.696em; height: 0px;"><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; clip: rect(1.728em 1000em 2.738em -0.477em); top: -2.56em; left: 0em;"><span class="mi" id="MathJax-Span-1104" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-family: STIXGeneral-Italic;">T<span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; overflow: hidden; height: 1px; width: 0.077em;"></span></span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.56em;"></span></span><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; clip: rect(1.605em 1000em 2.44em -0.49em); top: -2.642em; left: 0.728em;"><span class="texatom" id="MathJax-Span-1105" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="mrow" id="MathJax-Span-1106" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="mo" id="MathJax-Span-1107" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXGeneral-Regular;">−</span><span class="mn" id="MathJax-Span-1108" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXGeneral-Regular;">1</span></span></span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.262em;"></span></span><span style="transition: none; -webkit-transition: none; position: absolute; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; clip: rect(1.605em 1000em 2.45em -0.519em); top: -1.984em; left: 0.578em;"><span class="mn" id="MathJax-Span-1109" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-size: 12px; font-family: STIXGeneral-Regular;">0</span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.262em;"></span></span></span></span><span class="mo" id="MathJax-Span-1110" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-family: STIXGeneral-Regular;">(</span><span class="texatom" id="MathJax-Span-1111" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="mrow" id="MathJax-Span-1112" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px;"><span class="mi" id="MathJax-Span-1113" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-family: STIXGeneral; font-weight: bold;">C</span></span></span><span class="mo" id="MathJax-Span-1114" style="transition: none; -webkit-transition: none; display: inline; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; font-family: STIXGeneral-Regular;">)</span></span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border: 0px; padding: 0px; margin: 0px; vertical-align: 0px; width: 0px; height: 2.56em;"></span></span></span><span style="transition: none; -webkit-transition: none; display: inline-block; position: static; border-width: 0px 0px 0px 0em; border-left-style: solid; padding: 0px; margin: 0px; vertical-align: -0.417em; overflow: hidden; width: 0px; height: 1.518em;"></span></span></nobr></span><span style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; text-align: justify; background-color: rgb(255, 255, 255);">.</span></div><div><br></div><div>Cool pasting from the IPython Notebook with inline latex appears to have worked :)</div><div><br></div><div>While it is easy to do this with the MomentsCaluclator and manually doing the transform inverse, I think to make it more readily apparent and easier to use it should be available as a filter/initializer.</div><div><br></div><div>There are several things that are done manually in the examples that I would think should be updated to use the latest filters and initializers. For example The BSplines are manually initialized instead of using the BSplineTransform Initializer[1]. Additionally, conversion of BSpline to a deformation field[2], and the the upsampling of the BSpine[3], though that last one still looks like ITKv3 framework, so maybe it'll be updated to the adaptors with v4. However I am after simple functions for these common tasks for SimpleITK, so I have a bit different perspective then one who is OK with implementing a 50 line solution in C++ and being OK with the interface.</div><div><br></div><div>We'll discuss these initialization issue further this afternoon.</div><div><br></div><div>Brad</div><div><br></div><div>[1] <a href="https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration4.cxx#L215-L235">https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration4.cxx#L215-L235</a></div><div>[2] <a href="https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration4.cxx#L401-L430">https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration4.cxx#L401-L430</a></div><div>[3] <a href="https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration6.cxx#L273-L330">https://github.com/InsightSoftwareConsortium/ITK/blob/master/Examples/RegistrationITKv4/DeformableRegistration6.cxx#L273-L330</a></div><div><div><br><div><div>On Aug 4, 2014, at 11:56 PM, Ghayoor, Ali <<a href="mailto:ali-ghayoor@uiowa.edu">ali-ghayoor@uiowa.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif;">
<div>Hello Brad,</div>
<div><br>
</div>
<div>It is an awesome way for demonstration, and thanks for verification of my example. It seems that this email is sent on Saturday, but unfortunately I got that this morning! And I should inspect the reason! </div>
<div>Anyway, over the weekend I ran almost the same experiment in ITK and got close results to you.</div>
<div><br>
</div>
<div>Also, today I tried to make the registration process work when Affine Transform is used in a multi stage structure, and here is my suggestion:</div>
<div><br>
</div>
<div>I think we do not need to bother ourselves to think about a new optimizer or a new initializer for the composite transform since we can initialize the fixed parameters of each transform individually at the beginning of each stage.</div>
<div><br>
</div>
<div>Remember how we run a BSpline registration stage after some linear registrations. At the beginning of the BSpline stage, we should instantiate a BSpline transform object and define its fixed parameters (grid size, etc). Then, we pass this initialized transform
to the registration filter using “SetInitialTransform()”, yet we can initialize this stage by passing a composite transform, resultant from the previous stages, to the registration filter by “SetMovingInitialTransform()”.</div>
<div><br>
</div>
<div>The same condition holds for all other transform types with fixed unoptimizable parameters like the center of rotation in our Affine transform case. Attachment file includes a multi stage registration example that I have created for the new software guide.
In this example, we use a simple 2 stages registration process for a multi modal problem that moving image is misaligned from the fixed image by a translation shift and rotation. In registration process, a translation transform is followed by an affine transform.
Also, an initial transform is used at the beginning.</div>
<div><br>
</div>
<div>If I do not set the center of the affine transform, the registration fails as you have shown in your Ipython example. However, if at the beginning of the second stage, I compute the geometrical center (or center of the mass) of the fixed image, and pass
that to the affine transform using “SetCenter()” or “SetFixedParameters()”, the registration succeeds. Please take a quick look in the attached file that also includes lots of explanations. </div>
<div><br>
</div>
<div>Therefore, we can follow the same procedure for all other transform types that their fixed parameters are important in the optimization, but those fixed parameters cannot be set explicitly inside a composite transform. Please let me know with you think
about this.</div>
<div><br>
</div>
<div>Thank you,</div>
<div>Ali</div>
<div><br>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family: Calibri; font-size: 11pt; text-align: left; border-width: 1pt medium medium; border-style: solid none none; padding: 3pt 0in 0in; border-top-color: rgb(181, 196, 223);">
<span style="font-weight:bold">From: </span>Bradley Lowekamp <<a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a>><br>
<span style="font-weight:bold">Date: </span>Saturday, August 2, 2014 at 6:48 PM<br>
<span style="font-weight:bold">To: </span>Ali Ghayoor <<a href="mailto:ali-ghayoor@uiowa.edu">ali-ghayoor@uiowa.edu</a>><br>
<span style="font-weight:bold">Cc: </span>Hans Johnson <<a href="mailto:hans-johnson@uiowa.edu">hans-johnson@uiowa.edu</a>>, Insight Developers List <<a href="mailto:insight-developers@public.kitware.com">insight-developers@public.kitware.com</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [ITK-dev] [ITK] Optimizing composite transforms and center of transform<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
Hello Ali,
<div><br>
</div>
<div>I created a notebook to try to demonstrate the problem you are describing:</div>
<div><a href="http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/blob/master/Importance%20of%20Center%20with%20Affine%20Registration.ipynb">http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/blob/master/Importance%20of%20Center%20with%20Affine%20Registration.ipynb</a></div>
<div><br>
</div>
<div>If the center of an Affine transformation isn't correctly initialized then the optimization is not speedy or robust. I think it's best illustrated with these two graphs:</div>
<div><br>
</div>
<div>
<div style="margin: 0px;"><span><unknown.png></span></div>
</div>
<div style="margin: 0px;">
<div style="margin: 0px;"><span><unknown.png></span></div>
<div style="margin: 0px;"><br>
</div>
<div style="margin: 0px;">Notice that with the Center being the origin, all 1000 iterations are exhausted, and the metric is slowing decreasing. And this is with the translation path being around the length to 10. If the spacing was bigger or more offset from
the origin the situation would be worse.</div>
<div style="margin: 0px;"><br>
</div>
<div style="margin: 0px;">I don't think this is a bug with the registration framework. I think new initializers for composite transforms are needed, along with documentation how the 2 good ways to initialize the registration methods transforms.</div>
<div style="margin: 0px;"><br>
</div>
<div style="margin: 0px;"><br>
</div>
<div style="margin: 0px;">Brad</div>
</div>
<div><br>
<div>
<div>On Aug 1, 2014, at 8:08 PM, Ghayoor, Ali <<a href="mailto:ali-ghayoor@uiowa.edu">ali-ghayoor@uiowa.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">Brad,<br>
<br>
I have exactly the same issue. I wrote a simple registration program that is run in two stages:<br>
-Translation<br>
-Affine<br>
<br>
My fixed and moving images are in 2D, and the moving image is created from the fixed image by<br>
rotation of 10 degree and translation of [13,17] in X and Y directions.<br>
<br>
The first stage does a translation registration and the result transform is added to a composite transform<br>
that is used as the initial moving transform of the second stage.<br>
<br>
After the registration the result transform of the second stage is also added to the composite transform<br>
to be used by the resampler.<br>
<br>
I have printed the composite transform to the screen:<br>
<br>
2481: CompositeTransform (0x7fa359a18b00)<br>
2481: RTTI typeinfo: itk::CompositeTransform<double, 2u><br>
2481: Reference Count: 2<br>
2481: Modified Time: 20949<br>
2481: Debug: Off<br>
2481: Object Name: <br>
2481: Observers: <br>
2481: none<br>
2481: Transforms in queue, from begin to end:<br>
2481: >>>>>>>>><br>
2481: TranslationTransform (0x7fa359a199b0)<br>
2481: RTTI typeinfo: itk::TranslationTransform<double, 2u><br>
2481: Reference Count: 7<br>
2481: Modified Time: 1648<br>
2481: Debug: Off<br>
2481: Object Name: <br>
2481: Observers: <br>
2481: none<br>
2481: Offset: [12.801, 15.8578]<br>
2481: >>>>>>>>><br>
2481: AffineTransform (0x7fa359d095a0)<br>
2481: RTTI typeinfo: itk::AffineTransform<double, 2u><br>
2481: Reference Count: 5<br>
2481: Modified Time: 20946<br>
2481: Debug: Off<br>
2481: Object Name: <br>
2481: Observers: <br>
2481: none<br>
2481: Matrix: <br>
2481: 1.01593 -0.0100051 <br>
2481: -0.00835669 1.01113 <br>
2481: Offset: [-0.358829, -0.290093]<br>
2481: Center: [0, 0]<br>
2481: Translation: [-0.358829, -0.290093]<br>
2481: Inverse: <br>
2481: 0.984397 0.00974056 <br>
2481: 0.00813575 0.989073 <br>
2481: Singular: 0<br>
2481: End of MultiTransform.<br>
2481: <<<<<<<<<<<br>
<br>
As it can be seen, the translation transform provides a good initialization since its offset (Offset: [12.801, 15.8578]) is close to the shift parameters.<br>
<br>
However, the Affine transform fails to rotate the moving image since its Matrix is almost identity.<br>
Possible reason can be the improper Center of Affine transform that is fixed to [0,0], and not at geometrical center or center of mass.<br>
<br>
To make sure that I have not made any crazy mistake in my example, I simulated my example parameters in ANTs, and ANTs returned<br>
the same results and failed to register the images!!<br>
<br>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">ANTs command line <<<<<<<<<<<<br>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<br>
PROGPATH=/scratch/ANTS/release-new/bin<br>
fi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainT1SliceBorder20.png<br>
mi=/scratch/ITK-softwareGuide/release/ITKv4/Examples/Data/BrainProtonDensitySliceR10X13Y17.png<br>
<br>
time ${PROGPATH}/antsRegistration -d 2 \<br>
--float \<br>
--output [test1, warpedMoving.nii.gz] \<br>
--transform "Translation[16]" \<br>
--metric MI[${fi},${mi},1,32,None,1] \<br>
--convergence [100,1e-2,5] \<br>
--shrink-factors 3 \<br>
--smoothing-sigmas 2 \<br>
--use-histogram-matching 1 \<br>
\<br>
--transform "Affine[1]" \<br>
--metric MI[${fi},${mi},1,32] \<br>
--convergence [100x100,1e-2,2] \<br>
--shrink-factors 2x1 \<br>
--smoothing-sigmas 1x0 \<br>
--use-histogram-matching 1<br>
<br>
<<<<<<<<<<<<<<<<<<<<<<<<<br>
<br>
Fixed and moving images can be loaded from the ITK data files. What do you think about this example? Is it a bug in ITK or just the parameters are not tuned finely?<br>
<br>
Thanks,<br>
Ali<br>
<br>
________________________________________<br>
From: Johnson, Hans J<br>
Sent: Tuesday, July 29, 2014 6:19 PM<br>
To: Ghayoor, Ali<br>
Subject: FW: [ITK-dev] [ITK] Optimizing composite transforms and center of transform<br>
<br>
Ali,<br>
<br>
You need to follow this discussion.<br>
<br>
Hans<br>
<br>
On 7/29/14, 6:16 PM, "Bradley Lowekamp" <<a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a>> wrote:<br>
<br>
<blockquote type="cite">Hello,<br>
<br>
Ok, to further explore this problem, and hopeful help other people too: I<br>
created an IPython Notebook viewable here:<br>
<a href="http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/bl">http://nbviewer.ipython.org/github/blowekamp/SimpleITK-Notebook-Answers/bl</a><br>
ob/master/Transform%20Composition%20And%20Order.ipynb<br>
<br>
It doesn't come through on the static page, but I added some nifty<br>
interactive slider widgets to change the rotation parameter. Which is<br>
really the point to enable understanding of the parameters for the<br>
transform and how they should be best optimized. The notebook should work<br>
with SimpleITK >= 0.8 and IPython Notebooks 2.1. I'll encourage every one<br>
to try it out :) IPython Notebooks widget are very cool!<br>
<br>
EXPLANATION:<br>
<br>
The the order of the composite transform is that the new transforms are<br>
applied first.<br>
<br>
BUT they map from the virtual domain ( fixed ) to the moving image.<br>
Therefore if your first transform moves the center of mass to the origin<br>
then the second added transform's space will be centered on the mass,<br>
which is good for optimizing rotation and affine parameters.<br>
<br>
QUESTION:<br>
<br>
Therefore I am inclined to conclude that its best practices to map the<br>
fixed and moving image to the virtual domain such that the center of mass<br>
( or some other "center feature" ) are at the origin. This would then the<br>
scale, rotation and other affine parameters around the center, with out<br>
having to used the "Center" parameter the transforms currently have.<br>
<br>
Is this what others are doing in their registration? For general best<br>
practices should this be recommend?<br>
<br>
@Brian I know I have seen this multi-domain description many time, but I<br>
think I may have just gotten it... Is the well describe in the literature<br>
some place? I think this may be an important part add the software guide.<br>
<br>
Thanks,<br>
Brad<br>
<br>
<br>
<br>
<br>
On Jul 29, 2014, at 5:38 PM, Matt McCormick <<a href="mailto:matt.mccormick@kitware.com">matt.mccormick@kitware.com</a>><br>
wrote:<br>
<br>
<blockquote type="cite">Hi Brad,<br>
<br>
Your assessment that the fixed center is important is correct.<br>
<br>
In most cases, a transform with a Center is the first transform in a<br>
Composite transform. There not any issues here. However, if the<br>
transform with a Center is further along the chain, then a<br>
CenteredTransformInitializer that was applied before the registration<br>
is started will not generate the desired result. In this case, we<br>
would have to respond to an Event in the registration process and<br>
estimated the center on the imaged after the other transforms have<br>
been applied. It is more work, but it is a more unusual case.<br>
<br>
HTH,<br>
Matt<br>
<br>
<br>
<br>
On Mon, Jul 28, 2014 at 10:11 PM, Bradley Lowekamp<br>
<<a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a>> wrote:<br>
<blockquote type="cite">Helloo Nick!<br>
<br>
I am glad you got back to me.<br>
<br>
I suspect that I have spent more time this past week looking at the<br>
ITK affine transforms than anyone else[1] this week. With that here is<br>
my current understanding...<br>
<br>
1) The CenterTransformInitializers estimates an initial "Center" and<br>
an initial "Translation" parameter from either the geometry or the<br>
first moments. From my problematic experiences, getting the initial<br>
transform which is a "good" guess is been critical for the optimizer to<br>
head to the correct solution.<br>
<br>
2) The Center parameter of a transform can either be "Fixed" or an<br>
optimizable parameter. The transforms with the "Centered" monkier are<br>
the the ones with the Center parameter optimizable. This issue seems to<br>
be what you were referring to in to message.<br>
<br>
In many ways the point I am trying to make is independent of #2. I<br>
have observed that it's important to have the "Center" of an affine<br>
transform ( or sub parameterization thereof ) at the center of the<br>
object you are trying to register. That is the coordinate space of the<br>
optimizable parameters' point 0 is near the center. This enables<br>
rotation to easily rotate around the center, as well as scaling to<br>
maintain the same relative center when "zooming". This issue is<br>
independent of wether that center point can be optimized.<br>
<br>
For example, consider changing the origin of an image for alignment by<br>
say 500, and compensating with just an initial translation and not<br>
setting the "Center" parameter. If we are trying to optimize rotation<br>
and translation, then the optimization path would be very difficult to<br>
traverse with these inter-dependent parameters to force it to rotate<br>
around the center of the object. This scenario may be more common in<br>
microscopy then medical imaging, due to microscopy frequently having<br>
multiple subjects across large images. I could write up a IPython<br>
Notebook to illustrate the case.<br>
<br>
So that is my understanding of why using a fixed center is important.<br>
I thought this may have been shared knowledge, but perhaps is not or is<br>
incorrect...<br>
<br>
Now I am trying to understand how this interacts with all the<br>
coordinate frames involved with the ITKv4 registration framework, and<br>
the composite transforms. Specifically the composite transform apply<br>
the transforms in "reverse order"[2]. As I understand that that means<br>
that the newest transform get applied first. So that transform<br>
parameters are being optimized in the images space not in the virtual<br>
domains we are working towards. Therefore the center of our transforms<br>
is still important as we composite transforms?<br>
<br>
I hope I explained that clearly, a white board may really be needed....<br>
<br>
Thanks,<br>
Brad<br>
<br>
<br>
[1]<br>
<a href="https://github.com/SimpleITK/SimpleITK/compare/master...9bc9bc8440e64d94">https://github.com/SimpleITK/SimpleITK/compare/master...9bc9bc8440e64d94</a><br>
099d3519eb23bcc16c7cf015<br>
[2] <a href="http://www.itk.org/Doxygen/html/classitk_1_1CompositeTransform.html">
http://www.itk.org/Doxygen/html/classitk_1_1CompositeTransform.html</a><br>
<br>
On Jul 28, 2014, at 8:57 PM, Nicholas Tustison <<a href="mailto:ntustison@gmail.com">ntustison@gmail.com</a>><br>
wrote:<br>
<br>
<blockquote type="cite">Hi Brad,<br>
<br>
I apologize for the delayed response. I¹m still catching up on my<br>
workload after moving to CA. We might want to talk to Luis as it<br>
was my understanding that the ³center² component of the linear<br>
transforms might be a carry-over from all the ³Centered² transforms,<br>
e.g.,<br>
<br>
<br>
<a href="http://www.itk.org/Doxygen/html/classitk_1_1CenteredAffineTransform.htm">http://www.itk.org/Doxygen/html/classitk_1_1CenteredAffineTransform.htm</a><br>
l<br>
<br>
which, if I remember correctly, Luis said were somewhat sub optimally<br>
conceived but this was such a long time ago that I might be completely<br>
misremembering. However, fixing the center for all transforms within<br>
a composite transform is certainly not necessary within the specified<br>
framework. Rather, the matrix and offset are updated with the<br>
³Center²<br>
being updated implicitly.<br>
<br>
Nick<br>
<br>
<br>
<br>
On Jul 24, 2014, at 7:27 AM, Bradley Lowekamp<br>
<<a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a>> wrote:<br>
<br>
<blockquote type="cite">Hello,<br>
<br>
There are a lot of transforms involved in the new registration<br>
framework.<br>
<br>
I am trying to figure out what the implications for the fix<br>
parameters of the transform "Center" ( ie center of rotation/scaling<br>
) are when combined with composite transforms and the<br>
fixed/moving/registration coordinate frames...<br>
<br>
Based on how the transforms are composed it seems necessary to set<br>
the fix "Center" for subsequent transformations. Additionally, I am<br>
unsure how one would "improve" ( poorly defined? ) the center for a<br>
subsequent transform ie Affine after a similarity...<br>
<br>
Are there some documented guidance or figures to help with this<br>
issue?<br>
Do we have a comprehensive diagram of these transforms?<br>
<br>
Thanks,<br>
Brad<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://kitware.com/products/protraining.php">http://kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/insight-developers">http://public.kitware.com/mailman/listinfo/insight-developers</a><br>
_______________________________________________<br>
Community mailing list<br>
<a href="mailto:Community@itk.org">Community@itk.org</a><br>
<a href="http://public.kitware.com/mailman/listinfo/community">http://public.kitware.com/mailman/listinfo/community</a><br>
</blockquote>
</blockquote>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://kitware.com/products/protraining.php">http://kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/insight-developers">http://public.kitware.com/mailman/listinfo/insight-developers</a><br>
</blockquote>
<br>
<br>
<br>
________________________________<br>
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any
retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you.<br>
________________________________<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</span>
</div>
<span><unknown.png></span><span><unknown.png></span><span><MultiStageImageRegistration1.cxx></span></blockquote></div><br></div></div></body></html>