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

dwidenoise: Enhancements #3029

Draft
wants to merge 20 commits into
base: dev
Choose a base branch
from
Draft

dwidenoise: Enhancements #3029

wants to merge 20 commits into from

Conversation

Lestropie
Copy link
Member

Doing some work on #3023 (specifically #2742) for a Hackathon.

Draft PR; scope will change over the next couple of days.

Better separation of code responsible for fetching a batch of input data within a sliding spatial window from the code responsible for the denoising of the image data.
@Lestropie Lestropie self-assigned this Nov 4, 2024
github-actions[bot]

This comment was marked as outdated.

New default behaviour is to use an expanding spherical kernel with number of voxels at least 1.1 times the number of volumes. For voxels near the edge of the image FoV, the radius of the kernel will increase until the requisite number of voxels is obtained.
Note that execution speed of this implementation seems to be reduced, even when using the cuboid kernel; this may be due to use of Eigen Blocks to denoise voxels with kernels smaller than the maximum processed.
github-actions[bot]

This comment was marked as outdated.

- Added ability to define a spherical kernel of a fixed radius. This will result in voxels near the edges of the image FoV having fewer voxels within the PCA kernel.
- Added option -voxels, to generate a spatial map of the number of voxels utilised in the PCA decomposition at each voxel location.
github-actions[bot]

This comment was marked as outdated.

github-actions[bot]

This comment was marked as outdated.

github-actions[bot]

This comment was marked as outdated.

github-actions[bot]

This comment was marked as outdated.

- Add option -max_dist, which exports a map encoding for each voel the maximal distance between that voxel and a voxel included in the PCA decomposition.
- Refactor KernelData to keep track of the distance between each voxel within the kernel and the voxel being processed.
- Bug fix to spherical kernels; kernel was erroneously being applied from the outside inwards rather than from the origin outwards.
- Change type used for data encoding the spherical kernel, which should improve computational performance.
github-actions[bot]

This comment was marked as outdated.

github-actions[bot]

This comment was marked as outdated.

github-actions[bot]

This comment was marked as outdated.

Change from recollection-from-memory ratio of 1.1 to that reported in the corresponding publication of 1.0/0.85.
- Default behaviour is now to use optimal shrinkage based on minimisation of the Frobenius norm.
- Prior behaviour can be accessed using "-filter truncate".
Closes #3022.
@Lestropie Lestropie changed the title dwidenoise: Modularise kernel dwidenoise: Enhancements Nov 8, 2024
github-actions[bot]

This comment was marked as outdated.

Default behaviour is to use a Gaussian kernel (as used in Cordero-Grande et al. 2019) with FWHM equal to twice the voxel spacing.
Closes #3024.
An estimated PCA rank that is the weighted average of the patches that contributed to the rank estimation via overcomplete local PCA reconstruction is likely a superior measure of signal rank for downstream use.
@Lestropie
Copy link
Member Author

@Arshiyasan: The code base has changed a whole lot since you last looked at it. If you want to contribute code for dwidenoise taking an input noise map, it'll need to be refactored, achieving it with a new class derived from Estimator::Base. If you still want to try it, I'll hold out, otherwise LMK and I'll get it done, I've kind of been scratching an itch here.

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

Successfully merging this pull request may close these issues.

1 participant