How to get the right coordinates for the data points.
You can get markups fiducial point positions by calling
GetNthFiducialPosition method. See many examples in script repository.
How can I get the fiducials inside the box. Why they are outside
Click the small box icon (“Center the 3D view on the scene”) in the top-left corner of the slice view to reset the box boundaries to current view content.