<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"><base href="x-msg://6473/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Ali,<div><br></div><div>I don't think that there's a deficiency. &nbsp;I just ran the itkSyNImageRegistrationTest</div><div>and added the following snippet to write the displacement field to disk starting</div><div>at line 275.</div><div><br></div><div><div>&nbsp; typedef itk::ImageFileWriter&lt;DisplacementFieldType&gt; WriterType2;</div><div>&nbsp; typename WriterType2::Pointer writer2 = WriterType2::New();</div><div>&nbsp; writer2-&gt;SetFileName( "/Users/ntustison/Desktop/testDisplacementField.nii.gz" );</div><div>&nbsp; writer2-&gt;SetInput( outputTransform-&gt;GetDisplacementField() );</div><div>&nbsp; writer2-&gt;Update();</div></div><div><br></div><div>The result was a non-zero displacement field that looked reasonable based</div><div>on the parameters specified by the test.</div><div><br></div><div>Nick</div><div><br></div><div><br><div><div>On Dec 1, 2012, at 8:30 PM, "Ghayoor, Ali" &lt;<a href="mailto:ali-ghayoor@uiowa.edu">ali-ghayoor@uiowa.edu</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div fpstyle="1" ocsi="0" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; "><div style="direction: ltr; font-family: Tahoma; font-size: 10pt; "><font size="3" face="Calibri">Hello Developers,<br></font><div style=""><span id="OLK_SRC_BODY_SECTION"><font size="3" face="Calibri"></font><div><div style="word-wrap: break-word; "><div><font size="3" face="Calibri"><br></font></div><div><font size="3" face="Calibri">In a registration framework, at each iteration, I get the current moving transform from the metric of the "itkSyNImageRegistrationMethod" filter; however, the returned moving transform has a displacement field with all zero values at every iteration.&nbsp;</font></div><div><font size="3" face="Calibri"><br></font></div><div><font size="3" face="Calibri">To inspect this deficiency in ITK, I used&nbsp;<span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; background-color: transparent; display: inline !important; ">"itkSyNImageRegistrationTest.cxx", and made some modifications in the test code for this purpose.</span></font></div><div><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; background-color: transparent; display: inline !important; "><font size="3" face="Calibri">I added an iteration observer to the SyN registration stage:</font></span></div><div><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; background-color: transparent; display: inline !important; "><font size="3" face="Calibri"><br></font></span></div><div><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; background-color: transparent; display: inline !important; "><font size="3" face="Calibri"><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; display: inline !important; ">&nbsp; &nbsp;<span class="Apple-tab-span" style="white-space: pre; "> </span>typedef CommandIterationUpdate&lt;DisplacementFieldRegistrationType&gt; DisplacementFieldCommandType;&nbsp;</span><br style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; "><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; display: inline !important; ">&nbsp; &nbsp;&nbsp;typename DisplacementFieldCommandType::Pointer DisplacementFieldObserver = DisplacementFieldCommandType::New();&nbsp;</span><br style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; "><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; display: inline !important; ">&nbsp; &nbsp;&nbsp;displacementFieldRegistration-&gt;AddObserver( itk::IterationEvent(), DisplacementFieldObserver );&nbsp;</span></font></span></div><div><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; background-color: transparent; display: inline !important; "><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; display: inline !important; "><font size="3" face="Calibri"><br></font></span></span></div><div><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; display: inline !important; "><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; display: inline !important; "><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; background-color: transparent; display: inline !important; "><font size="3" face="Calibri">Then, inside the observer class, I asked for the parameters of the moving transform at the current iteration:</font></span></span></span></div><div><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; display: inline !important; "><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; display: inline !important; "><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; background-color: transparent; display: inline !important; "><font size="3" face="Calibri"><br></font></span></span></span></div><div><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; display: inline !important; "><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; display: inline !important; "><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; background-color: transparent; display: inline !important; "><font size="3" face="Calibri"><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; display: inline !important; "><span class="Apple-tab-span" style="white-space: pre; "></span>&nbsp; &nbsp;std::cout &lt;&lt; " parameters: " &lt;&lt; const_cast&lt;TFilter *&gt;( filter )-&gt;GetMetric()-&gt;GetMovingTransform()-&gt;GetParameters() &lt;&lt; std::endl;&nbsp;</span><br style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; "><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; display: inline !important; ">&nbsp; &nbsp;std::cout &lt;&lt; " fixed parameters " &lt;&lt; const_cast&lt;TFilter *&gt;( filter )-&gt;GetMetric()-&gt;GetMovingTransform()-&gt;GetFixedParameters() &lt;&lt; std::endl;</span></font></span></span></span></div><div><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; display: inline !important; "><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; display: inline !important; "><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; background-color: transparent; display: inline !important; "><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; display: inline !important; "><font size="3" face="Calibri"><br></font></span></span></span></span></div><div><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; display: inline !important; "><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; display: inline !important; "><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; background-color: transparent; display: inline !important; "><span style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; float: none; display: inline !important; "><font size="3" face="Calibri">However, the Parameters of the moving transform is an all zero valued displacement field at each iteration.</font></span></span></span></span></div><div><font size="3" face="Calibri">Do you know why the registration filter does not return the right moving transform?&nbsp;<span style="line-height: 17px; ">Could you please help about this problem.</span></font></div><div><span class="Apple-style-span" style="line-height: 17px; "><font size="3" face="Calibri"><br></font></span></div><div><span class="Apple-style-span" style="line-height: 17px; "><font size="3" face="Calibri">Thanks,</font></span></div><div><span class="Apple-style-span" style="line-height: 17px; "><font size="3" face="Calibri">Ali</font></span></div></div></div></span></div></div>_______________________________________________<br>Powered by<span class="Apple-converted-space">&nbsp;</span><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://www.itk.org/mailman/listinfo/insight-developers">http://www.itk.org/mailman/listinfo/insight-developers</a><br></div></blockquote></div><br></div></body></html>