Hi Josep
I've done something like this by selecting the hole's perimeter and
keeping those co-ordinates in an array, then selecting the outer
perimeter and keeping its coordinates in an array. Then for each point
in the hole array I calculate the distance to each point in the outer
perimeter array and keep the shortest distance. This is probably not
very computationally efficient, but it works ;-).
Mike
Josep M. wrote:
> Hi everyone,
>
> I am dealing with particles with a single hole. I am trying to measure the
> shortest distance between the hole surface and the particle surface, but I
> don’t manage to calculate it.
>
> I have tried by programming a macro loop where the hole is selected,
> enlarged a pixel, and measured again, until the hole touches the particle
> surface and the particle becomes solid. The number of iterations should
> have been the shortest distance. But pixels are squared, so the growing
> hole tends to become a square shape, and therefore the procedure is not
> valid.
>
> I have no idea about how to measure that distance. Any tool or idea you may
> have will be kindly welcome.
> Thank you in advance.
>
> Josep M.
>