1 #include "IndiceTools_CPU.h"
3 /*----------------------------------------------------------------------*\
5 \*---------------------------------------------------------------------*/
7 /*--------------------------------------*\
9 \*-------------------------------------*/
15 * s[0,W*H[ --> i[0,H[ j[0,W[
17 void IndiceTools::toIJ( int s
, int w
, int* ptrI
, int* ptrJ
)
20 *ptrJ
= s
- w
* (*ptrI
);
23 float2
IndiceTools::toPixelFloat(int s
, int w
)
25 const float y
= (float)s
/ (float)w
;
26 const float x
= (float)s
- (float)w
* y
;
31 * i[0,H[ j[0,W[ --> s[0,W*H[
33 int IndiceTools::toS(int w
, int i
, int j
)
39 /*----------------------------------------------------------------------*\
41 \*---------------------------------------------------------------------*/