Skip to content

Commit 0f98ac3

Browse files
committed
limited spinal cord volume to C1-C7
2 parents 250f606 + 42b1e98 commit 0f98ac3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

dataset_analysis/generate_dataframe.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ def get_spinal_cord_info(patient_data, spinal_cord_path, discs_path, timepoint):
129129

130130
def analyse_lesion_per_levels(patient_data, discs_path, timepoint, output_folder):
131131
"""
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.
134134
135135
Input:
136136
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
181181
levels = np.unique(disc_seg_data)
182182
levels = levels[levels != 0]
183183

184-
#we iterate over the levels
184+
#we iterate over the intervetebral discs (aka levels here)
185185
for i in range(len(levels)-1):
186186
#get upper bound of level
187187
upper_bound = np.where(disc_seg_data == levels[i])
@@ -374,7 +374,7 @@ def analyze_patient_lesion(patient_data, lesion_path, timepoint, output_folder):
374374
def analyze_patient_tsv(participant_id, participants_tsv, timepoint):
375375
"""
376376
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).
378378
379379
Input:
380380
participant_id : id of the participant
@@ -390,7 +390,7 @@ def analyze_patient_tsv(participant_id, participants_tsv, timepoint):
390390
patient_data["site"] = participant_id.split('-')[1][:3]
391391
#sex
392392
patient_data["sex"] = participants_tsv.loc[participants_tsv["participant_id"] == participant_id]["sex"].values[0]
393-
#age at M0
393+
#age at scan
394394
patient_data["age"] = participants_tsv.loc[participants_tsv["participant_id"] == participant_id]["age_" + timepoint].values[0]
395395
#pathology
396396
patient_data["pathology"] = participants_tsv.loc[participants_tsv["participant_id"] == participant_id]["pathology_M0"].values[0]
@@ -493,4 +493,4 @@ def main():
493493

494494

495495
if __name__ == '__main__':
496-
main()
496+
main()

0 commit comments

Comments
 (0)