Skip to content

Commit f75534d

Browse files
committed
Use tqdm python3 library to show the progress of the wrapper when running
1 parent 5b6f6ae commit f75534d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

WrapImage/nifti_wrapper.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
import os
44
import nibabel as nib
55
from src.wrappers.OsipiBase import OsipiBase
6-
from utilities.data_simulation.GenerateData import GenerateData
76
import numpy as np
7+
from tqdm import tqdm
8+
89

910
def read_nifti_file(input_file):
1011
"""
@@ -102,7 +103,7 @@ def loop_over_first_n_minus_1_dimensions(arr):
102103
Dp_image = []
103104
D_image = []
104105

105-
for idx, view in loop_over_first_n_minus_1_dimensions(data):
106+
for idx, view in tqdm(loop_over_first_n_minus_1_dimensions(data), desc=f"{args.algorithm} is fitting", dynamic_ncols=True, total=702464):
106107
[f_fit, Dp_fit, D_fit] = fit.osipi_fit(view, bvals)
107108
f_image.append(f_fit)
108109
Dp_image.append(Dp_fit)

0 commit comments

Comments
 (0)