Browse files

Fixed resample bug in tri_cubic_convolve function.

  • Loading branch information...
1 parent f567feb commit 75cedf9892263ed72f7f1f60ccbf0033e64595d4 tom.waite committed Feb 20, 2008
Showing with 2 additions and 2 deletions.
  1. +2 −2 scipy/ndimage/src/register/Register_IMPL.c
View
4 scipy/ndimage/src/register/Register_IMPL.c
@@ -75,15 +75,15 @@ float tri_cubic_convolve(unsigned char *pVolume, int x, int y, int z, float xp,
}
}
/* interpolate across 4 layers */
- if(R > D){
+ if(L > D){
Y[0] = NewLayer[0];
Y[1] = NewLayer[1];
Y[2] = NewLayer[2];
Y[3] = NewLayer[3];
ps1 = Y[2] - Y[0];
ps2 = (float)2.0*(Y[0] - Y[1]) + Y[2] - Y[3];
ps3 = -Y[0] + Y[1] - Y[2] + Y[3];
- T = (Y[1]+R*(ps1+R*(ps2+R*ps3)));
+ T = (Y[1]+L*(ps1+L*(ps2+L*ps3)));
valueXYZ = T;
}
else{

0 comments on commit 75cedf9

Please sign in to comment.