206 const double Aref00=
MAT_ELEM(Aref,0,0);
207 const double Aref10=
MAT_ELEM(Aref,1,0);
210 const double cen_y = (int)(
YSIZE(V2) / 2);
211 const double cen_x = (int)(
XSIZE(V2) / 2);
212 const double cen_yp = (int)(
YSIZE(V1) / 2);
213 const double cen_xp = (int)(
XSIZE(V1) / 2);
214 const double minxp = -cen_xp;
215 const double minyp = -cen_yp;
218 const double maxxp =
XSIZE(V1) - cen_xp - 1;
219 const double maxyp =
YSIZE(V1) - cen_yp - 1;
222 const int Xdim =
XSIZE(V1);
223 const int Ydim =
YSIZE(V1);
230 #ifdef DEBUG_APPLYGEO 231 std::cout <<
"A\n" << Aref << std::endl
232 <<
"(cen_x ,cen_y )=(" << cen_x <<
"," << cen_y <<
")\n" 233 <<
"(cen_xp,cen_yp)=(" << cen_xp <<
"," << cen_yp <<
")\n" 234 <<
"(min_xp,min_yp)=(" << minxp <<
"," << minyp <<
")\n" 235 <<
"(max_xp,max_yp)=(" << maxxp <<
"," << maxyp <<
")\n";
238 const double x = -cen_x;
240 for (
size_t i = 0;
i <
YSIZE(V2);
i++)
258 #ifdef DEBUG_APPLYGEO 260 std::cout <<
"Computing (" <<
i <<
"," <<
j <<
")\n";
261 std::cout <<
" (y, x) =(" << y <<
"," << x <<
")\n" 262 <<
" before wrapping (y',x')=(" << yp <<
"," << xp <<
") " 270 xp =
realWRAP(xp, minxp - 0.5, maxxp + 0.5);
275 yp =
realWRAP(yp, minyp - 0.5, maxyp + 0.5);
278 #ifdef DEBUG_APPLYGEO 280 std::cout <<
" after wrapping (y',x')=(" << yp <<
"," << xp <<
") " 282 std::cout <<
" Interp = " << interp << std::endl;
293 double wx = xp + cen_xp;
294 double wy = yp + cen_yp;
301 double wx_1 = 1 - wx;
302 double wy_1 = 1 - wy;
310 #ifdef DEBUG_APPLYGEO 311 std::cout <<
" From (" << n1 <<
"," << m1 <<
") and (" 312 << n2 <<
"," << m2 <<
")\n";
313 std::cout <<
" wx= " << wx <<
" wy= " << wy
323 dAij(V2,
i, j) = (T) (v1 + v2 + v3 + v4);
325 std::cout <<
" val= " <<
dAij(V2,
i, j) << std::endl;
337 int globalMin=0, globalMax=
XSIZE(V2);
340 int minX, maxX, minY, maxY;
368 if ((globalMax >= 0) && ((
size_t)globalMax >
XSIZE(V2)))
370 globalMax =
XSIZE(V2);
373 xp += globalMin*Aref00;
374 yp += globalMin*Aref10;
378 #pragma simd reduction (+:xp,yp) 379 for (
int j=globalMin; j<globalMax ;j++)
381 #ifdef DEBUG_APPLYGEO 383 std::cout <<
"Computing (" <<
i <<
"," << j <<
")\n";
384 std::cout <<
" (y, x) =(" << y <<
"," << x <<
")\n" 385 <<
" before wrapping (y',x')=(" << yp <<
"," << xp <<
") " 388 std::cout <<
" after wrapping (y',x')=(" << yp <<
"," << xp <<
") " 390 std::cout <<
" Interp = " << interp << std::endl;
401 double wx = xp + cen_xp;
405 double wy = yp + cen_yp;
410 #ifdef DEBUG_APPLYGEO 411 std::cout <<
" From (" << n1 <<
"," << m1 <<
") and (" 412 << n2 <<
"," << m2 <<
")\n";
413 std::cout <<
" wx= " << wx <<
" wy= " << wy << std::endl;
420 double wx_1 = (1-wx);
421 double wy_1 = (1-wy);
422 double aux2=wy_1* wx_1 ;
425 if ((wx != 0) && ((m2 < 0) || ((
size_t)m2 < V1.
xdim)))
428 if ((wy != 0) && ((n2 < 0) || ((
size_t)n2 < V1.
ydim)))
433 if ((wx != 0) && ((m2 < 0) || ((
size_t)m2 < V1.
xdim)))
437 dAij(V2,
i, j) = (T) tmp;
440 std::cout <<
" val= " <<
dAij(V2,
i, j) << std::endl;
#define DIRECT_A2D_ELEM(v, i, j)
#define MAT_ELEM(m, i, j)
#define XMIPP_EQUAL_ACCURACY
#define realWRAP(x, x0, xF)
#define XMIPP_RANGE_OUTSIDE_FAST(x, min, max)