Markups - Creating a SINGLE file including Landmarks (fixed) and Curves (semilandmarks) - problem while resampling

Hi all,

I would like to pose a serie of (fixed) landmarks on my model and in between those landmarks, curves (semilandmarks).

I can make a node for landmarks using ‘create fiducial markup’ and another node for curves using ‘create open curve markup’. To insert my landmarks into the curves I can copy paste the landmarks from the “fiducial markup node” into the "open curve node ".

BUT when I use the “resample” option to get evenly-spaced points, it will resample all my markups - landmarks and curve points - meaning that my landmarks will move - while I want them to be fixed - and that I will not have the same number of semilandmarks between the landmarks for different specimens, which makes the generate file (fcsv) not comparable between specimens.

The only solution I see is to create different nodes for different curves (and so resample them separately), but then I have to export them separately as well, and I want a single file per specimen.

Is there a way to fix the landmarks delimiting a curve, and resample the different curves separately? And to get a single file with all markups.

Thanks a lot for your help!

We plan to add a right-click menu action that would allow exporting all markup nodes in a subject hierarchy folder into a single mrk.json file. Would this fulfill your needs?

Yes, if it’s possible to export several nodes into a single file (fcsv as well would be great), it should work for what I want to do…


Can you copy here the content of a file (in json or csv format) that you would ideally like to see as an output of the export operation? Probably it can be generated with 5-10 lines of Python code.

Yes, only the first and last LM in a resampled curve is treated as a fixed. The other points are simply enabling you to draw the curve in the way you would like to draw. As you suggested, the solution is to create multiple curves, and resample them independetly. Remember you can also resample them as a new curve so that they don’t overwrite the original points.

Until the new feature @lassoan mentioned is available, you can choose to create a blank curve node, and copy and paste contents from individually resampled curves.

Dear Dr Lasso,

When I apply the solution suggested by @muratmaga, to create different nodes for different curves and copy paste each one of them into a new blank curve node that I can export, I get the fcsv file here below. But I had to manually delete redundant landmarks : in node1, I have lmk1- 8semilmks - lmk2 and in node2 I have lmk2 - 8 semilmk - lmk3.
I have to place lmk2 in both nodes to get evenly spaced point between the two fixed lmks in each case.

It is of course feasible like that, and having a right-click menu action allowing exporting all markup nodes in a subject hierarchy folder into a single file would avoid the last step of copy paste all separate node into another single blank node.

The ideal for what I want to do would be to be able to directly place fixed landmarks (fiducial markups) and open curves into the same node, so I don’t have to delete redundant lmks AND I have a single file including all markups from 1 specimen.
and then have an option to export data from multiple specimens into a single file (.dta or .pts ?).
That would be ideal, but I can get to this result manually (just requires more clicking and format conversion…)

Thanks a lot for your help with this!
Best regards,

Markups fiducial file version = 4.11

CoordinateSystem = LPS

columns = id,x,y,z,ow,ox,oy,oz,vis,sel,lock,label,desc,associatedNodeID


This will not remove the redundant LMs from the export. Redundancy is coming from the workflow, not from copy/paste or merging. If you want to create a curve between, say, three anatomical LMs, and merge them, LM2 (or any of the points in the middle) will be still be redundant (as last LM point on the first curve and as the first LM point in the second curve).

People haven’t used the curve function to generate semiLMs and we haven’t thought about making something more than curve generation. A custom function to stitch them into a single curve into in the given order shouldn’t be too difficult. @smrolfe

This feature is now available in SlicerMorph. It is called MergeMarkups. You want to use the MergeCurves tab. If your curves are meant to be continuous (e.g., green and pink pair), check the continuous option, which when merging will remove the first LM of the second (and all subsequent) curves selected. If curves are separate, but they belong the same specimen and you want to store them in the same file for analytical reasons, uncheck the continuous option (default setting).

GIve it a try, and let us know how it works for you.

I’ve added a tutorial on the new MergeMarkups module in SlicerMorph, check it out here!