Hi all - quick update, in the extremely unlikely event anyone wants to interpolate data across a 3-D array (which I ended up not needing to do after all), here's a potential solution:
On 18 October 2012 18:18, Dr Gregory Jefferis
<gsx...@cam.ac.uk> wrote:
Dear Sinead,
I'm
afraid I never found a good solution in R. In the end, I just treated
this as image data and did smoothing/resampling in 3rd party software,
either ImageJ/Fiji, or my preferred solution with a command line tool
called unu:
For this I wrote some routines to save my 3D data blocks in an image format called nrrd and call the unu tool and particularly the
unu resample command
The R code is available along with a load of other code here
NrrdResample
is the function that I use from within R that does this in one go. You
do have to build teem/unu from source so this may be a disincentive but I
have subsequently used that tool for a wide variety of 3d image processing problems so it was worthwhile.
If you want to export 3d
image data from R and export it eg for use in imagej, then the most
mature packages (read those you can install straight from cran without
any mucking around) are those by medical imaging people built around the
nifti image format.
Best wishes,
Greg.
On 17 Oct 2012, at 11:22, Sinead English wrote:
Dear Dr Jefferis
Apologies for contacting you out of the blue: I have been searching for a function in R to conduct trilinear interpolation from a regular 3D array and I noticed you had a very similar query about six years ago (!)
As
there were no responses online to your question, I was wondering if you
ever found a solution? If you could point me toward a relevant R
library, I'd be most grateful. So far I've only managed to find 2D interpolation functions (e.g. interp.surface.grid from the fields library).
Thank you in advance and best wishes,
Sinead
--
Dr Sinead English
Postdoctoral Research Associate
Edward Grey Institute, Department of Zoology
University of Oxford, OX1 3PS
Tel:
+44 (0)1865 271203http://www.zoo.ox.ac.uk/egi/members/sinead-english/