Create masks that partition an image from a voronoi tesselation

Hello,

I am using Igor to process images of crystal lattices. The image contain projections of atomic columns of a given lattice. I identify the atomic columns using ImageAnalyzeParticles. Then, I pass the XY positions of the centers of the identified particles to ImageTransform voronoi to compute a voronoi tesselation of the image. I would like to use this tesselation to compute statistics for a region around each atomic column.

How can I link each polygon from the tesselation to the atomic columns it encompasses? I have not found anything in the documentation on this.

I've attached an example where I've overlaid the centers of the atomic columns (blue dots) and the voronoi tesselation (red vertices) on the original image.

Thank you for your help.
It seems to me that the only ingredient that you are missing is how to convert a polygon into a mask. One approach could be to use ImageBoundaryToMask. Here is an example:
make/n=(10,3) ddd=enoise(5)
•ddd[][2]=0
ImageTransform voronoi ddd
Display
appendToGraph ddd[][1] vs ddd[][0]
ModifyGraph mode=3,marker=19
appendToGraph M_VoronoiEdges[][1] vs M_VoronoiEdges[][0]
MatrixOP/o xxx=col(M_VoronoiEdges,0)
MatrixOP/o yyy=col(M_VoronoiEdges,1)
make/n=(500,500) scalingwave
SetScale/I x -10,10,"", scalingWave
SetScale/I y -10,10,"", scalingwave
// Now iterate over the "seeds" from the original triplet wave.  For example, picking up row 5:
ImageBoundaryToMask xwave=xxx,ywave=yyy,scalingWave=scalingwave,seedx=ddd[5][0],seedy=ddd[5][1],height=500,width=500


I hope this helps,

A.G.
WaveMetrics, Inc.