@@ -129,8 +129,8 @@ def get_spinal_cord_info(patient_data, spinal_cord_path, discs_path, timepoint):
129
129
130
130
def analyse_lesion_per_levels (patient_data , discs_path , timepoint , output_folder ):
131
131
"""
132
- This function focuses on lesions per spinal cord levels.
133
- It computes the number, volume and average length of lesions per spinal cord level .
132
+ This function focuses on lesions per vertebral levels.
133
+ It computes the number, volume and average length of lesions per vertebral levels .
134
134
135
135
Input:
136
136
lesion_seg_file : path to the lesion segmentation file
@@ -181,7 +181,7 @@ def analyse_lesion_per_levels(patient_data, discs_path, timepoint, output_folder
181
181
levels = np .unique (disc_seg_data )
182
182
levels = levels [levels != 0 ]
183
183
184
- #we iterate over the levels
184
+ #we iterate over the intervetebral discs (aka levels here)
185
185
for i in range (len (levels )- 1 ):
186
186
#get upper bound of level
187
187
upper_bound = np .where (disc_seg_data == levels [i ])
@@ -374,7 +374,7 @@ def analyze_patient_lesion(patient_data, lesion_path, timepoint, output_folder):
374
374
def analyze_patient_tsv (participant_id , participants_tsv , timepoint ):
375
375
"""
376
376
This function gathers information from the participants.tsv file.
377
- It gathers information on each participant, their pathology (and the material used for image acquisition).
377
+ It gathers information on each participant, their pathology (and the acquisition parameters used for image acquisition).
378
378
379
379
Input:
380
380
participant_id : id of the participant
@@ -390,7 +390,7 @@ def analyze_patient_tsv(participant_id, participants_tsv, timepoint):
390
390
patient_data ["site" ] = participant_id .split ('-' )[1 ][:3 ]
391
391
#sex
392
392
patient_data ["sex" ] = participants_tsv .loc [participants_tsv ["participant_id" ] == participant_id ]["sex" ].values [0 ]
393
- #age at M0
393
+ #age at scan
394
394
patient_data ["age" ] = participants_tsv .loc [participants_tsv ["participant_id" ] == participant_id ]["age_" + timepoint ].values [0 ]
395
395
#pathology
396
396
patient_data ["pathology" ] = participants_tsv .loc [participants_tsv ["participant_id" ] == participant_id ]["pathology_M0" ].values [0 ]
@@ -493,4 +493,4 @@ def main():
493
493
494
494
495
495
if __name__ == '__main__' :
496
- main ()
496
+ main ()
0 commit comments