Can I export the data for multiple points at once?

I am landmarking approximately 44 points in a mesh. Exporting the x,y,z coordinates into an .fcsv file is extremely laborious. Is there any way to export the data for all 44 points simultaneously? Also, it would be great if when the data is exported it would go into a single .fcsv file, but that does not seem to be possible.

Hi,
Try this code

markupsNode = getNode("yourMarkupsNodeName")
markupsArray = slicer.util.arrayFromMarkupsControlPoints(markupsNode)

In here, markupsArray is numpy array easy to export as file

I hope it is help to you.

It is a single-click. right click and export as. I don’t think it can be made any more simpler.

I need to export multiple markups (currently 44 points), but the ‘Export to File’ feature only works for individual markups/points. This means I cannot export all of my desired .fcsv files at once. Instead, I am currently exporting 44 individual .fcsv files, one for each point. Is there a way to export all .fcsv files at once or to combine all the markups/points into a single .fcsv file?

(Clarifying my previous post, thank you)

You can add all the points to the same Point List and then they will all export to the same file.

Is there a reason why you are doing this? I mean pointLists can contain an arbitrary number of control points. Don’t create new pointList objects, just keep adding the points to the existing one, and you will end up with a single object to save and not need to merge things later.

When I try to export, I can only do one point at a time, I am attaching an image.


Additionally, under “Data” when I do highlight multiple points, the option to export does not populate when I right click.

That because you have created 5 pointList objects each of which has a single point in. I am not sure what your use case is, but I assume want to have all those 5 points in single pointList object (e.g., just F_1).

I think you will benefit reviewing our Markups tutorial: Tutorials/Markups_1 at main · SlicerMorph/Tutorials · GitHub carefully.

Regardless, if that’s what you want (i.e., 5 separate files with one point in each), you can use standard Save (CTRL+S) and choose which ones to save. Export to file is meant to work on one file at a time.