Interpolate univariate data on regular 3D grid to new 3D grid

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Interpolate univariate data on regular 3D grid to new 3D grid

Gregory Jefferis
Dear R Users,

I have some data that is very similar in form to a 3D image - ie univariate
data on a regular 3D grid.  I keep this as a 3D numeric array in R with
attributes describing the sampling points along the 3 dimensions.

I would like to interpolate this onto a new regular 3D grid that I specify
(eg by supplying 3 vectors corresponding to the new grid locations on each
of the 3 dimensions).  Interpolation methods would ideally include nearest
neighbour and linear.

The arrays can be large (> 1e7 points) so I would like this to be efficient.
I can find lots of 1d or 2d interpolation methods but no 3d ones and
anything that I write will probably take me a while to optimise.

Many thanks for any suggestions,

Greg Jefferis.
--
Gregory Jefferis, PhD                                   and:
Research Fellow    
Department of Zoology                                   St John's College
University of Cambridge                                 Cambridge
Downing Street                                          CB2 1TP
Cambridge, CB2 3EJ
United Kingdom

Lab Tel: +44 (0)1223 336683                     Office: +44 (0)1223 339899
Lab Fax: +44 (0)1223 336676

http://www.zoo.cam.ac.uk/zoostaff/jefferis.html           [hidden email]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html