-
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
Support for GE HealthCare (GEHC) B0 Fieldmap processing. #285
Conversation
Correction of the existing GEHC B0 fieldmap processing (which was incomplete) and implementation of a new B0 fieldmap processing for GEHC data. The minimum required FSL-version is 6.0.7.1 for GEHC B0 fieldmap processing. The existing fieldmap processing "GeneralElectricFieldMap" was renamed "GEHealthCareLegacyFieldMap". It is made for Legacy existing data converted with dcm2niix (pre-v1.0.20210410). These GEHC B0Maps were a 2 volumes NIFTI file (Volume 1 is the B0Map in Hertz, and Volume 2 the magnitude image). A new fieldmap processing is introduced and named "GEHealthCareFieldMap". This is intended for new data converted with recent dcm2niix (v1.0.20220720 and later). The GEHC B0Maps are split as 2 NIfTI files (the magnitude and the b0map_fieldmaphz in Hertz - with the suffix "_fieldmaphz" for easy identification). The usage of this fieldmap processing is identical to Siemens/Philips pipeline. For both "GEHealthCareLegacyFieldMap" and "GEHealthCareFieldMap" correction methods the "DeltaTE" is now a mandatory input. Description of changes: modified: global/scripts/fsl_version.shlib Functions to format FSL-version strings, to compare FSL-version and to check that minimun required FSL-version were added. modified: global/scripts/FieldMapPreprocessingAll.sh Modification of "GeneralElectricFieldMap" renamed "GEHealthCareLegacyFieldMap" to add phase unwrapping and processing with fsl_prepare_fieldmap. Added the "GEHealthCareFieldMap" processing via fsl_prepare_fieldmap. The input DeltaTE is now mandatory. And a verification that the minimum FSL-version criterion is met. The following scripts were also modified to reflect the changes made in global/scripts/fsl_version.shlib and mainly global/scripts/FieldMapPreprocessingAll.sh. modified: Examples/Scripts/GenericfMRIVolumeProcessingPipelineBatch.sh modified: Examples/Scripts/Historical/7T/GenericfMRIVolumeProcessingPipelineBatch.7T.sh modified: Examples/Scripts/PreFreeSurferPipelineBatch.sh modified: PreFreeSurfer/PreFreeSurferPipeline.sh modified: PreFreeSurfer/scripts/T2wToT1wDistortionCorrectAndReg.sh modified: fMRIVolume/GenericfMRIVolumeProcessingPipeline.sh modified: fMRIVolume/scripts/DistortionCorrectionAndEPIToT1wReg_FLIRTBBRAndFreeSurferBBRbased.sh Modification tested on a database of 7 subjects containing 3DT1w, 3DT2w, resting-state fMRI, 3D-B0maps, and a pair of Spin-Echo EPI with positve and negative phase-encodings (a.k.a SpinEchoFielMaps for TOPUP).
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 would like to seem some fMRI test results. Also, why did you modify the Philips section to remove the DeltaTE requirement?
I will sent you the fMRI data (tomorrow). I used the Topup corrected images as a reference, and the B0map corrected fMRI data are very close to the Topup corrected fMRI data. => "why did you modify the Philips section to remove the DeltaTE requirement ?" |
Okay thanks. |
I have reviewed some test data from Brice and it looks good. I am okay to merge if others are. |
fMRIVolume/scripts/DistortionCorrectionAndEPIToT1wReg_FLIRTBBRAndFreeSurferBBRbased.sh
Outdated
Show resolved
Hide resolved
fMRIVolume/scripts/DistortionCorrectionAndEPIToT1wReg_FLIRTBBRAndFreeSurferBBRbased.sh
Outdated
Show resolved
Hide resolved
Logic looks reasonable. I have made some documentation/formatting/typo suggestions. |
Co-authored-by: Tim Coalson <coalsont@users.noreply.github.com>
Co-authored-by: Tim Coalson <coalsont@users.noreply.github.com>
Co-authored-by: Tim Coalson <coalsont@users.noreply.github.com>
…AndFreeSurferBBRbased.sh Co-authored-by: Tim Coalson <coalsont@users.noreply.github.com>
Indentation Co-authored-by: Tim Coalson <coalsont@users.noreply.github.com>
GenericfMRIVolumeProcessingPipelineBatch.sh to GenericfMRIVolumeProcessingPipelineBatch.7T.sh Changes to be committed: modified: Examples/Scripts/Historical/7T/GenericfMRIVolumeProcessingPipelineBatch.7T.sh
The latest commits should address the comments from @mharms.
I left the duplication of checking FSL version for GEHC in Thanks @mharms for the numerous typos correction and documentation clarification. |
I would suggest we name the flag |
Also, if @coalsont wants to keep the FSL version in two different places, please at least add a comment at that point in the code in |
… / "GEHealthCareLegacyFieldMap"
…sing.sh which is a duplication of the FSL-version check done in global/scripts/FieldMapPreprocessingAll.sh.
Done (both @coalsont Let us know what you prefer for the FSL-Version check ? Another possibility is to move the minimun version declaration (also duplicated)
into |
Yes, erroring early is better, so having the check in two places is fine. I think the |
In that case, I'd favor |
More precisely, make |
of the processing of GEHC Legacy B0Map Data to replace --fmapgeneralelectric and --fmapgelegacy. Changes to be committed: modified: Examples/Scripts/GenericfMRIVolumeProcessingPipelineBatch.sh modified: Examples/Scripts/Historical/7T/GenericfMRIVolumeProcessingPipelineBatch.7T.sh modified: Examples/Scripts/PreFreeSurferPipelineBatch.sh modified: PreFreeSurfer/PreFreeSurferPipeline.sh modified: PreFreeSurfer/scripts/T2wToT1wDistortionCorrectAndReg.sh modified: fMRIVolume/GenericfMRIVolumeProcessingPipeline.sh modified: fMRIVolume/scripts/DistortionCorrectionAndEPIToT1wReg_FLIRTBBRAndFreeSurferBBRbased.sh modified: global/scripts/FieldMapPreprocessingAll.sh
global/scripts/fsl_version.shlib as a global constant (+ added appropriate coments). This should ease the maintenance. Changes to be committed: modified: fMRIVolume/GenericfMRIVolumeProcessingPipeline.sh modified: global/scripts/FieldMapPreprocessingAll.sh modified: global/scripts/fsl_version.shlib
To finalize this PR and address the remaining comments from @mharms and @coalsont, I did:
I feel like we should be good to go now. |
Examples/Scripts/Historical/7T/GenericfMRIVolumeProcessingPipelineBatch.7T.sh
Show resolved
Hide resolved
Examples/Scripts/Historical/7T/GenericfMRIVolumeProcessingPipelineBatch.7T.sh
Show resolved
Hide resolved
Examples/Scripts/Historical/7T/GenericfMRIVolumeProcessingPipelineBatch.7T.sh
Show resolved
Hide resolved
I don't have anything else to add, other than thanks @brice82 for these changes and additions. This is a great example of a community contribution! |
…lineBatch.7T.sh Indentation Co-authored-by: Tim Coalson <coalsont@users.noreply.github.com>
…lineBatch.7T.sh Co-authored-by: Tim Coalson <coalsont@users.noreply.github.com>
…lineBatch.7T.sh Co-authored-by: Tim Coalson <coalsont@users.noreply.github.com>
…meProcessingPipeline.sh
I converted all tabs into 4 spaces in Thanks a lot @mharms and @coalsont . This time the PR should be good to go. |
That's one way to do it. I don't think we cared about "git blame" on the batch file, and it looks like a fair amount of fMRIVolume wasn't using tabs, so most of its "git blame" will survive. Did you test it after changing |
Yes, I rerun all the test scripts (from PreSurfer until fMRIVolume) with --fmapcombined and --fmap but on a single subject. PS: Tabs should be forbidden by law :-) |
Do folks feel this is ready to merge? |
Correction of the existing GEHC B0 fieldmap processing (which was incomplete) and implementation of a new B0 fieldmap processing for GEHC data. The minimum required FSL-version is 6.0.7.1 for GEHC B0 fieldmap processing.
The existing fieldmap processing "GeneralElectricFieldMap" was renamed "GEHealthCareLegacyFieldMap". It is made for Legacy existing data converted with dcm2niix (pre-v1.0.20210410). These GEHC B0Maps were a 2 volumes NIFTI file (Volume 1 is the B0Map in Hertz, and Volume 2 the magnitude image).
A new fieldmap processing is introduced and named "GEHealthCareFieldMap". This is intended for new data converted with recent dcm2niix (v1.0.20220720 and later). The GEHC B0Maps are split as 2 NIfTI files (the magnitude and the b0map_fieldmaphz in Hertz - with the suffix "_fieldmaphz" for easy identification). The usage of this fieldmap processing is identical to Siemens/Philips pipeline.
For both "GEHealthCareLegacyFieldMap" and "GEHealthCareFieldMap" correction methods the "DeltaTE" is now a mandatory input.
Description of changes:
modified: global/scripts/fsl_version.shlib
Functions to format FSL-version strings, to compare FSL-version and to check that minimun required FSL-version were added.
modified: global/scripts/FieldMapPreprocessingAll.sh
Modification of "GeneralElectricFieldMap" renamed "GEHealthCareLegacyFieldMap" to add phase unwrapping and processing with fsl_prepare_fieldmap.
Added the "GEHealthCareFieldMap" processing via fsl_prepare_fieldmap.
The input DeltaTE is now mandatory.
And a verification that the minimum FSL-version criterion is met.
The following scripts were also modified to reflect the changes made in global/scripts/fsl_version.shlib and mainly global/scripts/FieldMapPreprocessingAll.sh.
modified: Examples/Scripts/GenericfMRIVolumeProcessingPipelineBatch.sh
modified: Examples/Scripts/Historical/7T/GenericfMRIVolumeProcessingPipelineBatch.7T.sh
modified: Examples/Scripts/PreFreeSurferPipelineBatch.sh
modified: PreFreeSurfer/PreFreeSurferPipeline.sh
modified: PreFreeSurfer/scripts/T2wToT1wDistortionCorrectAndReg.sh
modified: fMRIVolume/GenericfMRIVolumeProcessingPipeline.sh
modified: fMRIVolume/scripts/DistortionCorrectionAndEPIToT1wReg_FLIRTBBRAndFreeSurferBBRbased.sh
Modification tested on a database of 7 subjects containing 3DT1w, 3DT2w, resting-state fMRI, 3D-B0maps, and a pair of Spin-Echo EPI with positve and negative phase-encodings (a.k.a SpinEchoFielMaps for TOPUP).