-
Notifications
You must be signed in to change notification settings - Fork 17
Fix typos in documentation and add page on BIDS curation #529
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
0fb0135
add note about asking MRI tech if data is already scaled
B-Sevchik 41b480e
fix typos
B-Sevchik 566c113
fix typos on readme file
B-Sevchik fb80b3c
add link to BIDS specification for ASL
B-Sevchik c7a0535
fix QSIPrep typo
B-Sevchik ab58671
clarify sub-directories in output_dir
B-Sevchik d7d6921
Draft BIDS pain points doc. (#534)
singlesp c4c7ba5
Update docs/usage.rst
B-Sevchik a0e5449
add line break between sentences
B-Sevchik 6b9910c
link to new bids section in usage docs
B-Sevchik 53de71b
try to get linking of new bids section to work
B-Sevchik 4179d2f
minor edits
singlesp 4ecfb52
Merge branch 'update_docs_hackathon' of https://github.com/PennLINC/a…
singlesp caad7b0
link bids page
singlesp 0a67070
Update docs/bids.rst
singlesp 3e81a1c
typo
singlesp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
.. include:: links.rst | ||
|
||
################### | ||
Preparing BIDS Data | ||
################### | ||
|
||
Here we discuss a few different quirks in BIDS that might affect how you prepare your ASL data. | ||
|
||
|
||
*********************** | ||
Mixed-type 4D ASL files | ||
*********************** | ||
|
||
Unlike fMRI data, the 4D ASL file can contain multiple types of volumes, including M0, control, | ||
label, noise, and derived volumes. | ||
As such, the time axis is not as meaningful as it is for fMRI data. | ||
|
||
The aslcontext.tsv file is used to describe the volume types in the ASL file. | ||
|
||
The NIfTI file format only allows for a single time-step unit, | ||
even though ASL files may have different time-steps for different volumes. | ||
This has necessitated metadata in the ASL NIfTI files' sidecar JSON files to describe the time-steps | ||
for each volume; namely RepetitionTimePreparation and RepetitionTimeExcitation. | ||
|
||
|
||
*********************** | ||
Repetition Time Nuances | ||
*********************** | ||
|
||
.. warning:: | ||
|
||
It's important to talk to your physicist to determine the correct values for these fields. | ||
The values produced by the DICOM converter are not always correct- probably because the DICOM | ||
does not have the right information. | ||
|
||
There are three relevant repetition time fields in ASL data: | ||
|
||
1. RepetitionTime: This can only be a single value. When the ASL BEP was first developed, | ||
it was decided that the RepetitionTime field would not be changed to allow arrays of values, | ||
as is needed for ASL data. Instead, they created the RepetitionTimePreparation field, which | ||
can be either a single value or an array of values (one value per volume in the ASL file). | ||
2. RepetitionTimePreparation: This is effectively the same as RepetitionTime, but can be an array. | ||
|
||
- This value (especially for the M0 scan) may be useful for calculating CBF. | ||
It's not used in ASLPrep, but other tools may use it. | ||
|
||
3. RepetitionTimeExcitation: The "true" time between the beginning of the first excitation pulse | ||
and the last one. | ||
|
||
|
||
********** | ||
M0 Scaling | ||
********** | ||
|
||
In many ASL sequences, the M0 volumes need to be scaled before they can be used to calculate CBF. | ||
This is one value that many dataset curators will not know offhand. | ||
Unfortunately, there is no standard way to find this value. | ||
Some sequences will include the scaling factor in a private DICOM field, | ||
or it may be available in the protocol's summary file (see below for an example). | ||
|
||
BIDS expects the M0 volumes to be scaled as part of the BIDS curation process, | ||
but ASLPrep has a ``--m0-scale`` parameter that users can use if they haven't already scaled | ||
the M0 volumes. | ||
|
||
.. tip:: | ||
|
||
If you are working with a BIDS dataset where it is not clear if the M0 volumes have been scaled, | ||
and, if they have not, it's not clear how much they need to be scaled, you can compute CBF based | ||
on M0 scale = 1 and then try to figure out the actual value if the values look out of range. | ||
|
||
|
||
********************************************* | ||
Separate M0 scans and the "IntendedFor" field | ||
********************************************* | ||
|
||
When you have a separate M0 scan, you need to explicitly link it to the ASL series with which it will be used. | ||
The M0 scan can be linked to multiple ASL series, or each ASL series can have its own M0 scan. | ||
|
||
The ``IntendedFor`` field is used to link the M0 scan to the ASL series, | ||
but it is not used in the same way as other ``IntendedFor`` cases (e.g., to link field maps to images). | ||
|
||
The M0 scan is not necessarily used for distortion correction. | ||
It will be used for CBF calculations, and may be used for other purposes within ASLPrep | ||
(e.g., as a high-contrast image for coregistration). | ||
|
||
|
||
********************* | ||
Other metadata fields | ||
********************* | ||
|
||
One of the most common issues with working with ASL data is that many of the required metadata fields | ||
are not encoded in standard DICOM fields, so they cannot be inferred from the DICOMs alone | ||
(at least not by a layperson). | ||
We recommend checking with your scanner physicist, when possible, to determine the correct values | ||
for these fields. | ||
|
||
Ask your physicist for the correct values for the following fields: | ||
|
||
- If the sequence is PCASL or PASL. This is typically in the series description or protocol name, but it can be wrong. | ||
- ``BackgroundSuppression`` | ||
- ``LabelingEfficiency`` (or rely on ASLPrep's heuristic) | ||
- ``PostLabelingDelay`` (should be in protocol summary file and private DICOM fields, but may be difficult to discover) | ||
- ``LabelingDuration`` (should be in protocol summary file and private DICOM fields, but may be difficult to discover) | ||
- ``BackgroundSuppressionNumberPulses`` | ||
- ``VascularCrushing`` | ||
- ``LookLocker`` | ||
- The order of volumes in the ASL file. | ||
The aslcontext.tsv is not automatically generated and is not something that can be inferred | ||
from the DICOMs (at least not easily). | ||
|
||
The list above is not comprehensive. | ||
There may be other fields or elements that need to be manually added to the dataset before it is usable. |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,5 @@ Contents | |
spaces | ||
contributors | ||
api | ||
bids | ||
What's New <https://github.com/PennLINC/aslprep/releases> |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.