Text archives Help
- From: David Weinstein <dmw@sci.utah.edu>
- To: Chris Butson <butson@sci.utah.edu>
- Cc: scirun-users@sci.utah.edu
- Subject: Re: [SCIRUN-USERS] tensor interpolation
- Date: Tue, 29 Mar 2005 22:47:42 -0700
Hi Chris,
Good question regarding data location and basis. The shorter answer is
"yes, you're right -- we could map the data other ways, this way just
seemed most natural, so that's what we put in SCIRun".
Here's the longer answer for anyone who's curious about the
relationship between interpolation kernels and data locations:
Image a 2x2 grid of squares -- there are a lot of different
interpolation schemes that you could imagine for computing the value at
an arbitrary location within that space:
One possibility is that you have piecewise constant data-values defined
over the grid, in which case a natural representation is to define one
value within each of the 4 elements. If you ask for the data-value at
an arbitrary location in the grid, this interpolation scheme simply
queries the grid to find which element the point sits in and then
reports that data-value associated with that element.
Another option is that you have piecewise linear data-values defined
over the grid, in which case a natural representation is to define a
value at each of the 9 nodes. Now, if you ask for the data-value at an
arbitrary location, the interpolation scheme queries the grid to find
which element the point sits in and then computes the barycentric
coordinates of the point within that element; each barycentric
weighting is multiplied by the data-value at its corresponding
coordinates, and the results are summed together to compute the
data-value at the chosen location.
One can imagine other, more complicated schemes, such as cubic or
quartic or gaussian interpolation, where you would use larger
neighborhoods of data-values to compute the interpolated value at a new
location. Such kernels are actually already supported in the
UnuResample module under the Teem package; however, they can only be
applied to regularly-sampled (raster) data. We are currently in the
process of adding native support for higher-order basis functions into
SCIRun (Marty Cole and Frank Sachse are leading this effort for the
Virtual Soldier project), and I expect we will highlight those results
in the next major release of SCIRun.
Returning to our simple piecewise linear and constant examples, you're
right -- there isn't any particular reason that we ~have to~ associate
data-values defined at nodes with piecewise linear interpolation and
data-values defined at elements with piecewise constant interpolation.
I believe this is what you were getting at. For example, you could
imagine defining data-values at the centers of the elements, and then
using piecewise linear interpolation to interpolate the data-values at
locations between the element centers. Similarly, you could imagine
defining data-values defined at the nodes and using piecewise constant
interpolation to define the data-values at intermediate locations to
be, for example, the value of the nearest node (i.e. a Voronoi tiling).
We have simply chosen to implement the ~simpler~ mappings (described
in paragraphs 4 and 5 above) in SCIRun.
One final note: as you alluded to, you can use the ChangeFieldBasis
module to switch between piecewise constant data (defined at elements)
and piecewise linear data (defined at nodes) representations, and
vice-versa.
Cheers,
Dave
On Mar 29, 2005, at 8:40 PM, Chris Butson wrote:
Thanks everyone for the replies. It appears that piecewise linear
tensor
interpolation as it is implemented in scirun should work for our
application. One practical note is that such interpolation is only
available for data at nodes (linear basis) rather than data at cells
(constant basis). It's not entirely clear to me why the data location
and
basis for interpolation are linked but I can easily work around this by
converting my tensor volume.
Chris
On Tue, 29 Mar 2005, David Weinstein wrote:
Hi Chris,
For what it's worth, Gordon Kindlmann and I did a very preliminary
analysis of this for our Vis `99 paper
(http://www.sci.utah.edu/publications/gk99/vis99_hueballs-paper.pdf),
and it turns out that for "most datasets, most of the time" (i.e. for
non-pathological examples) interpolating tensors component-wise
produces very reasonable results. This is the approach that SCIRun
currently uses (e.g. in the DirectMapping module). Other solutions
often involve solving "the correspondence problem", which can be
unstable.
Cheers,
Dave
On Mar 29, 2005, at 1:07 PM, Chris Butson wrote:
Is there a way to perform tensor interpolation in scirun? I know that
scirun can interpolate the tensor index but that's not what I need.
Rather, I am looking for an algorithm to interpolate new tensor
values. I
imagine this could be based on some kind of eigenvector interpolation
but
there are probably other valid methods.
Chris
=====================================================================
==
====
== The SCIRun Users mailing list: send email to
majordomo@sci.utah.edu
==
== for more details.
==
== Please acknowledge use of SCIRun in your papers and reports:
==
== see http://software.sci.utah.edu/scirun-biopse_citation.bib
==
=====================================================================
==
====
===========================================================================
== The SCIRun Users mailing list: send email to majordomo@sci.utah.edu ==
== for more details. ==
== Please acknowledge use of SCIRun in your papers and reports: ==
== see
http://software.sci.utah.edu/scirun-biopse_citation.bib ==
===========================================================================
Archive powered by MHonArc 2.6.16.