Rank: 44331 based on 0 downloads (last 30 days) and 0 file submitted

Thomas Hampshire

University College London

Personal Profile:


Watch this Author's files


Comments and Ratings by Thomas Hampshire View all
Updated File Comments Rating
31 Jul 2012 3D interpolation Fast 3D linear interpolation of scalar or vector valued 3D images. Author: Andriy Myronenko

Please note the dimension order when addressing the image 'imput_image':
(y,x,z). This has me confused for a while
Need to add following function to compile using VS:

static inline double round(double val){
return floor(val + 0.5);

27 Jul 2012 3D Volume Interpolation with ba_interp3: Fast interp3 replacement Faster Replacement for interp3 Author: Brian

Errors when compile mex file in Windows. Please change the following function to:

InterpolationMethod parseInterpolationMethod(const mxArray *method_string) {
if (method_string == NULL)
return Cubic;

char method[10] = "cubic ";

mxGetString(method_string, method, 9);

if (std::string(method).substr(0, 7).compare("nearest") == 0)
return Nearest;
else if (std::string(method).substr(0, 7).compare("linear") == 0)
return Linear;
else if (std::string(method).substr(0, 5).compare("cubic") == 0)
return Cubic;
mexErrMsgTxt("Specify one of nearest, linear, cubic as the interpolation method argument.");


Also add the function:

static inline double round(double val)
return floor(val + 0.5);

26 Jul 2012 Image Interpolation (ba_interp2) Fast nearest, bi-linear and bi-cubic interpolation for image data Author: Brian

Great piece of code. However will not compile on windows machines due to lack of a round() function in the c standard. Including the following piece of code in the cpp file will allow it to compile:

static inline double round(double val){
return floor(val + 0.5);

12 Jun 2012 B-spline Grid, Image and Point based Registration B-spline registration of two 2D / 3D images or corrsp. points, affine and with smooth b-spline grid. Author: Dirk-Jan Kroon

Dear Dirk,
First of all, a great piece of code.
I have been using the B-spline point registration code and have been attempting to make the following changes to your code:

I would like to constrain the control points that lie on the axis origin and maxima so that they cannot be moved from their positions. Ideally it would be possible to constrain these points in one dimension. I have been attempting to remove the control points that lie outside of the image to create the same effect, but with my limited knowledge of B-spline registration and your code I am getting some errors.

Would there be a 'quick fix' to achieve this?

Contact us