spinicist / QUIT

A set of tools for processing Quantitative MR Images
Mozilla Public License 2.0
59 stars 20 forks source link

Compute R1 and PD without small flip angle approximation in mtsat #41

Closed jeremie-fouquet closed 6 months ago

jeremie-fouquet commented 6 months ago

In mtsat, compute R1 and PD (and incidentally, MTsat) without the small flip angle approximation. This follows from the suggestion in Edwards et al., 2021. It is equivalent to setting hmri_def.small_angle_approx = false in the hMRI-toolbox (reflected in the PD and R1 computations).

Fix #40.

jeremie-fouquet commented 6 months ago

I implemented this by entirely removing the small flip angle approximation. Let me know if you prefer to implement it as an option. I think it would mainly be for backward compatibility because I don't see other good reasons to still use the small flip angle approximation.

spinicist commented 6 months ago

This looks good, but even better would be to have a flag such as --smallangle or --approx that uses the old formula. I think that should be straightforward to add?

spinicist commented 6 months ago

I think it would mainly be for backward compatibility because I don't see other good reasons to still use the small flip angle approximation.

Exactly. I don't think I had seen this ESMRMB abstract before. If I read the figure correct, there is up to 5% difference in R1 in the center of the brain. That's big enough for people to notice, so big thanks for implementing this. But also big enough that giving people the choice of running the old approximation is a positive, so they can check it for themselves.

jeremie-fouquet commented 6 months ago

Great, ok, that makes sense. I'll try to implement this as an option and submit new commits for it soon.

jeremie-fouquet commented 6 months ago

The last commits implement the small flip angle approximation as an option. Please do not hesitate to suggest changes; I still have much to learn about C++.

spinicist commented 6 months ago

This looks good, I have merged.

As a note on style I generally prefer something like: auto const x = which_one ? a + b : a - b; over

auto x = a - b;
if (which_one) x = a + b;

but this is a personal preference and the way you wrote it is fine.