This code helps to convert ASL data to bids format as propopsed in ASLBIDS
First, the dicom files need to be convereted to bids with heudiconv and require heuristic file.
For example with sample heuritic file (heuristic.py
)
heudiconv --files dicomdirectory -s subjectid -ss session_id -o outputbidsdirectory --bids -f heuristic.py
Second step is to edit ASL json files with edit_aslbids.py
. It require json files (see example metadataextra.jon that contain extra metadata for ASL,MO and mean CBF as proposed in ASLBIDS. The metadataextra.jon also has asllabel
to be specify for each volume to write out the aslcontext
.
The most important paremeters required for ASLPREP are::
"ArterialLabelingType": labeling type, either PCASL or ASL
"LabelingDuration": labeling duraion in seconds
"PostLabelingDelay": post labeling delayin seconds
"BackgroundSuppression": Yes or no
"M0Scale": MO scale , defualt is 1
"LabelingEfficiency": default are use depending on labeling type (PCASL or ASL)
edit_aslbids.py -s SUBJECT_ID -t SESSION_ID -b BIDS_DIR -j JSONTEMPLATE
- SUBJECT_ID > subject id e.g sub-XX, require
- SESSION_ID > session id e.g ses-YY, require if the bids has seission
- BIDS_DIR > bids output of heudiconv
- JSONTEMPLATE > metadetata for asl,m0 and mean CBF, there is sample here (
metadataextra.json
) and should be edited as required
On flywheel using fw-heudiconv, the extra metadata and ASLContext files can be specified in your heuristic during curation.