Initial scoliosis pipeline (without models)\
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
from scoliosis_arcs import chaklin_degree
|
||||
|
||||
def build_scoliosis_description(arc_infos):
|
||||
if not arc_infos:
|
||||
return "Признаков сколиоза не выявлено."
|
||||
lines = []
|
||||
for i, a in enumerate(sorted(arc_infos, key=lambda x: x["cobb_deg"], reverse=True), start=1):
|
||||
degree = chaklin_degree(a["cobb_deg"])
|
||||
lines.append(
|
||||
f"Дуга {i}: {a['direction']}, уровни {a['upper_end']}-{a['lower_end']}, "
|
||||
f"вершина ~ {a['apex_label']}, Cobb={a['cobb_deg']:.1f}°, степень={degree}."
|
||||
)
|
||||
return " ".join(lines)
|
||||
Reference in New Issue
Block a user