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

Revisit documentation recommendations for alignment #990

Open
handwerkerd opened this issue Oct 24, 2023 · 1 comment
Open

Revisit documentation recommendations for alignment #990

handwerkerd opened this issue Oct 24, 2023 · 1 comment
Labels
documentation issues related to improving documentation for the project effort: low Theoretically less than a day's work impact: low Improving code/documentation cleanliness/clarity, not function priority: low issues that are not urgent

Comments

@handwerkerd
Copy link
Member

Summary

The documentation currently recommends running tedana before doing distortion correction or non-linear spatial alignments to a template and then has a note saying the other option is ok, but deserves more testing. Both options are ok and I'm not sure if either is better so we should present both in a more neutral manner that described the benefits and problems with each

Additional Detail

Relevant documentation section:

tedana/docs/multi-echo.rst

Lines 461 to 479 in b11d254

4. Perform smoothing, and any rescaling or filtering **after** denoising
======================================================================================================================
Any step that will alter the relationship of signal magnitudes between echoes should occur after denoising and combining
of the echoes. For example, if echo is separately scaled by its mean signal over time, then resulting intensity gradients
and the subsequent calculation of voxelwise T2* values will be distorted or incorrect. See the description of
``tedana``'s :doc:`approach <\approach>` for more details on how T2* values are calculated. An agressive temporal filter
(i.e. a 0.1Hz low pass filter) or spatial smoothing could similarly distort the relationship between the echoes at each
time point.
.. note::
Spatial normalization and distortion correction, particularly non-linear normalization methods
with higher order interpolation functions to regrid voxels in a new space, may distort the relationship between
echoes more than bilinear interpolation. This has the potential to distort the relationship between echoes and
there have been anecdotal cases where this might be an issue. Still, since serial spatial transforms spatially
smooth the data and most modern pipeline combine all spatial transforms into a single step, we recommend doing
these steps before running denoising. Particularly for data with high intensity heterogeneity between the surface
and center of the brain, we recommend checking if distoration correction and normalization adversely affect the
relationship between echoes.

I think all the relevant points are there, but I'd reorganize to explain the benefits and problems with each approach rather than recommending one and making a note about the other option. (Full disclosure: It looks the way it currently does because of my previous recommendations and others probably wouldn't have recommended both in earlier versions of the documentation)

Tangential issue

An entire section of multi-echo.rst is not rendering on readthedocs:

tedana/docs/multi-echo.rst

Lines 443 to 458 in b11d254

3. Apply spatial normalization and susceptibility distortion correction consistently across echoes
==================================================================================================
One key feature of susceptibility distortion is that it is primarily a factor of readout pattern and
total readout time, rather than echo time. This means that, for most multi-echo sequences, even though
dropout will increase with echo time, distortion will not (at least not to a noticeable/meaningful extent).
For this reason, if you are applying TOPUP-style (blip-up/blip-down) "field maps",
we recommend using your first echo time, as this will exhibit the least dropout.
If your first echo time is very short, and exhibits poor gray/white contrast, then a later echo time may
be preferable. In any case, you should calculate the spatial transform from just one of your echoes and
apply it across all of them.
Similarly, if spatial normalization to a template is done, the spatial transform should be calculated
once and the same transformation (ideally one transformation for motion correction, distortion correction,
and spatial normalization) should be applied to all echoes.

I think there's a missing blank line that's causing the problem. This is fixed in the rendered docs for #970 (yay strict linting!), but figured I'd note this.

Next Steps

  • Have a few of us agree this is a reasonable change
  • Edit the text
@handwerkerd handwerkerd added documentation issues related to improving documentation for the project priority: low issues that are not urgent effort: low Theoretically less than a day's work impact: low Improving code/documentation cleanliness/clarity, not function labels Oct 24, 2023
@tsalo
Copy link
Member

tsalo commented Apr 27, 2024

It's also worth thinking about how dynamic distortion correction (e.g., with MEDIC) fits in. With dynamic distortion correction, it makes more sense to run the distortion correction before motion correction, so there's no real way to run tedana on motion-corrected-but-not-distortion-corrected data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation issues related to improving documentation for the project effort: low Theoretically less than a day's work impact: low Improving code/documentation cleanliness/clarity, not function priority: low issues that are not urgent
Projects
None yet
Development

No branches or pull requests

2 participants