reColor = () => {
console.log("Recolor the cortex to", select);
if (select === "Normal") {
dynamicModel.rgbs = dynamicModel.normals;
return "Normal: The cortex is colored with the cells' direction";
}
if (select === "Raw Area") {
dynamicModel.rgbs = mkColorsByAreas(lhPialModel.areas);
return "Raw Area: The cortex is highlighted by the cells' raw area";
}
if (select === "Flat Area") {
dynamicModel.rgbs = mkColorsByAreas(lhInflatedModel.areas);
return "Flat Area: The cortex is highlighted by the cells' inflated area";
}
if (select === "Sphere Area") {
dynamicModel.rgbs = mkColorsByAreas(lhSphereModel.areas);
return "Sphere Area: The cortex is highlighted by the cells' sphere area";
}
if (select === "Ratio") {
const areas1 = lhSphereModel.areas;
const areas2 = lhPialModel.areas;
dynamicModel.rgbs = mkColorsByAreas(math.dotDivide(areas1, areas2));
return "Ratio: The cortex is highlighted by the ration between sphere and raw area";
}
console.warn("Failed recolor the cortex to", select);
}