Skip to content

Commit

Permalink
csv delimiter
Browse files Browse the repository at this point in the history
  • Loading branch information
charleygros committed Sep 19, 2018
1 parent f177940 commit 850c240
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ def convert_data2mnc(dataset_info, contrast='t1'):
path_template_mask = create_mask_template(dataset_info, contrast)

output_list = open('subjects.csv', "wb")
writer = csv.writer(output_list, delimiter=',', quotechar='"', quoting=csv.QUOTE_ALL)
writer = csv.writer(output_list, delimiter =',', quotechar=',', quoting=csv.QUOTE_MINIMAL)

tqdm_bar = tqdm(total=len(list_subjects), unit='B', unit_scale=True, desc="Status", ascii=True)
for subject_name in list_subjects:
Expand All @@ -707,7 +707,7 @@ def convert_data2mnc(dataset_info, contrast='t1'):

sct.run('nii2mnc ' + fname_nii + ' ' + fname_mnc)

writer.writerow(fname_mnc + ',' + path_template_mask)
writer.writerow([fname_mnc, path_template_mask])

tqdm_bar.update(1)
tqdm_bar.close()
Expand Down

0 comments on commit 850c240

Please sign in to comment.