[Insight-users] Question regarding itkFEMRegistrationFilter

Gheorghe Postelnicu gheorghe.postelnicu at gmail.com
Tue Nov 29 17:24:17 EST 2005


Hi Brian,

Thanks for the answer. A few precisions:

1. the "brute force" 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;

As far as the LoadLandmark function is concerned, are the following
statements correct:

- 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);

- 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  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.

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

http://public.kitware.com/pipermail/insight-users/2003-September/004853.html

the file itkFEMLoadLandmark.cxx reads for coordinates of the undeformed
image and then coordinates of the deformed image. So the methods

Get/SetSource in itkFEMLoadLandmark actually work on global coordinates
corresponding to the Moving image.

Sorry about this long email and thanks for the help,

On 11/29/05, Brian B Avants <avants at grasp.cis.upenn.edu> wrote:
>
>
> Dr. GP :
>
> You are right, the naming is confusing.  "Deformed", here, refers to the
> action of the current deformation field on the point.  It is not
> "deformed" in the sense of the local to global coordinate transformation.
>
> As for the "brute force" iteration in searching for the corner node on
> which to apply BCs:  the interpolation grid could also be used.  You are
> free to implement this approach, if you like, in your code.  If it is
> general enough to work in many situations ( arbitrary meshes, elements,
> etc.) then it can be included in the distribution.  One problem may be
> that some elements are missing general Local to global or global to local
> transformation functions.  One needs these to use the interpolation grid
> with arbitrary meshes.
>
> Brian
>
> On Tue, 29 Nov 2005, Gheorghe Postelnicu wrote:
>
> > Hi,
> >
> > I have 2 questions regarding the ApplyLoads function in the
> implementation
> > of itkFEMRegistrationFilter:
> > 1. in order to assign the BC to elements, there is a brute-force
> iteration
> > through the elements (for each boundary condition). Wouldn't it make
> sense
> > to use the interpolation grid in this situation?
> > 2. I am a little confused about the names of the points in the
> LoadLandmark
> > class; if I get it correctly,
> >     - source = undeformed configuration
> >     - point    = deformed configuration
> > However, in the ApplyLoads function, namely in the following code
> snippet:
> >
> > -----------------
> >    pu=m_LandmarkArray[lmind]->GetSource();
> >         pd=m_LandmarkArray[lmind]->GetPoint();
> >
> >         for (Element::ArrayType::const_iterator n = mySolver.el.begin();
> >              n!=mySolver.el.end() && !isFound; n++)
> >           {
> >           if ( (*n)->GetLocalFromGlobalCoordinates(pu, pd ) )
> >             {
> >             isFound=true;
> >             m_LandmarkArray[lmind]->SetPoint(pd);
> > //             std::cout << " load local pt " <<
> > m_LandmarkArray[lmind]->GetPoint() << std::endl;
> >             m_LandmarkArray[lmind]->el[0]=( ( &**n ) );
> >             }
> >           }
> > ---------------
> >
> >    pu seems to represent the position in the undeformed configuration
> > (global coordinates), is then converted to local coordinates in the pd
> > variable and then assigned as point. So I am quite confused about this
> part
> > of the code:
> > - why is ever pd initialized?
> > - why is pu translated into local coordinates and then overwrites pd?
> >
> >
> > Thanks,
> >
> > --
> > Gheorghe Postelnicu, PhD
> > MGH, Harvard Medical School
> >
>



--
Gheorghe Postelnicu, PhD
MGH, Harvard Medical School
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20051129/40afe480/attachment.html


More information about the Insight-users mailing list