<br>
Hi Brian,<br>
<br>
Thanks for the answer. A few precisions:<br>
<br>
1. the &quot;brute force&quot; iteration I was reffering to is not concerned with
the corner, but with assigning elements to the load elements (the code
preceding the corner pinning). In that section of the code, it is
precisely the GetLocalFromGlobal coordinates method which is used;<br>
<br>
As far as the LoadLandmark function is concerned, are the following statements correct:<br>
<br>
- local coordinates are actually the values of the shape functions in
the element (at least that's what I got when looking at the triangular
elements);<br>
<br>
- since I am still getting used with the library, I am trying to get
used with the terminology. So, when you say undeformed, that
corresponds with the FixedImage&nbsp; and deformed corresponds to
global MovingImage coordinates. Furthermore, the domain being meshed is
that of the FixedImage and in the end of course the Moving image is
warped back to the FixedImage domain.<br>
<br>
So, when writing a Landmarks file, one has to input a point in the
undeformed configuration and then a point in the deformed
configuration, as indicated in <br>
<br>
<a href="http://public.kitware.com/pipermail/insight-users/2003-September/004853.html">http://public.kitware.com/pipermail/insight-users/2003-September/004853.html</a><br>
<br>
the file itkFEMLoadLandmark.cxx reads for coordinates of the undeformed
image and then coordinates of the deformed image. So the methods<br>
<br>
Get/SetSource in itkFEMLoadLandmark actually work on global coordinates corresponding to the Moving image.<br>
<br>
Sorry about this long email and thanks for the help,<br>
<br>
<div><span class="gmail_quote">On 11/29/05, <b class="gmail_sendername">Brian B Avants</b> &lt;<a href="mailto:avants@grasp.cis.upenn.edu">avants@grasp.cis.upenn.edu</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Dr. GP :<br><br>You are right, the naming is confusing.&nbsp;&nbsp;&quot;Deformed&quot;, here, refers to the<br>action of the current deformation field on the point.&nbsp;&nbsp;It is not<br>&quot;deformed&quot; in the sense of the local to global coordinate transformation.
<br><br>As for the &quot;brute force&quot; iteration in searching for the corner node on<br>which to apply BCs:&nbsp;&nbsp;the interpolation grid could also be used.&nbsp;&nbsp;You are<br>free to implement this approach, if you like, in your code.&nbsp;&nbsp;If it is
<br>general enough to work in many situations ( arbitrary meshes, elements,<br>etc.) then it can be included in the distribution.&nbsp;&nbsp;One problem may be<br>that some elements are missing general Local to global or global to local
<br>transformation functions.&nbsp;&nbsp;One needs these to use the interpolation grid<br>with arbitrary meshes.<br><br>Brian<br><br>On Tue, 29 Nov 2005, Gheorghe Postelnicu wrote:<br><br>&gt; Hi,<br>&gt;<br>&gt; I have 2 questions regarding the ApplyLoads function in the implementation
<br>&gt; of itkFEMRegistrationFilter:<br>&gt; 1. in order to assign the BC to elements, there is a brute-force iteration<br>&gt; through the elements (for each boundary condition). Wouldn't it make sense<br>&gt; to use the interpolation grid in this situation?
<br>&gt; 2. I am a little confused about the names of the points in the LoadLandmark<br>&gt; class; if I get it correctly,<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; - source = undeformed configuration<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; - point&nbsp;&nbsp;&nbsp;&nbsp;= deformed configuration<br>
&gt; However, in the ApplyLoads function, namely in the following code snippet:<br>&gt;<br>&gt; -----------------<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;pu=m_LandmarkArray[lmind]-&gt;GetSource();<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pd=m_LandmarkArray[lmind]-&gt;GetPoint();
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (Element::ArrayType::const_iterator n = mySolver.el.begin();<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;n!=mySolver.el.end()
&amp;&amp; !isFound; n++)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( (*n)-&gt;GetLocalFromGlobalCoordinates(pu, pd ) )<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; isFound=true;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_LandmarkArray[lmind]-&gt;SetPoint(pd);
<br>&gt; //&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::cout &lt;&lt; &quot; load local pt &quot; &lt;&lt;<br>&gt; m_LandmarkArray[lmind]-&gt;GetPoint() &lt;&lt; std::endl;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_LandmarkArray[lmind]-&gt;el[0]=( ( &amp;**n ) );<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt; ---------------<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;pu seems to represent the position in the undeformed configuration<br>&gt; (global coordinates), is then converted to local coordinates in the pd<br>&gt; variable and then assigned as point. So I am quite confused about this part
<br>&gt; of the code:<br>&gt; - why is ever pd initialized?<br>&gt; - why is pu translated into local coordinates and then overwrites pd?<br>&gt;<br>&gt;<br>&gt; Thanks,<br>&gt;<br>&gt; --<br>&gt; Gheorghe Postelnicu, PhD
<br>&gt; MGH, Harvard Medical School<br>&gt;<br></blockquote></div><br><br clear="all"><br>-- <br>Gheorghe Postelnicu, PhD<br>MGH, Harvard Medical School