Convert .PTS landmarks coordinates in .fcsv or .LPS format

Hi!

Is it possible to transform a file of .PTS landmark coordinates into .fcsv or .LPS/.RAS format? I have landmarks coordinated in .TPS to use as templates in ALPACA.

Thank you very much in advance

Adrian

Operating system: Windows 10 (x64)
Slicer version: 5.6.2
Expected behavior:
Actual behavior:

There is nothing that will automatically do this in Slicer. You can of course develop a python script to do that.

If you are using R, I think geomorph reads TPS files, and you can then use SlicerMorphR to write them as fcsv. Although I highly encourage you switch to JSON (both functions are available in SlicerMorph write.markups.fcsv, or write.markups.json)

Thank you very much! Anyway, I ´ll try to develop an algorithm to obtain this trasnformation

If you know the PTS format, this should be simple. Read the landmark coordinates as a numpy array, and write them as a mrk.json one specimen at a time. For a basic mrk.json example see with 3 landmarks:

https://slicer.readthedocs.io/en/latest/developer_guide/modules/markups.html#markups-json-file-format-mrk-json

Great!. I´ll try that.

Thank you so much!