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

MRI denoising using MP-PCA #2

Closed
2 tasks
Lestropie opened this issue Oct 14, 2024 · 3 comments
Closed
2 tasks

MRI denoising using MP-PCA #2

Lestropie opened this issue Oct 14, 2024 · 3 comments

Comments

@Lestropie
Copy link

Title

Improving MP-PCA denoising of diffusion and functional MRI data using MP-PCA

Leaders

Robert E. Smith; http://x.com/Lestropie

Collaborators

No response

Brainhack Global 2024 Event

Brainhack Aus

Project Description

Denoising of EPI MRI data has become a common component of MRI pre-processing pipelines. It is most prevalent in the pre-processing of diffusion MRI data given its low signal magnitude, but it is also becoming increasingly prevalent for functional MRI pre-processing.

The MRtrix3 software provides a command dwidenoise for this purpose. This is a sliding-window approach, where processing for each voxel is performed based on data in a local spatial neighbourhood, exploiting the density of EPI data across multiple volumes. After performing a Principal Component Analysis (PCA) decomposition for the data across DWI volumes within that window, it determines the appropriate cutoff for which components to retain vs. remove based on the Marchenko-Pastur distribution, which predicts the distribution of eigenvalues for random matrices. By doing so it intends to retain the useful signal present in that location, but remove those components that manifest from the thermal noise of the imaging process.

While currently in wide use, there are many prospective enhancements that could be made to this command to improve the quality of denoising. The goal of this project is to address features with strong prospects for improving performance that are achievable within the short time frame of a Hackathon.

Link to project repository/sources

dwidenoise enhancements meta-issue: MRtrix3/mrtrix3#3023

Goals for Brainhack Global

  • Primary goal: Spherical kernel

    Give the command the ability to use a spherically-shaped sliding window kernel as an alternative to the current cubic kernel.

  • Primary goal: Noise level as input/output

    Currently, the command receives as input a DWI series, produces as output a denoised DWI series, and may optionally export the estimated noise level. Would like to change this in two ways. Firstly, it should be possible to just export the estimated noise level, withholding the output DWI series. Secondly, it should be possible to take as input an estimated noise level, and denoise the input DWI series based on that pre-estimated noise level. Doing this would allow for the filtering of that noise level estimate, potentially addressing errors in the otherwise independent-per-voxel noise level estimation.

  • Secondary goals: Any other items in dwidenoise enhancements list MRtrix3/mrtrix3#3023 that may be of interest to a participant.

Good first issues

This Project is only intended for potential contributors who already possess strong software engineering skills.

Communication channels

TBA

Skills

  • C++: requisite
    As the existing dwidenoise command is written in C++, and the MRtrix3 API uses advanced C++ features, existing competence with this language is a prerequisite for this Project.

  • Diffusion MRI: optional
    While not strictly necessary, it may be beneficial to have some experience / interest in diffusion MRI to take on this task. I will however note that some of the planned improvements to dwidenoise actually primarily have its application to functional MRI denoising in mind.

  • PCA: optional
    Not strictly necessary, but some baseline knowledge of what PCA is / does would be beneficial.

Onboarding documentation

MRtrix3 contributing documentation: https://github.com/MRtrix3/mrtrix3/blob/master/CONTRIBUTING.md

Note that these developments would be targeted at the "dev" development branch of MRtrix3. This branch has undergone substantial changes to the build system. Therefore, even if an attendee has had prior experience building MRtrix3 from source, it will be necessary to have or build some experience with cmake.

MP-PCA method journal article: https://www.sciencedirect.com/science/article/pii/S1053811916303949

What will participants learn?

  • Real-world application of advanced C++, including templating
  • Gain experience with the MRtrix3 C++ API, which may be useful for other image processing development projects
  • Experience with PCA and the issues of rank selection

Data to use

I will endeavour to obtain some different example data that can be used for testing. It is also common to hear complaints about inefficacy of DWI denoising, in which case it would be beneficial to obtain sample datasets from the community. Attendees may also bring their own data and see the consequences of technical enhancements to denoising performance.

Number of collaborators

1

Credit to collaborators

Once commits are merged to master as part of a tagged release, contributors appear at the tail of the MRtrix3 website front page, and will receive attribution for their specific contributions as part of a changelog (see example).

Image

Leave this text if you don't have an image yet.

Type

coding_methods, method_development

Development status

2_releases_existing

Topic

diffusion, PCA

Tools

MRtrix

Programming language

C++

Modalities

DWI, fMRI

Git skills

1_commit_push

Anything else?

This project has a much higher barrier to entry than most Hackathon projects. It will only proceed if there exists in attendance at least one other participant with both sufficient interest in the project and competence with C++.

Things to do after the project is submitted and ready to review.

  • Add a comment below the main post of your issue saying: Hi @brainhackorg/project-monitors my project is ready!
  • Twitter-sized summary of your project pitch.
@Lestropie
Copy link
Author

Twitter-sized pitch:

PCA-based denoising substantially improves diffusion MRI data quality. Software providing such a capability should ideally be robust to the nature of the input data. Here we will pursue various proposals for improving the efficacy of the MRtrix3 command dwidenoise.

@Lestropie
Copy link
Author

Hi @brainhackorg/project-monitors my project is ready!

@crnolan
Copy link
Collaborator

crnolan commented Oct 29, 2024

Looks good to me.

@crnolan crnolan closed this as completed Oct 29, 2024
@crnolan crnolan reopened this Oct 29, 2024
@crnolan crnolan closed this as completed Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment