Create line profile for given coordinates not markup points

I went through the Python code of the Line Profile, it only accepts the location of markup points manually created on the views to create a line profile. I need to create the line profiles out of know coordinates in the 3D space. Do you know how I can use my own points (using x,y,z coordinates) instead of manually selecting the markup points? Thanks.

Markup points positions are specified using physical coordinates already. You can type the coordinates in Markups module’s Control points section, or copy-paste the coordinates values from the clipboard, load them from a text, csv, or json file, or set them from a numpy array.

Would you explain in detail what you meant by “Markup points positions are specified using physical coordinates already”?
I think my question is more about when I have the markup points and they should be used as the inputs of the Line Profile. How the Line Profile code can import the list of given points and create the lines/tables?
Thanks a lot.

You can draw a line (placing the endpoints anywhere) and then go to Markups module and type the point coordinates. If you don’t want to type them then write the point coordinates in one of the file formats that I linked above and load that file.

If you click on “Compute intensity profile” then the table and plot are created automatically. If you want to drive this from Python entirely (no GUI at all) then you can instantiate and use the LineProfileLogic class.