Dear all, Could I have some suggestions on ways to fast access the nerighbors of a set of random voxels? The scenario is as follows:
I have to access some voxels in the volume, these voxels are quite randomly distributed. For each of them I know their (x, y, z) indexes. At each of these voxel, I need to access all its 26 neighbors. I want this step to be faster. So i'm hoping to have something like: 1. for each (x, y, z), I get the pointer to that voxel: ptr. 2. For each of its neighbors, I use things like ptr[1], ptr[nx], ptr[1+ nx*ny] to access (x+1, y, z), (x, y+1, z) and (x+1, y, z+1).... Could I know if there is some good way to do that? Thank you in advance for any hint! Best, yi
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Kitware offers ITK Training Courses, for more information visit: http://kitware.com/products/protraining.php Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ Follow this link to subscribe/unsubscribe: http://www.itk.org/mailman/listinfo/insight-developers
