<su*******@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Hey all,
I have a small problem. I have a 3D image data. I am reading it as a
pointer *Inputimage. I need to convert it to 3D at only one point. can
any one tell me the mapping equation?
e,g
image[i][j][k] = *(InputImage + something*i +something*j +k)
I am sure it is possible. and the soln should look like something
like this.
Thanx
Consider 2 dimentional array 10x10. First 10 elements take the first row,
2nd 10 the 2nd row, etc.. So to get the first element (column) of the second
row it's *[Row*width + column] or 1*10+0 = 10 (remember, arrays are 0 based
in C/C++). Notice that width refers to the number of columns (first array
size).
Now, you have Row, Column, Depth. [Row*Width + Column*Height + Depth]
should do.