Skip to content

[ENH] Update to dipy 1.13 - DO NOT MERGE -#1317

Open
arnaudbore wants to merge 11 commits intoscilus:masterfrom
arnaudbore:update_dipy
Open

[ENH] Update to dipy 1.13 - DO NOT MERGE -#1317
arnaudbore wants to merge 11 commits intoscilus:masterfrom
arnaudbore:update_dipy

Conversation

@arnaudbore
Copy link
Contributor

Quick description

Please include a summary of the changes and the related issue(s) or improvement(s).
Please also include relevant motivation and context. List any dependencies that are required for this change if needed.

...

Type of change

Check the relevant options.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Provide data, screenshots, command line to test (if relevant)

...

Checklist

  • My code follows the style guidelines of this project (run autopep8)
  • I added relevant citations to scripts, modules and functions docstrings and descriptions
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I moved all functions from the script file (except the argparser and main) to scilpy modules
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@codecov
Copy link

codecov bot commented Mar 18, 2026

Codecov Report

❌ Patch coverage is 88.57143% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.63%. Comparing base (a31226a) to head (54c574e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1317      +/-   ##
==========================================
- Coverage   72.63%   72.63%   -0.01%     
==========================================
  Files         295      295              
  Lines       25588    25596       +8     
  Branches     3597     3601       +4     
==========================================
+ Hits        18587    18591       +4     
- Misses       5489     5490       +1     
- Partials     1512     1515       +3     
Flag Coverage Δ
smoketests 69.48% <88.57%> (-0.01%) ⬇️
unittests 14.20% <11.42%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Scripts 75.26% <80.00%> (-0.02%) ⬇️
Library 69.50% <95.00%> (+<0.01%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@CHrlS98 CHrlS98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty simple PR it'd seem. I did not try running the code but read carefully. Comments are mostly to make sure we really understand what is going on.

'fa.nii.gz')
ret = script_runner.run(['scil_tractogram_convert', in_fib,
'gyri_fanning.trk', '--reference', in_fa])
ret = script_runner.run(['scil_tractogram_convert', in_trk,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I take it we can't convert fib to trk anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can but the fib file we have for our test are not correct.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we update the file then, before merging the PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@frheault do you think it's worth it ? we can remove the file or I create a new/fixed .fib file by converting the trk to fib.

Comment on lines +230 to +240
if vol_data.ndim == 4 and np.ndim(sigma) == 3:
data_denoised = np.empty_like(vol_data)
for vol_idx in range(vol_data.shape[-1]):
data_denoised[..., vol_idx] = nlmeans(
vol_data[..., vol_idx], sigma,
mask=mask_denoise, rician=not args.gaussian,
num_threads=args.nbr_processes)
else:
data_denoised = nlmeans(
vol_data, sigma, mask=mask_denoise, rician=not args.gaussian,
num_threads=args.nbr_processes)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change would be because nlmeans does not support 4D volumes anymore?

monkeypatch.chdir(os.path.expanduser(tmp_dir.name))
in_fib = os.path.join(SCILPY_HOME, 'surface_vtk_fib',
'gyri_fanning.fib')
in_trk = os.path.join(SCILPY_HOME, 'surface_vtk_fib',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure the name of this test really fits the content? What is surface_vtk_fib?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"surface_vtk_fib" is the test folder used here.

Copy link
Member

@frheault frheault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I tested the filtering with ROI, density mapping and the cutting script because it seems like an important part of the PR and it is working well.

I think it would be a good moment to adress the ton of warnings related to '' UserWarning: Pass ['sh_order_max', 'basis_type'] as keyword args. From version 2.0.0 passing these as positional''
UserWarning: Pass ['bbox_valid_check'] as keyword args. From version 2.0.0 passing these as positional arguments will result in an error.

It is annoying when running tests, but also scary for using for no reason, this is easily solved. I think this should be done before next release (2.3)

@arnaudbore arnaudbore changed the title [ENH] Update to dipy 1.12 [ENH] Update to dipy 1.13 - DO NOT MERGE - Mar 24, 2026
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.

3 participants