help > physical space to voxel space (i,j,k)
Oct 17, 2012  10:10 PM | Birkan Tunc
physical space to voxel space (i,j,k)
i was trying to figure out the transformation between physical space to voxel space for tract output. In the documentation it says, to transform a physical coordinate to voxel index you simply do

floor(x / xVoxelDim)
floor(y / yVoxelDim)
floor(z / zVoxelDim)

However, I definetely need something more comprehensive since this transformation does not consider origin orientation etc. Let me give an example,

Assume we have 128x128x70 image with voxel dims 1.875, 1.875, 2.0 respectively.The physical coordinate of origin is -120, -132.110, -37.523  Image is in LPS order. I think camino use RAS order...

Here are some physical coordinates (x,y,z) of camino's output
-19.7166690826 -59.717010498 45.477432251
-5.78898382187 -3.82826209068 32.5960655212

As you see some of them negatives due to orientation of the origin. Then, what is the formula to get indices(i,j,k) of these coordinates?

Threaded View

TitleAuthorDate
physical space to voxel space (i,j,k)
Birkan Tunc Oct 17, 2012
Philip Cook Oct 17, 2012
Birkan Tunc Oct 17, 2012
Philip Cook Oct 17, 2012
Birkan Tunc Oct 18, 2012
Philip Cook Oct 18, 2012
Birkan Tunc Oct 18, 2012
Philip Cook Oct 18, 2012
Birkan Tunc Oct 18, 2012