<div dir="ltr">Hi Matt, <div><br></div><div>That clarifies everything, thanks for the references and time. </div><div><br></div><div>Best regards!</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 3 April 2017 at 18:00, Matt McCormick <span dir="ltr"><<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Nicolás,<br>
<div><div class="h5"><br>
<br>
> I think I haven't explained myself correctly. At the end of the presentation<br>
> there is a variational formulation of the problem, different to the one<br>
> shown at the Optical Flow section. In that one, the problem reads<br>
><br>
> D[R,T;u] + a S[u],<br>
><br>
> which you can derivate to get a nonlinear system of equations<br>
><br>
> Au = f(u).<br>
><br>
> This is an SSD metric with an elastic penalization (assuming S is such a<br>
> functional) and as far as I understand it should be the default metric as<br>
> stated in the software guide. This setting has no temporal evolution, and<br>
> can be solved by a fixed point iterative scheme as<br>
><br>
> A u[k+1] = f(u[k])<br>
><br>
> or through a Newton-Raphson iterative scheme by looking for solutions of<br>
><br>
> F(u) := Au - f(u) = 0,<br>
><br>
> where you take a derivative and then iterate taking F(u[k+1]) = 0. Up to<br>
> this point, there is no time in any sense, which is confusing from the<br>
> example. When I read the code from DeformableRegistration1.h (the example I<br>
> mentioned before) and follow all the way what is happening, first the metric<br>
> is loaded<br>
><br>
> <a href="https://github.com/InsightSoftwareConsortium/ITK/blob/aecfac233e8815cdd0121fd2351dd3fef80d2e1b/Modules/Registration/FEM/include/itkFEMRegistrationFilter.hxx#L536-L538" rel="noreferrer" target="_blank">https://github.com/<wbr>InsightSoftwareConsortium/ITK/<wbr>blob/<wbr>aecfac233e8815cdd0121fd2351dd3<wbr>fef80d2e1b/Modules/<wbr>Registration/FEM/include/<wbr>itkFEMRegistrationFilter.hxx#<wbr>L536-L538</a><br>
><br>
> and then the solver is called to iterate<br>
><br>
> <a href="https://github.com/InsightSoftwareConsortium/ITK/blob/aecfac233e8815cdd0121fd2351dd3fef80d2e1b/Modules/Registration/FEM/include/itkFEMRegistrationFilter.hxx#L547-L549" rel="noreferrer" target="_blank">https://github.com/<wbr>InsightSoftwareConsortium/ITK/<wbr>blob/<wbr>aecfac233e8815cdd0121fd2351dd3<wbr>fef80d2e1b/Modules/<wbr>Registration/FEM/include/<wbr>itkFEMRegistrationFilter.hxx#<wbr>L547-L549</a>.<br>
><br>
> Now, if I go to check the kind of solver used, it is the CrankNicolson<br>
> Solver<br>
><br>
> <a href="https://github.com/InsightSoftwareConsortium/ITK/blob/aecfac233e8815cdd0121fd2351dd3fef80d2e1b/Modules/Registration/FEM/include/itkFEMRegistrationFilter.h#L145" rel="noreferrer" target="_blank">https://github.com/<wbr>InsightSoftwareConsortium/ITK/<wbr>blob/<wbr>aecfac233e8815cdd0121fd2351dd3<wbr>fef80d2e1b/Modules/<wbr>Registration/FEM/include/<wbr>itkFEMRegistrationFilter.h#<wbr>L145</a><br>
><br>
> and checking the documentation for it says explicitly it is used for time<br>
> dependent problems<br>
> (<a href="https://itk.org/Doxygen/html/classitk_1_1fem_1_1SolverCrankNicolson.html" rel="noreferrer" target="_blank">https://itk.org/Doxygen/html/<wbr>classitk_1_1fem_1_<wbr>1SolverCrankNicolson.html</a>),<br>
> which the mentioned formulation is not.<br>
<br>
</div></div>While SolverCrankNicolson can be used for time dependent problems, in<br>
the context of the presentation (Au = f) and the example,<br>
<br>
<a href="https://github.com/InsightSoftwareConsortium/ITK/blob/f9110a0046a9d07a921767ba000443ad006a2c9b/Examples/RegistrationITKv4/DeformableRegistration1.cxx#L131" rel="noreferrer" target="_blank">https://github.com/<wbr>InsightSoftwareConsortium/ITK/<wbr>blob/<wbr>f9110a0046a9d07a921767ba000443<wbr>ad006a2c9b/Examples/<wbr>RegistrationITKv4/<wbr>DeformableRegistration1.cxx#<wbr>L131</a><br>
<br>
you are correct -- it is not being used for time-dependent problems,<br>
because they are only using a stiffness matrix and not a mass matrix.<br>
<br>
<a href="https://github.com/InsightSoftwareConsortium/ITK/blob/f9110a0046a9d07a921767ba000443ad006a2c9b/Modules/Numerics/FEM/include/itkFEMSolverCrankNicolson.hxx#L298-L318" rel="noreferrer" target="_blank">https://github.com/<wbr>InsightSoftwareConsortium/ITK/<wbr>blob/<wbr>f9110a0046a9d07a921767ba000443<wbr>ad006a2c9b/Modules/Numerics/<wbr>FEM/include/<wbr>itkFEMSolverCrankNicolson.hxx#<wbr>L298-L318</a><br>
<span class=""><br>
<br>
> Now, in the variational Registration<br>
> filter<br>
> (<a href="https://itk.org/Doxygen/html/classitk_1_1VariationalRegistrationFilter.html" rel="noreferrer" target="_blank">https://itk.org/Doxygen/html/<wbr>classitk_1_<wbr>1VariationalRegistrationFilter<wbr>.html</a>),<br>
</span>> [...]<br>
<br>
To clarify, there are five different registration frameworks within ITK.<br>
<br>
1) The Variational Registration framework<br>
<br>
2) The ITKv3 Registration framework<br>
<br>
3) The ITKv4 Registration framework (classes have "v4" suffix).<br>
<br>
4) The PDE deformable registration filters (these include optical flow<br>
algorithms)<br>
<br>
5) The FEM Registration<br>
<br>
The VariationalRegistrationFilter is from the Variational Registration<br>
framework and is not used by FEM Registration.<br>
<br>
<br>
It sounds like you are most interested in variational registration,<br>
and the Variational Registration and ITKv4 Registration could help.<br>
More information can be found here:<br>
<br>
<a href="http://hdl.handle.net/10380/3460" rel="noreferrer" target="_blank">http://hdl.handle.net/10380/<wbr>3460</a><br>
<a href="https://itk.org/Doxygen/html/group__VariationalRegistration.html" rel="noreferrer" target="_blank">https://itk.org/Doxygen/html/<wbr>group__<wbr>VariationalRegistration.html</a><br>
<br>
<a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4009425/" rel="noreferrer" target="_blank">https://www.ncbi.nlm.nih.gov/<wbr>pmc/articles/PMC4009425/</a><br>
<a href="https://itk.org/Doxygen/html/group__ITKMetricsv4.html" rel="noreferrer" target="_blank">https://itk.org/Doxygen/html/<wbr>group__ITKMetricsv4.html</a><br>
<a href="https://itk.org/Doxygen/html/group__ITKRegistrationMethodsv4.html" rel="noreferrer" target="_blank">https://itk.org/Doxygen/html/<wbr>group__<wbr>ITKRegistrationMethodsv4.html</a><br>
<a href="https://itk.org/Doxygen/html/group__ITKOptimizersv4.html" rel="noreferrer" target="_blank">https://itk.org/Doxygen/html/<wbr>group__ITKOptimizersv4.html</a><br>
<br>
<br>
I hope this helps.<br>
<span class="HOEnZb"><font color="#888888"><br>
Matt<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Nicolás Alejandro Barnafi Wittwer</div></div></div></div>
</div>