Mapping between coordinate position (x,y,z) and voxel index

Thanks. It worked.