BodyScan / measurement_definitions.py
carsten12's picture
Update measurement_definitions.py
6c5a7a3 verified
Raw History Blame Contribute Delete
1.76 kB
# measurement_definitions.py
# Measurement type constants
LENGTH = 'LENGTH'
CIRCUMFERENCE = 'CIRCUMFERENCE'
# Which measurements are available and their type
MEASUREMENT_TYPES = {
'height': LENGTH,
'chest': CIRCUMFERENCE,
'waist': CIRCUMFERENCE,
'hip': CIRCUMFERENCE,
'shoulder_breadth': LENGTH,
'neck': CIRCUMFERENCE,
'wrist_right': CIRCUMFERENCE,
'bicep_right': CIRCUMFERENCE,
'forearm_right': CIRCUMFERENCE,
# Add other measurements as needed...
}
# Standard labels (literature labels) for each measurement name
STANDARD_LABELS = {
'height': 'P',
'chest': 'D',
'waist': 'E',
'hip': 'F',
'shoulder_breadth': 'O',
'neck': 'B',
'wrist_right': 'G',
'bicep_right': 'H',
'forearm_right': 'I',
# ...
}
# Landmarks (vertex names) used in length measurements
LENGTHS = {
# measurement_name : [landmark_name1, landmark_name2]
'height': ['head_top', 'foot_floor'], # example landmark names
'shoulder_breadth': ['L_shoulder', 'R_shoulder'],
# ...
}
# Circumferences are defined by one landmark and two joint names
CIRCUMFERENCES = {
# measurement_name : {'landmark': name, 'joints': (joint1, joint2)}
'chest': {'landmark': 'chest_mid', 'joints': ('L_shoulder', 'R_shoulder')},
'waist': {'landmark': 'waist_mid', 'joints': ('L_hip', 'R_hip')},
'hip': {'landmark': 'hip_mid', 'joints': ('L_hip', 'R_hip')},
'neck': {'landmark': 'neck', 'joints': ('L_shoulder', 'R_shoulder')},
'wrist_right': {'landmark': 'wrist_right', 'joints': ('R_elbow', 'R_wrist')},
'bicep_right': {'landmark': 'bicep_right', 'joints': ('R_shoulder', 'R_elbow')},
'forearm_right': {'landmark': 'forearm_right', 'joints': ('R_elbow', 'R_wrist')},
# ...
}