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

Rework Fieldmap Correction Workflow #198

Open
khoffschlag opened this issue Nov 25, 2024 · 0 comments
Open

Rework Fieldmap Correction Workflow #198

khoffschlag opened this issue Nov 25, 2024 · 0 comments
Assignees

Comments

@khoffschlag
Copy link
Collaborator

We need to adapt the existing workflow for fieldmap correction to include the following changes:

  1. Make the number of main sequence volumes extracted configurable:

    • Introduce a parameter (e.g., num_volumes) that specifies how many volumes to extract from the main sequence.
    • The default should be 5, but this should be adjustable via the settings.ini file (and pipeline parameter as fallback).
  2. Replace pick_volume with logic for multi-volume extraction and averaging:

    • Use fsl.ExtractROI to extract the first num_volumes from the main sequence.
    • Use fsl.MeanImage to compute the mean of these extracted volumes for noise reduction.
  3. Average the fieldmap sequence:

    • Use fsl.MeanImage to compute the mean of all volumes in the fieldmap.
  4. Combine averaged images into a 4D file:

    • Use fsl.Merge to merge the averaged images into a 4D file.
  5. Full sequence correction:

    • Ensure that the distortion field estimated by TOPUP is applied to the entire main functional sequence, not just the extracted volumes.
  6. Update the configuration file (settings.ini):

    • Add a new key, e.g., num_volumes_to_extract, with a default value of 5:
      [FieldmapCorrection]
      num_volumes_to_extract = 5
    • Ensure this value is read from the configuration file and passed into the workflow as a parameter.
  7. Retrieve image parameters from json

  • Currently, the fieldmap correction workflow retrieves the encoding direction, total readout time and repetition time, through user-specified inputs. To improve automation and reduce user input errors, it would be beneficial to retrieve these values directly from the JSON metadata. If values are missing in the metadata, then try to gather the missing values from the MRI header. If also the MRI header is lacking the needed information, then the workflow should use user-specified fallback values (from settings.ini) or throw an exception.

  • Maybe we can think about to implement a safety check that makes sure that we really have to oppositve phase encodings.

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

When branches are created from issues, their pull requests are automatically linked.

1 participant