Skip to content

Commit 0b3e220

Browse files
committed
update wrapper
1 parent 4316bad commit 0b3e220

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/standardized/PVH_KB_NKI_IVIMfit.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
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
33
import numpy as np
44

55
class PVH_KB_NKI_IVIMfit(OsipiBase):
@@ -12,7 +12,7 @@ class PVH_KB_NKI_IVIMfit(OsipiBase):
1212
# the user inputs fulfil the requirements
1313

1414
# 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"
1616
id_algorithm_type = "Bi-exponential fit"
1717
id_return_parameters = "f, D*, D"
1818
id_units = "seconds per milli metre squared or milliseconds per micro metre squared"
@@ -50,10 +50,13 @@ def ivim_fit(self, signals, bvalues=None):
5050
_type_: _description_
5151
"""
5252
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
5356
fit_results = self.NKI_algorithm(signals,bvalues)
5457

55-
D = fit_results[0]
58+
D = fit_results[0]/1000
5659
f = fit_results[1]
57-
Dstar = fit_results[2]
60+
Dstar = fit_results[2]/1000
5861

5962
return f, Dstar, D

0 commit comments

Comments
 (0)