CreateSemiLMPatches CSV Landmark into a Single File

Operating system:Windows 10
Slicer version:5.6.2
Expected behavior: I am facing technical problems in the process of converting the selected landmarks into a single file using the ‘CreateSemiLMPatches’ module in the program and converting this file to CSV format. How can I solve this problem?
Actual behavior: how can I solve this problem?

@Esra_Karacan

So you have multiple markup files and you want to turn them into a single file and save it as csv? Is that correct?

if so, you can do this manually copying the control points from one markup object to the other. Go to the Markups module, expand the control points select all points and copy them

Open your excel or any other spreadsheet program, and then paste these values.Then move on to the next markup object and repeat the procedure.

If you have lots of files, this is a fairly tedious and error prone process. In that case you might want to write a small python or R script to read and flatten your landmarks into a single CSV.

May I ask why you are doing that? For example if your goal is to do shape analysis, you can do it inside the Slicer via SlicerMorph extension and not have to do any of this. If you can tell more about your use case, we might be able to help you better.

In my mandible shape analysis I want to create semi-landmarks between the homologous points I have selected in the Markups module. However, when I go to the CreateSemiLMPatches module, only the points I have selected as F_1 and F_2 appear in the Landmark Set field and therefore I cannot create the semi-landmarks.
Do I have to do it manually using Markups Control Point to create a landmark set?

I wanted to upload a picture but I couldn’t because the system doesn’t allow it, I apologize.

You

CreateSemiLMPatches will require at least three points. It creates triangular patches of dense semiLMs. You can look at the tutorial here. Tutorials/CreateSemiLMPatches at main · SlicerMorph/Tutorials · GitHub

However, we have now introduced a new method that is more flexible than those triangular patches. You may want to check that out. It is called PlaceLandmarkGrid. Take a look at the tutorial first: Tutorials/GridBasedLandmarking at main · SlicerMorph/Tutorials · GitHub

1 Like

Thank you very much for your suggestion. I will look at the PlaceLandmarkGrid method which is more flexible compared to the triangle patch method. I will review the tutorial first.