Extract values at voxels within a segment

If you mean the physical (RAS) coordinates, I think you can rework this example: