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

Hello, thank you, but how do I calculate the localXDirection, which I never got right