12 #ifndef AIMS_REGISTRATION_TRANSFORMATION_D_H
13 #define AIMS_REGISTRATION_TRANSFORMATION_D_H
27 float angle_rad = p[2] /180.0 *
M_PI;
28 float c = cos( angle_rad );
29 float s = sin( angle_rad );
37 testtrans(x,y) = T( 195 );
39 if( ((_cx + c*(x-_cx) + s*(y-_cy) - p[1]) < nx)
40 && ((_cx + c*(x-_cx) + s*(y-_cy) - p[1]) >= 0)
41 && ((_cy - s*(x-_cx) + c*(y-_cy) - p[0]) < ny)
42 && ((_cy - s*(x-_cx) + c*(y-_cy) - p[0]) >= 0) )
43 testtrans(x,y) = test->
at(
44 unsigned( _cx + c*(x-_cx) + s*(y-_cy) - p[1]),
45 unsigned( _cy - s*(x-_cx) + c*(y-_cy)-p[0]) ) ;
const T & at(long x, long y=0, long z=0, long t=0) const