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

NORDIC denoising in MicaPipe #127

Open
PaulBautin opened this issue Aug 26, 2024 · 0 comments
Open

NORDIC denoising in MicaPipe #127

PaulBautin opened this issue Aug 26, 2024 · 0 comments

Comments

@PaulBautin
Copy link

PaulBautin commented Aug 26, 2024

What is the current behaviour?

What is the motivation / use case for changing the behaviour?

  • 7T dMRI image SNR is low.

NORDIC references:

Before running:

  • Ensure MATLAB version 2017b or newer is installed with the Image Processing Toolbox and Signal Processing Toolbox.
  • Clone the NORDIC GitHub repository.

Input data:

Alternative denoising method:

Implementation considerations:

  • The NORDIC method could be adapted for other MRI modalities such as fMRI or ASL.
  • Implementing NORDIC similarly to the FIX tool used in micapipe fMRI (similar Matlab requirements?).

Test:

Code
# Input and output file paths
img_magn_in='/home/pabaua/dev_mni/data/test_nordic/sub-01_ses-2mm_dir-AP_run-01_part-mag_dwi.nii.gz'
img_phase_in='/home/pabaua/dev_mni/data/test_nordic/sub-01_ses-2mm_dir-AP_run-01_part-phase_dwi.nii.gz'
img_out='sub-01_ses-2mm_dir-AP_run-01_dwi_nordic' # Do not put extension .nii
nordic_matlab_dir='/home/pabaua/dev_mni/NORDIC_Raw/'  # Directory containing NIFTI_NORDIC.m

# Arguments for the MATLAB function
ARG_temporal_phase=3
ARG_phase_filter_width=3
ARG_DIROUT='/home/pabaua/dev_mni/results/nordic/'

# Run MATLAB command with the specified arguments
matlab -nodisplay -nojvm -nosplash -nodesktop -r " \
try; \
addpath('${nordic_matlab_dir}'); \
ARG.temporal_phase = ${ARG_temporal_phase}; \
ARG.phase_filter_width = ${ARG_phase_filter_width}; \
ARG.DIROUT = '${ARG_DIROUT}'; \
NIFTI_NORDIC('${img_magn_in}', '${img_phase_in}', '${img_out}', ARG); \
end; \
quit;" \
>> ${ARG_DIROUT}/log_NORDIC_$(date '+%Y-%m-%d').txt

# Run dwidenoise on dMRI magnitude image
dwidenoise ${img_magn_in} ${ARG_DIROUT}/sub-01_ses-2mm_dir-AP_run-01_dwi_mppca.nii.gz

Screenshot from 2024-08-26 09-19-17

@PaulBautin PaulBautin changed the title implement NORDIC denoising in MicaPipe NORDIC denoising in MicaPipe Aug 26, 2024
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

No branches or pull requests

1 participant