After vtk.js' ImageCPRMapper class example is run, how do I get the image coordinates of the center line on the cpr plane in stretch and straighten mode

Yes, but when I calculate that the points are connected to the line, the rotation Angle is changing, not according to this center point set the point fixed center line, is my coordinates not correctly converted? I have converted the coordinates to display coordinates, but the x coordinates obtained still exceeds the width of my canvas. How can I correctly convert the coordinates to my custom canvas coordinates? I have tried many times and it is still wrong, which makes me very upset. You’ve been very helpful, thanks!