How to crop coordinates within a (Delaunay) surface?

Hi everyone,
I hope that I am explaining this problem clearly. I need to be able to crop out lower-resolution voxel coordinates that lie within a surface derived from higher-resolution voxel coordinates.
The long story short here is that I have data that comes from two different imaging modalities (high res: anatomical MRI; low res: diffusion tensor imaging, DTI). The image sets are co-registered to one another so they are aligned, but the anatomical MRI is much higher-resolution than the DTI. I'm able construct a surface for a brain landmark of interest in MATLAB using a Delaunay Triangulation, derived from the higher-resolution coordinates. I need a way to find the lower-resolution coordinates that lie within that surface. There is no direct overlap between the actual coordinates, so I can't just use a "find" command to fix this.
Can anyone help? Thanks in advance!

7 Comments

If the images are coregistered, do you have the transformation matrix?
Hi Sean,
Yes I do have the transformation matrix. I already apply it in advance to get the coordinates properly aligned. Even after applying the transformation, the actual coordinates won't have any perfect overlaps. For example, the higher-resolution image may have coordinates at (0.5, 0.5, 0.5) and (1, 0.5, 0.5) while the lower resolution image just has one at (0.6, 0.5, 0.5). Does that make sense?
A more simple explanation of this problem: how can I determine if some arbitrary point (Px, Py, Pz) lies within an irregular surface?
Oh, in that case, you can use the inpolygon() function, which is designed for this (in 2D). Although I prefer the inpoly ( http://www.mathworks.com/matlabcentral/fileexchange/10391-fast-points-in-polygon-test) for this purpose, as it is much faster than the built-in version.
Layla
Layla on 6 May 2013
Edited: Layla on 6 May 2013
Thanks! inpoly looks very promising. I assume this code would search within 2D slices of the shape in question. But the surfaces I work with are quite irregular--do you think that this code is robust enough for an oddly-shaped brain nucleus?
I'm currently messing around with a combination of creating a tesselation with delaunayn and using tsearchn to solve this problem also. See: http://www.mathworks.com/matlabcentral/newsreader/view_thread/33157
I think inpoly() would work for your purpose. In my experience tsearchn() can be rather slow, and if all you need is to identify whether points are within a (highly irregular) polygon, inpoly() should be fine.
That's terrific. Thank you so much!

Sign in to comment.

Answers (0)

Categories

Asked:

on 6 May 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!