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
Perform motion correction separately for each image type #275
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tsalo
changed the title
Start working on zig-zag regression.
Perform motion correction separately for each image type
May 4, 2023
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #275 +/- ##
==========================================
+ Coverage 49.52% 50.04% +0.51%
==========================================
Files 132 134 +2
Lines 12215 12472 +257
==========================================
+ Hits 6050 6241 +191
- Misses 6165 6231 +66
☔ View full report in Codecov by Sentry. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #266 and closes #181 (I think it was already fixed, but this uses rmsdiff directly, so I consider it fixing the issue as well).
Changes proposed in this pull request
aslprep.interfaces.utility
module with interfaces that are specific to ASL, but not directly related to CBF.ReduceASLFiles
drops volumes that won't be used by ASLPrep. For example, if an ASL file has control, label, and deltam volumes, then it will remove the deltam volumes, since ASLPrep tries to use the rawest data (control-label pairs).RMSDiff
calls FSL's rmsdiff command.PairwiseRMSDiff
calls theRMSDiff
interface on each pair of matrix files to get a relative RMS time series.CombineMotionParameters
takes the parameter files and transform files from each of the volume type-specific MCFLIRT runs and stitches them back together according to the volume order defined in the aslcontext file.SplitOutVolumeType
separates out a specific volume type out of the ASL file. This splits up the ASL file for volume type-specific motion correction in the next node.SplitReferenceTarget
separates out the best volume type for reference image generation from the ASL file. This is called in the reference volume generation workflow.aslprep.utils.misc
:select_processing_target
determines the appropriate volume types to process. If control-label pairs are available, then this is "controllabel". If control-label pairs aren't available, but deltam volumes are, then it's "deltam". And if nothing else is available, it's "cbf".reduce_metadata_lists
takes a metadata dictionary and drops any unused volumes' values from any list fields (e.g., PostLabelingDelay in some scenarios). This is called withinReduceASLFiles
.init_asl_preproc_wf
.ReduceASLFiles
). This reduced ASL file and associated metadata and aslcontext files will be used throughout the rest of the workflow.aslbuffer_stc
and directly pass the ASL file fromreduce_asl_file
toasl_split
. Without multi-echo data or slice-timing correction, we don't need this buffer node.aslbuffer_me
. Without multi-echo data, we don't need this buffer node.init_asl_reference_wf
fromaslprep.niworkflows.func.util
to newaslprep.workflows.asl.util
.init_validate_asl_wf
fromaslprep.niworkflows.func.util
to newaslprep.workflows.asl.util
.