[Insight-users] How to find the vector between 2 pointsets

David Doria daviddoria at gmail.com
Mon Oct 22 16:04:43 EDT 2012


On Mon, Oct 22, 2012 at 6:51 AM, D, Yamini <Yamini.D at philips.com> wrote:
> Hi,
> I want to find the vector between two pointsets of form (x1,y1) and (x2,y2).
>
> Any idea how to do this in itk?
>
> Thank you,
>
> Yamini.D

Are you talking about itk::PointSet
(http://www.itk.org/Doxygen/html/classitk_1_1PointSet.html) ? or are
those two things you want to find the vector between just itk::Index ?
If the later, then just use the subtraction operator:

ImageType::OffsetType offset = pixel1 - pixel2;

David


More information about the Insight-users mailing list