From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: points in voxels
Date: Thu, 22 Mar 2012 13:12:12 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 8
Message-ID: <jkf8fc$6cv$>
References: <he23gu$5bv$> <> <he2ch7$7gm$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1332421932 6559 (22 Mar 2012 13:12:12 GMT)
NNTP-Posting-Date: Thu, 22 Mar 2012 13:12:12 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 3395643
Xref: comp.soft-sys.matlab:761833

"Eli " <> wrote in message <he2ch7$7gm$>...
> thanks for the help, but I think you misunderstood my problem.
> I am able to index the voxels. but suppose I choose a random point (x,y,z), which will not in general have integer values, and will not in general lie in the centre of the voxel. I wish to find which voxel this point falls in. What I am doing now. is calculating the difference between my point and the centres of all voxels, and then finding the minimum distance, however, this is quite computationally heavy. Is there a faster way to determine in which voxel index my point falls?
> -Eli

Hi Eli,

I have the same problem as yours. Did you solve by yourself such an issue? I think that the workaround you proposed works only if the voxel is a sphere around the central point, but if you have a squared voxel the problem is not fully solved.