Skip to content

Fitting code contribution: SR_LUMC Matlab code for IVIM, DTI, and IVIM-DTI fitting - #170

Open
s-rauh wants to merge 7 commits into
OSIPI:mainfrom
s-rauh:main
Open

Fitting code contribution: SR_LUMC Matlab code for IVIM, DTI, and IVIM-DTI fitting#170
s-rauh wants to merge 7 commits into
OSIPI:mainfrom
s-rauh:main

Conversation

@s-rauh

@s-rauh s-rauh commented Jul 21, 2026

Copy link
Copy Markdown

Fitting code contribution in src/original/fitting. The code contains Matlab fitting routines for IVIM, IVIM-DTI, and DTI.

@s-rauh
s-rauh requested a review from oliverchampion July 21, 2026 08:57
@Devguru-codes

This comment was marked as spam.

@s-rauh

s-rauh commented Aug 5, 2026

Copy link
Copy Markdown
Author

Thanks for looking into the code. I adjusted a few things:

Models: The folder "models/" including the ivimfun, dtifun etc was indeed missing, thanks for spotting this. "models" appears in gitignore (which I missed). I renamed the folder and added it.

  1. remove_zeros.m: I adjusted the code accordingly
  2. fit_ivim.m option 'segmented': I corrected the data selection for this option
  3. norm_diffdata.m: the normalization is performed before b-value scaling, so it should not be a problem. However, as the differentiation was redundant, I adjusted the code to always use normalization to the minimum b-value:
    if min(bval) > 0
    fprintf('No b = 0 data provided. Normalize to minimum b-value data: %.2f s/mm². \n',...
    min(bval))
    else
    fprintf('Normalize data to b = %.2f data. \n', min(bval))
    end

mS0 = mean(data((bval == min(bval)),:), 1);

normalized = data ./ mS0;
normalized(isnan(normalized)) = 0;

@Devguru-codes

This comment was marked as spam.

@s-rauh

s-rauh commented Aug 21, 2026

Copy link
Copy Markdown
Author

I added a setup.m file to add the path before using the code and added a statement in the readme.
I also added a check for non-finite values in the FA map in calc_dti_parameters.m

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants