-
Notifications
You must be signed in to change notification settings - Fork 272
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
Correction to Philips fieldmap preprocessing #271
Correction to Philips fieldmap preprocessing #271
Conversation
PhaseInputName=`getopt1 "--fmapphase" $@` | ||
DeltaTE=`getopt1 "--echodiff" $@` | ||
PhaseInputName=`getopt1 "--fmapphase" $@` | ||
DeltaTE=`getopt1 "--echodiff" $@` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In terms of style, these whitespace changes show that the file has a mix of tabs and spaces (even within a single line), and the current changes also leave edited lines inconsistent with their neighbors (these two changed lines use a tab and 4 spaces, and then two tabs for the next line). I suggest trying to match the indentation style of at least consecutive lines within lines you were going to edit anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this in my most recent commit. There were several lines in the FieldmapPreprocessingAll.sh script with such inconsistencies. I changed all the indentations in the file to 4 spaces, as this seemed as the most common pattern. There were also a few lines with 2-space indentation that I increased to 4 spaces.
…apPreprocessingAll.sh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is tested and working well in your hands, I am happy to merge. Thanks for your work on this!
I'm glad I could help. The correction works well on my end, and I also tested it yesterday on data collected with the Philips Achieva 3.0T after a dStream upgrade. I used the effective echo spacing estimate returned by the dcm2niix toolbox ( |
I later saw you scene and I agree it looks good. |
Couple things:
|
@mharms, thank you for your feedback and important observations. Here are my thoughts; please correct me if my reasoning is incorrect in any way.
|
Re (1): Did the EES (EffectiveEchoSpacing) value reported by Re (2-3): In that case, might also be better to call the first two stages of the Philips branch of the figure a "(possibly) wrapped fieldmap (Hz)" rather than a "real fieldmap (Hz)" since a "real fieldmap" should not have any wrapping (at least for how I think about that phrasing). |
@mharms, I have updated the figure so that it alerts users that we are not 100% sure of the specific image formats. The software release is 5.7.1.2, and the scanner is a 2011 model. I have also included this information in the figure. I am currently out of the office and will get back to you on Monday (July 31, 2023) on how SENSE factor changes affect dicm2niix effective echo spacing estimates, as I now only have access to images that vary in other parameters as well. I will take a few short EPI scans on a phantom with different SENSE values. |
@mharms. Today, we did two pairs of BOLD scans on a phantom to see how the SENSE acceleration affects the estimated effective echo spacing. If I use the equation The distortion correction also proved to be appropriate when evaluated on real data, one of which was acquired with If you have any further questions, please let me know. Here are the summary results of today's data. 1. MultiBand 3, SENSE 1.9"EchoTime": 0.030001,
2. MultiBand 3, SENSE 1"EchoTime": 0.031024,
3. MultiBand 4, SENSE 1.9"EchoTime": 0.03,
4. MultiBand 4, SENSE 1"EchoTime": 0.03111,
|
In the interest of being very specific, I think that the relevant equations used currently by If you were to use the formulas at the above link, you should be able to duplicate the values returned by |
@mharms, thank you for pointing me to the actual equations implemented in the Equations for estimating the Philips effective echo spacing parameter from
1. MultiBand 3, SENSE 1.9
2. MultiBand 3, SENSE 1
3. MultiBand 4, SENSE 1.9
4. MultiBand 4, SENSE 1
The in-plane acceleration is accounted for in the EPI factor.
|
Good to see that you can indeed (exactly) match the current output of |
Background
In this pull request, I corrected the issues from my previous pull request, #194, regarding Philips fieldmap image preprocessing. Upon further investigation, I discovered that I had made an incorrect assumption about the units of the input fieldmap images.
I had incorrectly assumed that the fieldmap image produced by the Philips Achieva 3.0T TX was a phase difference image in degrees. This assumption was based on the voxel values in the image, which ranged from about -180 to 180. However, upon closer inspection, the values were between about -200 and 200 (our actual dTE obtained from PAR/REC was 2.45 ms). To clarify the units, I contacted a Philips physicist and received confirmation that the fieldmap image was indeed in Hz.
The preprocessing steps are shown in the figure below, along with the old steps and current steps, in addition to the established Siemens processing, for reference.
Main Changes
In order to properly process the fieldmap, I have now corrected the previous steps. Since the input image is not a phase difference image, as previously assumed, it now needs to be first converted to a phase difference map, then unwrapped using FSL prelude, and finally converted back to a fieldmap.
I have also included a conditional check to determine if the echo difference parameter (dTE) has been specified. If it is not, the phase unwrapping is skipped. However, based on my research, I believe including the option for phase unwrapping is still useful. Some researchers skip phase unwrapping, especially when using the default echo difference of 3 ms during acquisition. In such cases, wrapping tends to be minimal and limited to the inferior-frontal region where BOLD signal loss usually occurs. When a larger dTE is set, the unwrapping option is necessary, as the phase is significantly wrapped (tested with dTE up to 10 ms).
Another factor contributing to the misconception that the earlier code was correctly preprocessing the fieldmaps was that the combination of all operations applied to the input image produced a similar scaling factor. Specifically, the input data was previously multiplied by
pi/180 * 1000/(3 ms) = 5.81
, whereas in the corrected code, the input data is multiplied by2*pi = 6.28
. The old cold produces similar values, but definitely lower than they should be, leading to under-correction.The figure also shows an unwrapped fieldmap and three sagittal slices of the distortion-corrected BOLD image with the white matter surface outline. The effective echo spacing parameter for the correction was calculated as follows (Neurostars forum discussion):
I have made the necessary changes in the pull request to fix these issues and ensure proper distortion correction. Please let me know if there are any concerns or additional requests. Thank you.
Edit: Figure updated on August 8, 2023