Conversation
glasserm
left a comment
There was a problem hiding this comment.
My overall comment is that I think we should properly merge the NHP changes in to the fMRIVolume pipeline rather than bifurcate the pipelines. There is a lot of reused code between fMRIVolume and the BBR code and these are not really a completely separate process like they were for FreeSurferNHP. On initial review the changes to one step resampling and motion correction looked okay.
|
Thank you for the comment — that makes sense. To confirm, should After discussing with @takuya-hayashi, we felt that this script includes quite a lot of NHP-specific logic. |
Yes please. |
Examples/Scripts/GenericfMRIVolumeProcessingPipelineBatchNHP.sh
Outdated
Show resolved
Hide resolved
Examples/Scripts/GenericfMRIVolumeProcessingPipelineBatchNHP.sh
Outdated
Show resolved
Hide resolved
Examples/Scripts/GenericfMRIVolumeProcessingPipelineBatchNHP.sh
Outdated
Show resolved
Hide resolved
Examples/Scripts/GenericfMRIVolumeProcessingPipelineBatchNHP.sh
Outdated
Show resolved
Hide resolved
Examples/Scripts/GenericfMRIVolumeProcessingPipelineBatchNHP.sh
Outdated
Show resolved
Hide resolved
Examples/Scripts/GenericfMRIVolumeProcessingPipelineBatchNHP.sh
Outdated
Show resolved
Hide resolved
fMRIVolume/scripts/DistortionCorrectionAndEPIToT1wReg_FLIRTBBRAndFreeSurferBBRbased.sh
Outdated
Show resolved
Hide resolved
fMRIVolume/scripts/DistortionCorrectionAndEPIToT1wReg_FLIRTBBRAndFreeSurferBBRbased.sh
Outdated
Show resolved
Hide resolved
fMRIVolume/scripts/DistortionCorrectionAndEPIToT1wReg_FLIRTBBRAndFreeSurferBBRbased.sh
Show resolved
Hide resolved
fMRIVolume/scripts/DistortionCorrectionAndEPIToT1wReg_FLIRTBBRAndFreeSurferBBRbased.sh
Outdated
Show resolved
Hide resolved
fMRIVolume/scripts/DistortionCorrectionAndEPIToT1wReg_FLIRTBBRAndFreeSurferBBRbased.sh
Outdated
Show resolved
Hide resolved
fMRIVolume/scripts/DistortionCorrectionAndEPIToT1wReg_FLIRTBBRAndFreeSurferBBRbased.sh
Show resolved
Hide resolved
fMRIVolume/scripts/DistortionCorrectionAndEPIToT1wReg_FLIRTBBRAndFreeSurferBBRbased.sh
Show resolved
Hide resolved
fMRIVolume/scripts/DistortionCorrectionAndEPIToT1wReg_FLIRTBBRAndFreeSurferBBRbased.sh
Outdated
Show resolved
Hide resolved
fMRIVolume/scripts/DistortionCorrectionAndEPIToT1wReg_FLIRTBBRAndFreeSurferBBRbased.sh
Outdated
Show resolved
Hide resolved
fMRIVolume/scripts/DistortionCorrectionAndEPIToT1wReg_FLIRTBBRAndFreeSurferBBRbased.sh
Outdated
Show resolved
Hide resolved
|
betspecieslabel is not currently defined for human stream (including in SetUpSpecies.sh on main branch) and breaks processing. |
fMRIVolume/scripts/DistortionCorrectionAndEPIToT1wReg_FLIRTBBRAndFreeSurferBBRbased.sh
Outdated
Show resolved
Hide resolved
- Fix ${10}/${11} positional parameter expansion in MotionCorrection.sh
- Fix IsLongitudinal condition that always evaluated False
- Add --species option to OneStepResampling.sh
- Delete unused GenericfMRIVolumeMotionCorrectXRunsNHP.sh
fMRIVolume/scripts/DistortionCorrectionAndEPIToT1wReg_FLIRTBBRAndFreeSurferBBRbased.sh
Outdated
Show resolved
Hide resolved
This will be followed up with a specific location where there is an issue. |
|
@TakJim did rebase it against our master after the PreFS merge. |
fMRIVolume/scripts/DistortionCorrectionAndEPIToT1wReg_FLIRTBBRAndFreeSurferBBRbased.sh
Outdated
Show resolved
Hide resolved
- Rename --bbr/BBR to --bbr-contrast/BBRContrast for clarity - Fix jacobian comment in human code path, remove in NONE path - Use (( ! IsLongitudinal )) syntax in DistortionCorrection script - Restructure OneStepResampling.sh: full else for human/nonhuman - Revert multi-echo code changes: restore else clause, remove duplicate
There was a problem hiding this comment.
This command would currently fail because tcsEchoesGdc, etc. are being defined in the next block. I'll wait for this to be fixed before continuing testing the human stream.
Complete the reversion of echo array changes that was flagged as incomplete in PR Washington-University#372 review comments r2853580713 and r2853593232.
| # fMRI name filter: leave empty to process all fMRI runs in each session | ||
| # Set to a specific fMRI name (without extension) to process only that run | ||
| fmriname="" | ||
|
|
There was a problem hiding this comment.
| #structural image resolution | |
| StructRes=0.4 |
|
|
||
| # Set up pipeline environment variables and software | ||
| source "$EnvironmentScript" | ||
|
|
There was a problem hiding this comment.
| if [ -z "$StructRes" ]; then | |
| StructResOption="" | |
| else | |
| StructResOption="--structres=$StructRes" | |
| fi | |
| echo "StructResOption: $StructResOption" |
There was a problem hiding this comment.
--structres is mandatory, so it doesn't need the flag in a variable.
| source "$HCPPIPEDIR"/Examples/Scripts/SetUpSPECIES.sh --species="$SPECIES" | ||
| source "$HCPPIPEDIR"/FreeSurfer/custom/SetUpFSNHP.sh |
There was a problem hiding this comment.
| source "$HCPPIPEDIR"/Examples/Scripts/SetUpSPECIES.sh --species="$SPECIES" | |
| source "$HCPPIPEDIR"/FreeSurfer/custom/SetUpFSNHP.sh | |
| source "$HCPPIPEDIR"/Examples/Scripts/SetUpSPECIES.sh --species="$SPECIES $StructResOption" | |
| source "$HCPPIPEDIR"/FreeSurfer/custom/SetUpFSNHP.sh "$SPECIES" "$isFLAIR" "$isT1wDivFLAIR" |
There was a problem hiding this comment.
| source "$HCPPIPEDIR"/Examples/Scripts/SetUpSPECIES.sh --species="$SPECIES" | |
| source "$HCPPIPEDIR"/FreeSurfer/custom/SetUpFSNHP.sh | |
| source "$HCPPIPEDIR"/Examples/Scripts/SetUpSPECIES.sh --species="$SPECIES" --structres="$StructRes" | |
| source "$HCPPIPEDIR"/FreeSurfer/custom/SetUpFSNHP.sh "$SPECIES" "$isFLAIR" "$isT1wDivFLAIR" |
| # T1w: T1w-based BBR (e.g. for MION fMRI) | ||
| # T2w: T2w-based BBR (default) | ||
| BBRContrast="T2w" | ||
|
|
There was a problem hiding this comment.
| #Whether T2w image is FLAIR, 0 or 1 | |
| isFLAIR=0 | |
| #Whether T2 image is T1w divided by FLAIR, 0 or 1 | |
| isT1wDivFLAIR=1 |
| ResampRefIm=$FSLDIR/data/standard/MNI152_T1_2mm | ||
| elif [[ $(echo "${FinalfMRIResolution} == 1" | bc) == "1" ]] ; then | ||
| ResampRefIm=$FSLDIR/data/standard/MNI152_T1_1mm | ||
| # If not a human, just custom fMRI resolution, else, if 1mm or 2mm use standard fMRI resolutions, else, use a custom fMRI resolution. |
There was a problem hiding this comment.
| # If not a human, just custom fMRI resolution, else, if 1mm or 2mm use standard fMRI resolutions, else, use a custom fMRI resolution. | |
| # If not a human, just use -applyisoxfm |
This PR applies fMRIVolume to NHP data.
Some additional modifications are still required. The parts that I have not been able to address yet are listed below.
TODO