X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=utilities%2FCxImage%2Fximaint.cpp;h=b09d54968138d9e747e68e47a95ae67d7ed9ec93;hb=0141f3887fe8e6e429621b603b6359be679e9fb5;hp=989d76cf71e3d1014cb7b95d2e46706a2995c0dd;hpb=fc2b78aedceae6ebeb0dbe8aae649bc84fd8e235;p=clitk.git diff --git a/utilities/CxImage/ximaint.cpp b/utilities/CxImage/ximaint.cpp index 989d76c..b09d549 100644 --- a/utilities/CxImage/ximaint.cpp +++ b/utilities/CxImage/ximaint.cpp @@ -26,8 +26,8 @@ void CxImage::OverflowCoordinates(long &x, long &y, OverflowMethod const ofMetho switch (ofMethod) { case OM_REPEAT: //clip coordinates - x=max(x,0); x=min(x, head.biWidth-1); - y=max(y,0); y=min(y, head.biHeight-1); + x=__max(x,0); x=__min(x, head.biWidth-1); + y=__max(y,0); y=__min(y, head.biHeight-1); break; case OM_WRAP: //wrap coordinates @@ -59,8 +59,8 @@ void CxImage::OverflowCoordinates(float &x, float &y, OverflowMethod const ofMet switch (ofMethod) { case OM_REPEAT: //clip coordinates - x=max(x,0); x=min(x, head.biWidth-1); - y=max(y,0); y=min(y, head.biHeight-1); + x=__max(x,0); x=__min(x, head.biWidth-1); + y=__max(y,0); y=__min(y, head.biHeight-1); break; case OM_WRAP: //wrap coordinates @@ -397,6 +397,8 @@ RGBQUAD CxImage::GetPixelColorInterpolated( kernely[i]=KernelPower((float)(yi+i-1-y)); }//for i break; + default: + i=0; }//switch rr=gg=bb=aa=0; if (((xi+2)=1 && ((yi+2)=1) && !IsIndexed()) { @@ -689,7 +691,7 @@ float CxImage::KernelBSpline(const float x) return (0.16666666666666666667f * (a - (4.0f * b) + (6.0f * c) - (4.0f * d))); - /* equivalent + /* equivalent if (x < -2.0) return(0.0f); if (x < -1.0) @@ -722,7 +724,7 @@ float CxImage::KernelLinear(const float t) // if (-1<=t && t<0) return 1+t; // return 0; - // + // if (t < -1.0f) return 0.0f; if (t < 0.0f) @@ -853,7 +855,7 @@ float CxImage::KernelBessel_J1(const float x) { double p, q; - register long i; + long i; static const double Pone[] = @@ -895,7 +897,7 @@ float CxImage::KernelBessel_P1(const float x) { double p, q; - register long i; + long i; static const double Pone[] = @@ -931,7 +933,7 @@ float CxImage::KernelBessel_Q1(const float x) { double p, q; - register long i; + long i; static const double Pone[] =