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

Add gradient magnitude computation program LN2_GRAMAG #65

Closed
2 tasks done
ofgulban opened this issue Feb 3, 2023 · 2 comments
Closed
2 tasks done

Add gradient magnitude computation program LN2_GRAMAG #65

ofgulban opened this issue Feb 3, 2023 · 2 comments
Labels
done Resolved issues that can be mentioned in the release notes. new feature
Milestone

Comments

@ofgulban
Copy link
Collaborator

ofgulban commented Feb 3, 2023

It is currently becoming more and more handy to have a fast / ram efficient gradient magnitude computation. I should translate the gradient magnitude methods from https://github.com/ofgulban/segmentator to LayNii.

  • Add gradient magnitude without RAM inflation (do not hold gradient images, directly compute gradient magnitude per voxel). Important for e.g. whole brain 0.1 mm human brain images.
  • Add circular difference option for phase images (-pi to pi range).
@ofgulban ofgulban added this to the v2.4.0 milestone Feb 3, 2023
@ofgulban
Copy link
Collaborator Author

ofgulban commented Feb 14, 2023

I should add a circular difference option to compute gradients on phase images (e.g. -pi to pi).

ofgulban pushed a commit that referenced this issue Feb 16, 2023
@ofgulban
Copy link
Collaborator Author

ofgulban commented Feb 16, 2023

Circular difference option added

See the images below for the difference between normal gradient magnitude and "circular" gradient magnitude outputs:

  • Upper left is a phase image.
  • Upper right is "normal" gradient magnitude.
  • Lower left if circular gradient magnitude.
  • Colormaps are equal between gradient magnitude images.
  • Incorrectly inflated differences around phase wraps are visible in the "normal" gradient magnitude image (upper right).

Simulated phase data results:

Screenshot 2023-02-16 at 23 53 55

Empirical phase data results:

Screenshot 2023-02-16 at 23 52 57

@ofgulban ofgulban added the done Resolved issues that can be mentioned in the release notes. label Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done Resolved issues that can be mentioned in the release notes. new feature
Projects
None yet
Development

No branches or pull requests

1 participant