Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use DIPY version of patch2self #902

Merged
merged 21 commits into from
Dec 11, 2024
Merged

Use DIPY version of patch2self #902

merged 21 commits into from
Dec 11, 2024

Conversation

tsalo
Copy link
Member

@tsalo tsalo commented Dec 9, 2024

Closes #893.

Changes proposed in this pull request

  • Remove internal implementation of patch2self and use version imported from dipy.
  • Fix Patch2Self interface to retain noise image and nmse text file in outputs.

@tsalo tsalo added the bug Something isn't working label Dec 9, 2024
@tsalo tsalo requested a review from mattcieslak December 9, 2024 20:44
@codecov-commenter
Copy link

codecov-commenter commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.80%. Comparing base (dfbf3ed) to head (8f3edf1).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #902      +/-   ##
==========================================
+ Coverage   44.22%   45.80%   +1.57%     
==========================================
  Files          66       65       -1     
  Lines        9835     9718     -117     
  Branches     1096     1062      -34     
==========================================
+ Hits         4350     4451     +101     
+ Misses       5262     5040     -222     
- Partials      223      227       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@mattcieslak mattcieslak left a comment

Choose a reason for hiding this comment

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

Great solution! I think we might be running some redundant testing now, but that's better than the alternative

@@ -62,6 +67,7 @@ def _calculate_nmse(self, original_nii, corrected_nii):
pd.DataFrame(
{title + '_pre': pres, title + '_post': posts, title + '_change': differences}
).to_csv(output_file, index=False)
self._nmse_text = output_file
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is really clever!

@tsalo tsalo merged commit 716aac4 into master Dec 11, 2024
24 checks passed
@tsalo tsalo deleted the patch2self branch December 11, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use official DIPY version of patch2self
3 participants