NicoKiaru / LimeSeg

Point based 3D segmentation plugin for FIJI
Creative Commons Zero v1.0 Universal
9 stars 2 forks source link

Change Gaussian Curvature Coloration Scheme #16

Closed oleland-br closed 1 year ago

oleland-br commented 1 year ago

Is there a way to change the palette for the GC curvature labeling?

NicoKiaru commented 1 year ago

Yes, it's all in the script:

https://github.com/NicoKiaru/LimeSeg/blob/master/src/main/resources/script-templates/LimeSeg/DisplayCurvature3D.groovy

Does this script make sense to you ? Are you a bit familiar with java code ?

This class:

https://github.com/NicoKiaru/LimeSeg/blob/45a654b68261ee0f5d70d8c87b95241bdc653a69/src/main/resources/script-templates/LimeSeg/DisplayCurvature3D.groovy#L28-L46

sets the color of each vertex (DotN) object depending on its gaussian curvature. You can see how the color (rgb) is set depending on the gaussian curvature property of the DotN object:

https://github.com/NicoKiaru/LimeSeg/blob/45a654b68261ee0f5d70d8c87b95241bdc653a69/src/main/resources/script-templates/LimeSeg/DisplayCurvature3D.groovy#L36-L43

this method returns a [red, green, blue, alpha] array (affecting the green or red component if the curvature is >0 or <0)

You can play a bit with these lines and see how the color is changing. You need to enable this "shader" by uncommenting the line 13 of this script and commenting the line 14

oleland-br commented 1 year ago

Sorry for the delayed response. I'm less familiar with java so this was helpful. Thank you!