1
1
from src .wrappers .OsipiBase import OsipiBase
2
- from src .original .PvH_KB_NKI .DWI_functions_standalone import generate_IVIMmaps_standalone
2
+ from src .original .PvH_KB_NKI .DWI_functions_standalone import generate_IVIMmaps_standalone , generate_ADC_standalone
3
3
import numpy as np
4
4
5
5
class PVH_KB_NKI_IVIMfit (OsipiBase ):
@@ -12,7 +12,7 @@ class PVH_KB_NKI_IVIMfit(OsipiBase):
12
12
# the user inputs fulfil the requirements
13
13
14
14
# Some basic stuff that identifies the algorithm
15
- id_author = "Petra van Houdt and Koen Baas , NKI"
15
+ id_author = "Group Uulke van der Heide , NKI"
16
16
id_algorithm_type = "Bi-exponential fit"
17
17
id_return_parameters = "f, D*, D"
18
18
id_units = "seconds per milli metre squared or milliseconds per micro metre squared"
@@ -50,10 +50,13 @@ def ivim_fit(self, signals, bvalues=None):
50
50
_type_: _description_
51
51
"""
52
52
bvalues = np .array (bvalues )
53
+ # reshape signal as the function expects a 4D array
54
+ signals = np .reshape (signals , (1 , 1 , 1 , len (signals ))) # Question = signals always a 1D array in the tests?
55
+ # to do reshape signals into a 4D array as this is what the function expects as input
53
56
fit_results = self .NKI_algorithm (signals ,bvalues )
54
57
55
- D = fit_results [0 ]
58
+ D = fit_results [0 ]/ 1000
56
59
f = fit_results [1 ]
57
- Dstar = fit_results [2 ]
60
+ Dstar = fit_results [2 ]/ 1000
58
61
59
62
return f , Dstar , D
0 commit comments