[Insight-developers] fast image pixel access method

Williams, Norman K norman-k-williams at uiowa.edu
Mon May 13 10:02:03 EDT 2013


I would think an itk::NeighborhoodIterator with a radius of [1,1,1] would
do.  Are there any requirements other than direct adjacency to the
neighborhood you want to traverse?

I haven't looked closely at the code but I think it's about as well
optimized as it could be.
--
Kent Williams norman-k-williams at uiowa.edu






On 5/12/13 8:43 PM, "Gao, Yi" <gaoyi.cn at gmail.com> wrote:

>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
>



________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________


More information about the Insight-developers mailing list