[Insight-developers] itkPoint itkVector additional methods
Miller, James V (CRD)
millerjv@crd.ge.com
Tue, 24 Jul 2001 07:25:27 -0400
I would prefer having a method which is N pts and N weights. This is the most natural way to work
with interpolation and operations like weighted least squares.
I'm comfortable with a method called BarycentricCombination taking N-1 weights. However, I would
like another method that takes N pts and N weights (and it is up the user to specify valid weights
that sum to one).
-----Original Message-----
From: Luis Ibanez [mailto:ibanez@choroid.cs.unc.edu]
Sent: Monday, July 23, 2001 7:13 PM
To: Paul Hughett
Cc: Miller, James V (CRD); insight-developers@public.kitware.com
Subject: Re: [Insight-developers] itkPoint itkVector additional methods
Paul is right, the sum of weights must be 1.0,
that's the only well defined "sum" over points.
So, in fact LinearCombination() is missleading
because not every linear combination is allowed.
By now the term BarycentricCombination is being kept,
because it is the technical term.
In all these methods, we enforce the sum of weights
to be = 1.0, by requesting only (N-1) weights from
the user, and internally computing the Nth one as
1.0 - sum(weight).
Negative weights are allowed, and they usually will
produce resulting points outside the convex hull of
the set of points.
The method for computing the barycentric combination
of an C-like array of points was added.
An a class for computing the barycentric combination
of an itk::Container (eg. VectorContainer) of Points
was also added. That should eventually be moved to
its own header file, and be renamed as "Calculator"...
Tests are available at:
Testing/Code/Common/itkPointGeometryTest
Luis
-----------------------------
On Mon, 23 Jul 2001, Paul Hughett wrote:
>
> James Miller has written:
>
> > I would also add a more general method:
>
> > Point Point::LinearCombination(Point [], float weights[], unsigned int num)
>
> > return a Point which is the linear combination or weighted
> > average of a set of points. I suppose this last one could be
> > implemented using PointContainers and iterators. I am tempted to call
> > this method weighted average but that would imply that the weights sum
> > to one. I don't want to restrict the call to that case.
>
> In fact, the weight *must* sum to one for a linear combination of points
> to yield a point, so WeightedAverage would be a good name. If the weights
> sum to zero, the result is a Vector, and if the weights sum to anything
> else, the result is neigther a Point nor a Vector.
>
> Paul Hughett
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers
>
--
Luis Ibanez CB#: 7060
Research Assistan Professor phone: (919) 843 5436
Division of Neurosurgery fax: (919) 966 6627
University of North Carolina at Chapel Hill email: ibanez@cs.unc.edu
Chapel Hill, NC 27599-7060 http://www.cs.unc.edu/~ibanez