spm_bsplins.m 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. function varargout = spm_bsplins(varargin)
  2. % Sample a volume using B-spline interpolation - a compiled routine
  3. % FORMAT [f,dfx,dfy,dfz] = spm_bsplins(c,x,y,z,d)
  4. % c - volume of B-spline coefficients (from spm_bsplinc)
  5. % x,y,z - co-ordinates of sampled points
  6. % d(1:3) - degree of B-spline (from 0 to 7) along different dimensions
  7. % - these must be same as used by spm_bsplinc
  8. % d(4:6) - 1/0 to indicate wrapping along the dimensions
  9. % f - sampled data
  10. % dfx,dfy,dfz - sampled first derivatives
  11. %
  12. % This function takes B-spline basis coefficients from spm_bsplinc,
  13. % and re-convolves them with B-splines centred at the new sample points.
  14. %
  15. % Note that nearest neighbour interpolation is used instead of 0th
  16. % degree B-splines, and the derivatives of trilinear interpolation are
  17. % returned insted of those of 1st degree B-splines. The difference is
  18. % extremely subtle.
  19. %
  20. %_______________________________________________________________________
  21. %
  22. % References:
  23. % M. Unser, A. Aldroubi and M. Eden.
  24. % "B-Spline Signal Processing: Part I-Theory,"
  25. % IEEE Transactions on Signal Processing 41(2):821-832 (1993).
  26. %
  27. % M. Unser, A. Aldroubi and M. Eden.
  28. % "B-Spline Signal Processing: Part II-Efficient Design and
  29. % Applications,"
  30. % IEEE Transactions on Signal Processing 41(2):834-848 (1993).
  31. %
  32. % M. Unser.
  33. % "Splines: A Perfect Fit for Signal and Image Processing,"
  34. % IEEE Signal Processing Magazine, 16(6):22-38 (1999)
  35. %
  36. % P. Thevenaz and T. Blu and M. Unser.
  37. % "Interpolation Revisited"
  38. % IEEE Transactions on Medical Imaging 19(7):739-758 (2000).
  39. %_______________________________________________________________________
  40. % Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging
  41. % John Ashburner
  42. % $Id: spm_bsplins.m 2696 2009-02-05 20:29:48Z guillaume $
  43. %-This is merely the help file for the compiled routine
  44. error('spm_bsplins.c not compiled - see Makefile');