Path: news.mathworks.com!not-for-mail
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$1@newscl01ah.mathworks.com>
References: <he23gu$5bv$1@fred.mathworks.com> <dba81928-387f-46d6-a867-e5d56468d3c8@g23g2000yqh.googlegroups.com> <he2ch7$7gm$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-00-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1332421932 6559 172.30.248.45 (22 Mar 2012 13:12:12 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 22 Mar 2012 13:12:12 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 3395643
Xref: news.mathworks.com comp.soft-sys.matlab:761833

"Eli " <elechtma@ryerson.ca> wrote in message <he2ch7$7gm$1@fred.mathworks.com>...
> 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.