save landmarks

59 views
Skip to first unread message

Ilaria A.

unread,
Mar 6, 2021, 4:44:55 AM3/6/21
to scalismo

Hi everybody,
I have a question: I found the landmarks on my target from the landmarks of the reference, using the function findclosestpoint:
val targetIDs = landmarksRef.map(_.point).map(lm => target.findClosestPoint(lm).id)
val targetLM = targetIDs.map{id => target.point(id)}
show(targetLM, "transLm")

Now, I need to save my targetLM as a file .json, there is a way to do this using ScalismoLab?

Best regards,
Ilaria

Marcel Luethi

unread,
Mar 6, 2021, 5:29:52 AM3/6/21
to Ilaria A., scalismo
Hi Ilaria,

You can either save it by right clicking on "landmarks" in the scene tree in ScalismoLab, or from code as follows:
> val landmarks : Seq[Landmark[_3D]] = ???
> LandmarkIO.writeLandmarksJson(landmarks.toList, new java.io.File("filename.json")).get

Best regards,

Marcel

--
You received this message because you are subscribed to the Google Groups "scalismo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalismo+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scalismo/e7da21d8-0608-4441-b37a-1c3bdf93868an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages