Thanks, @lassoan for your quick reply.
You can only interpret in with respect to another file. Instead, the file should contain physical coordinates (the origin of the input image included).
The files come with images here is the one from this segmentation
https://drive.google.com/file/d/1J4p6CWSczylnsfjwS-fV0VXOrAaFC31i/view
Here is the result of your script.
The points are now close to the vertebrae but not in the center. How can I involve the origin correctly?