changepoint kernel

16 views
Skip to first unread message

Maia R.

unread,
Feb 23, 2021, 5:32:01 PMFeb 23
to scalismo
Hi everyone,
I'd like to use different kernels on different regions. For example, one kernel at the two extremities of a femur and another one in between. How can I define such regions in Scalismo ?
Thank you very much,
Best regards

Marcel Luethi

unread,
Feb 23, 2021, 11:18:54 PMFeb 23
to Maia R., scalismo
HI Maia

One simple possibility is to click some landmark points, and define a region as the points that are closest to a given landmark.
Another possibility would be to use a drawing tool, such as meshlab to color the regions, and then use the color as an indicator for the region. (To read a mesh colored mesh, you can use the method readVertexColorMesh3D, that you find in MeshIO).

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/2c82bb7c-f903-4b0f-a2f7-a1b7004e2617n%40googlegroups.com.

V R

unread,
Feb 24, 2021, 8:26:18 AMFeb 24
to Marcel Luethi, scalismo
Thank you very much. 
Good idea for the color !

Maia R.

unread,
Mar 29, 2021, 11:31:50 AMMar 29
to scalismo
Hi,
How can I extract only a specific colored mesh ?
I tried to do this:
====
val coloredMesh = readVertexColorMesh3D("coloredMesh.ply")
val id = coloredMesh.color == Color.red
======
But id is just a boolean.

How can I  get the partial colored mesh or apply a kernel on such a partial colored mesh only ?

Thank you,
Best regards,
Maia

Marcel Luethi

unread,
Mar 29, 2021, 12:28:00 PMMar 29
to Maia R., scalismo
Hi Maia

You will need to loop over all the points/pointIds, and extract the point ids with the given color. Something like this should work:
val coloredMesh : VertexColorMesh3D = ???
val idsWithRedColor = coloredMesh.shape.pointSet.pointIds.filter(id => coloredMesh.color(id) == java.awt.Color.RED)
I am not sure, though, about the exact comparison of the colors. You might have to check how the color is represented, by printing out the color at a few point ids.

Best regards,

Marcel


Maia R.

unread,
Mar 29, 2021, 3:50:23 PMMar 29
to scalismo
Hi Marcel,
Thanks a lot.
Best regards
Maia
Reply all
Reply to author
Forward
0 new messages