<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><BLOCKQUOTE type="cite"><DIV>Hi Markus,</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The registration scenario you describe seems reasonably straightforward.  However, there are a couple of items I noticed from the images that you might want to change.  Generally, you want to keep alpha = 0.5 (as opposed to 1.0) so that the solution is stable for the time step that you choose.  The chosen material governs the regularization of your registration results.  The default values that I have are Elasticity = 1.0e4 and Rho = 1.0e4 which give me reasonable registration results.  You should be able to achieve reasonable results using the specified elastic material.  Unfortunately, without running the registration myself, it is difficult to know exactly what the problem is.  </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>On a related note, it is interesting that you chose to forgo the .config file.  I actually rewrote the itkFEMRegistrationFilter and plan to include it in an upcoming release along with additional modifications and extensions to the library (including B-spline elements).  The first thing I got rid of was the .config file along with some parameters that weren't being used.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Nick Tustison </DIV><BR></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><BR><BLOCKQUOTE type="cite"><DIV><DIV>On Apr 6, 2006, at 7:36 AM, Markus Weigert wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"> Hi,<BR> <BR> after scanning the list on FEM - registration, I still have huge problems <BR> to configure the paramters for my specific registration problem with the FEM - method.<BR> <BR> I want to register two 3D MR 256^3 Thorax images with only small deformation.<BR> The problem is, that however I set the parameters <B>elasticity</B> and <B>rho / rhoc</B>,<BR> it doesn't deliver any useful results.<BR> <BR> I started with elasticity 100000 (even higher than in the examples), but the image became completely<BR> deformed. Also, it spends only 2 iterations in the process (has this something to do with<BR> the energyreductionfactor???) and after the registration, the metric (I use SSD) is much bader then before.<BR> I think this should not be the case, after what I understood about the theory behind this method.<BR> Also with elasticity 1000.000, it still gets completely deformed.<BR> With even higher the deformation decreases of course, but the missregistration of the lungs is never<BR> caught (see middle of the images at the bottom of this message).<BR> <BR> Please note, that I don't use a config file but set all the parameters manually.<BR> Also I wonder what's the meaning of the parameters alpha and gamma (changing  these doesn't<BR> seem to have a great effect on the result).<BR> <BR> Indeed, I call the following methods to setup the FEMRegistrationFilter (public functions),<BR> while I didn't find a function to set the scaling, which is also used in the config file (is this intended???): <BR> <FONT color="#ff0000"><BR>   m_registrationFilter-&gt;SetFixedImage(m_fixedImage);<BR>   m_registrationFilter-&gt;SetMovingImage(m_floatingImage);<BR> <BR>   m_registrationFilter-&gt;DoMultiRes(true);    <BR> <BR>   m_registrationFilter-&gt;SetMeshPixelsPerElementAtEachResolution(this-&gt;m_meshPixPerElement);<BR> <BR>   m_registrationFilter-&gt;SetNumberOfIntegrationPoints(this-&gt;m_numberOfIntegrationPoints);<BR> <BR>   m_registrationFilter-&gt;SetRho(this-&gt;m_rho);<BR> <BR>   m_registrationFilter-&gt;SetElasticity(this-&gt;m_elasticity);<BR>   <BR>   m_registrationFilter-&gt;SetGamma(this-&gt;m_gamma);<BR>   <BR>   m_registrationFilter-&gt;SetWidthOfMetricRegion(this-&gt;m_widthOfMetricRegion);<BR>   m_registrationFilter-&gt;ChooseMetric((int) this-&gt;m_metric);<BR>   m_registrationFilter-&gt;SetMaximumIterations(this-&gt;m_maxNumberOfIterations,0);<BR> <BR>   m_registrationFilter-&gt;SetTimeStep(this-&gt;m_timestep);<BR>   m_registrationFilter-&gt;SetLineSearchMaximumIterations(this-&gt;m_maxLineSearchIterations);<BR>   m_registrationFilter-&gt;SetEnergyReductionFactor(this-&gt;m_energyReductionFactor);<BR>   <BR>   if(m_metric==3) m_registrationFilter-&gt;SetDescentDirectionMaximize();<BR>   else{ m_registrationFilter-&gt;SetDescentDirectionMinimize();}<BR>   <BR>   m_registrationFilter-&gt;SetAlpha(this-&gt;m_alpha);<BR>   m_registrationFilter-&gt;DoLineSearch(2);<BR>   m_registrationFilter-&gt;EmployRegridding(1);<BR>   m_registrationFilter-&gt;UseLandmarks(false);<BR>   m_registrationFilter-&gt;SetWriteDisplacements(false);</FONT><BR> <BR> Also what is about the material properties:<BR> Does it make sense to change something here??? <BR> <BR>  <FONT color="#ff0000">itk::fem::MaterialLinearElasticity::Pointer m;<BR>   m = itk::fem::MaterialLinearElasticity::New();<BR>   m-&gt;GN = 0;                  // Global number of the material<BR>   m-&gt;E = m_registrationFilter-&gt;GetElasticity();  // Young's modulus -- used in the membrane<BR>   m-&gt;A = 1.0;                 // Cross-sectional area<BR>   m-&gt;h = 1.0;                 // Thickness<BR>   m-&gt;I = 1.0;                 // Moment of inertia<BR>   m-&gt;nu = 0.;                 // Poisson's ratio -- DONT CHOOSE 1.0!!<BR>   m-&gt;RhoC = this-&gt;m_density;  // Density<BR>   <BR>   // Create the element type <BR>   Element3DType::Pointer e1=Element3DType::New();<BR>   e1-&gt;m_mat=dynamic_cast&lt;itk::fem::MaterialLinearElasticity*&gt;( m );<BR>   m_registrationFilter-&gt;SetElement(e1);<BR>   m_registrationFilter-&gt;SetMaterial(m);</FONT><BR> <BR> <BR> Additionally, you can find some screenshots which show the problem and the RegistrationFilter<BR> outputs here:<BR> <BR> <A class="moz-txt-link-freetext" href="http://www.markusweigert.de/images/E10%5E8_FEMRegOutput_iter2.jpg">http://www.markusweigert.de/images/E10%5E8_FEMRegOutput_iter2.jpg</A><BR> <A class="moz-txt-link-freetext" href="http://www.markusweigert.de/images/E10%5E8_FEMRegOutput_iter1.jpg">http://www.markusweigert.de/images/E10%5E8_FEMRegOutput_iter1.jpg</A><BR> <A class="moz-txt-link-freetext" href="http://www.markusweigert.de/images/before_registration.jpg">http://www.markusweigert.de/images/before_registration.jpg</A><BR> <A class="moz-txt-link-freetext" href="http://www.markusweigert.de/images/E10%5E8_FEMRegOutput_iter2.jpg">http://www.markusweigert.de/images/E10%5E8_FEMRegOutput_iter2.jpg</A><BR> <A class="moz-txt-link-freetext" href="http://www.markusweigert.de/images/result_E100000.jpg">http://www.markusweigert.de/images/result_E100000.jpg</A><BR> <A class="moz-txt-link-freetext" href="http://www.markusweigert.de/images/result_E1000000.jpg">http://www.markusweigert.de/images/result_E1000000.jpg</A><BR> <A class="moz-txt-link-freetext" href="http://www.markusweigert.de/images/result_E10000000.jpg">http://www.markusweigert.de/images/result_E10000000.jpg</A><BR> <BR> <BR> I hope somebody will have the time to answer at least some of my questions.<BR> <BR> <BR> Best regards,<BR> Markus<BR> <BR> <BR> <BR> <BR> <BR> <BR><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Insight-users mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:Insight-users@itk.org">Insight-users@itk.org</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</A></DIV> </BLOCKQUOTE></DIV><BR></BLOCKQUOTE></DIV><BR></BODY></HTML>