Skip to content
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

Implement general kinetic model for multi-PLD data #381

Draft
wants to merge 77 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
4df67f3
Draft model fitting code for GKM.
tsalo Dec 14, 2023
3ea0617
Merge remote-tracking branch 'upstream/main' into gkm
tsalo Dec 21, 2023
1b5357d
Keep drafting the fitting code.
tsalo Dec 21, 2023
8fdb90d
It's CBF, not CSF.
tsalo Dec 21, 2023
462d76e
Move the functions.
tsalo Dec 21, 2023
77d4f1b
Try using the new method.
tsalo Dec 21, 2023
2988985
Update boilerplate.bib
tsalo Dec 21, 2023
2f038ef
Update cbf.py
tsalo Dec 21, 2023
c4046f1
Improve shape checks.
tsalo Dec 21, 2023
42125b9
Update cbf.py
tsalo Dec 21, 2023
45a6213
Update cbf.py
tsalo Dec 21, 2023
23b48ca
Try adding equations to docs.
tsalo Dec 21, 2023
1cb0706
Make tau an array.
tsalo Dec 21, 2023
7c9905a
Update workflows.rst
tsalo Dec 21, 2023
59a9e78
Update workflows.rst
tsalo Dec 21, 2023
a551dd4
Update workflows.rst
tsalo Dec 21, 2023
d2566ed
Update workflows.rst
tsalo Dec 21, 2023
15b8c45
Update.
tsalo Dec 21, 2023
96095ae
Try that.
tsalo Dec 22, 2023
9f77294
Update cbf.py
tsalo Dec 22, 2023
2d49598
More work.
tsalo Dec 22, 2023
4cd4d89
Update cbf.py
tsalo Dec 22, 2023
b5b2d9f
Give the new outputs a try.
tsalo Dec 22, 2023
6b00c32
Update plotting.py
tsalo Dec 22, 2023
2e07bfc
reorg
tsalo Dec 22, 2023
2dcb394
Update test_cli.py
tsalo Dec 22, 2023
0b60bed
Update expected_outputs_examples_pcasl_multipld.txt
tsalo Dec 22, 2023
5d76dc2
Update test_cli.py
tsalo Dec 22, 2023
02b999d
Update tests.
tsalo Dec 22, 2023
117aab6
Update cbf.py
tsalo Dec 22, 2023
7dfe3d9
Plot the other metrics.
tsalo Jan 2, 2024
4e76b3f
Update plotting.py
tsalo Jan 2, 2024
1cdf6ba
Update figures.
tsalo Jan 2, 2024
ada7e47
Fix connection.
tsalo Jan 2, 2024
93c2a75
Drop upper limits for check.
tsalo Jan 3, 2024
db98997
Update formulae and add bounds back in.
tsalo Jan 3, 2024
d29b4eb
Remove unused functions and citations.
tsalo Jan 3, 2024
ffe80e1
Update workflows.rst
tsalo Jan 3, 2024
2c6ac42
Update workflows.rst
tsalo Jan 3, 2024
f3e9b58
Update workflows.rst
tsalo Jan 3, 2024
b16730c
Update workflows.rst
tsalo Jan 3, 2024
21098ab
Update workflows.rst
tsalo Jan 3, 2024
fa2f726
Update workflows.rst
tsalo Jan 3, 2024
b344acd
Update workflows.rst
tsalo Jan 3, 2024
bd03dff
Fix tests.
tsalo Jan 3, 2024
e069608
Update again.
tsalo Jan 3, 2024
7d7f3ea
Update workflows.rst
tsalo Jan 3, 2024
0401a1b
Fix documentation issues.
tsalo Jan 3, 2024
2f7b30a
Update outputs.py
tsalo Jan 3, 2024
3d5efbd
Update resampling.py
tsalo Jan 3, 2024
beb5ca4
Resample M0 scan before motion correction.
tsalo Jan 4, 2024
f10908c
Whoops!
tsalo Jan 4, 2024
dc9079f
Fix more.
tsalo Jan 4, 2024
80d715a
Use try/except for model fit.
tsalo Jan 4, 2024
70ecc2f
Update expected_outputs_examples_pasl_multipld.txt
tsalo Jan 4, 2024
69eb31a
Fix citations.
tsalo Jan 4, 2024
e4de393
Improve boilerplate.
tsalo Jan 9, 2024
fccf828
Improve boilerplate.
tsalo Jan 10, 2024
b9135c5
Improve boilerplate.
tsalo Jan 10, 2024
39e721c
Update equations.
tsalo Jan 10, 2024
67ee660
Try making a glossary.
tsalo Jan 10, 2024
71d244c
Drop glossary.
tsalo Jan 10, 2024
8e50938
Update figures.
tsalo Jan 10, 2024
19376a9
Update plotting.py
tsalo Jan 10, 2024
aae2246
Update plotting.py
tsalo Jan 10, 2024
e48062b
Update plotting.py
tsalo Jan 10, 2024
50da3fc
Update plotting.py
tsalo Jan 10, 2024
076d9db
Merge remote-tracking branch 'upstream/main' into gkm
tsalo Jan 10, 2024
1b7ca72
Change limits.
tsalo Jan 11, 2024
cbf56c1
Improve documentation.
tsalo Jan 12, 2024
eedcea5
Fix input type.
tsalo Jan 12, 2024
1f03e36
Use large resource class for PASL multi-PLD.
tsalo Jan 12, 2024
c9a8c80
Update HTML report captions.
tsalo Jan 12, 2024
5c2c0ed
Update test_cli.py
tsalo Jan 12, 2024
4ce2d58
Update reports-spec.yml
tsalo Jan 12, 2024
89ea5c8
Merge remote-tracking branch 'upstream/main' into gkm
tsalo Apr 14, 2024
0383057
Merge branch 'main' into gkm
tsalo Apr 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,8 @@ jobs:
root: /src/coverage
paths:
- .coverage.examples_pasl_multipld
# The resource_class feature allows configuring CPU and RAM resources for each job. Different resource classes are available for different executors. https://circleci.com/docs/2.0/configuration-reference/#resourceclass
resource_class: large

qtab:
<<: *dockersetup
Expand Down
27 changes: 0 additions & 27 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,3 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


## External code

### aslprep.utils.misc.estimate_att_pcasl

MIT License

Copyright (c) 2023 willtack

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
6 changes: 3 additions & 3 deletions aslprep/data/aslprep_bids_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
"sub-{subject}[/ses-{session}]/[{datatype<func|beh>|func}/]sub-{subject}[_ses-{session}]_task-{task}[_acq-{acquisition}][_rec-{reconstruction}][_run-{run}][_echo-{echo}][_recording-{recording}]_{suffix<physio|stim>}{extension<.tsv.gz|.json>|.tsv.gz}",
"sub-{subject}[/ses-{session}]/{datatype<func|perf>|func}/sub-{subject}[_ses-{session}][_task-{task}][_acq-{acquisition}][_ce-{ceagent}][_dir-{direction}][_rec-{reconstruction}][_run-{run}][_echo-{echo}][_space-{space}][_atlas-{atlas}][_cohort-{cohort}][_desc-{desc}]_{suffix<regressors|timeseries>|timeseries}{extension<.json|.tsv|.csv|>|.tsv}",
"sub-{subject}[/ses-{session}]/{datatype<perf>|perf}/sub-{subject}[_ses-{session}][_task-{task}][_acq-{acquisition}][_ce-{ceagent}][_dir-{direction}][_rec-{reconstruction}][_run-{run}][_echo-{echo}][_desc-{desc}]_{suffix<confounds>}{extension<.tsv|.json>|.tsv}",
"sub-{subject}[/ses-{session}]/{datatype<perf>|perf}/sub-{subject}[_ses-{session}][_task-{task}][_acq-{acquisition}][_ce-{ceagent}][_dir-{direction}][_rec-{reconstruction}][_run-{run}][_echo-{echo}][_space-{space}][_res-{res}][_atlas-{atlas}][_cohort-{cohort}][_desc-{desc}]_{suffix<asl|aslref|att|cbf|coverage|mask>}{extension<.nii|.nii.gz|.json|.csv|.tsv>|.nii.gz}",
"sub-{subject}[/ses-{session}]/{datatype<perf>|perf}/sub-{subject}[_ses-{session}][_task-{task}][_acq-{acquisition}][_ce-{ceagent}][_dir-{direction}][_rec-{reconstruction}][_run-{run}][_echo-{echo}][_space-{space}][_res-{res}][_den-{den}][_cohort-{cohort}][_desc-{desc}]_{suffix<asl|att|cbf>}{extension<.dtseries.nii|.dscalar.nii|.json|.dscalar.json|.dtseries.json|.func.gii|.func.json>|.dtseries.nii}",
"sub-{subject}[/ses-{session}]/{datatype<figures>|figures}/sub-{subject}[_ses-{session}][_task-{task}][_acq-{acquisition}][_ce-{ceagent}][_dir-{direction}][_rec-{reconstruction}][_run-{run}][_echo-{echo}][_space-{space}][_res-{res}][_den-{den}][_cohort-{cohort}][_desc-{desc}]_{suffix<asl|aslref|att|cbf|basil|score|scrub|pvc|mask>}{extension<.svg|.png|.html>|.svg}",
"sub-{subject}[/ses-{session}]/{datatype<perf>|perf}/sub-{subject}[_ses-{session}][_task-{task}][_acq-{acquisition}][_ce-{ceagent}][_dir-{direction}][_rec-{reconstruction}][_run-{run}][_echo-{echo}][_space-{space}][_res-{res}][_atlas-{atlas}][_cohort-{cohort}][_desc-{desc}]_{suffix<asl|aslref|abat|abv|att|cbf|coverage|mask>}{extension<.nii|.nii.gz|.json|.csv|.tsv>|.nii.gz}",
"sub-{subject}[/ses-{session}]/{datatype<perf>|perf}/sub-{subject}[_ses-{session}][_task-{task}][_acq-{acquisition}][_ce-{ceagent}][_dir-{direction}][_rec-{reconstruction}][_run-{run}][_echo-{echo}][_space-{space}][_res-{res}][_den-{den}][_cohort-{cohort}][_desc-{desc}]_{suffix<asl|abat|abv|att|cbf>}{extension<.dtseries.nii|.dscalar.nii|.json|.dscalar.json|.dtseries.json|.func.gii|.func.json>|.dtseries.nii}",
"sub-{subject}[/ses-{session}]/{datatype<figures>|figures}/sub-{subject}[_ses-{session}][_task-{task}][_acq-{acquisition}][_ce-{ceagent}][_dir-{direction}][_rec-{reconstruction}][_run-{run}][_echo-{echo}][_space-{space}][_res-{res}][_den-{den}][_cohort-{cohort}][_desc-{desc}]_{suffix<asl|aslref|abat|abv|att|cbf|basil|score|scrub|pvc|mask>}{extension<.svg|.png|.html>|.svg}",
"sub-{subject}/{datatype<figures>}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_run-{run}][_space-{space}][_atlas-{atlas}][_cohort-{cohort}][_desc-{desc}]_{suffix<T1w|T2w|T1rho|T1map|T2map|T2star|FLAIR|FLASH|PDmap|PD|PDT2|inplaneT[12]|angio|dseg|mask|dwi|epiref|fieldmap>}{extension<.html|.svg|.png>}",
"sub-{subject}/{datatype<figures>}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_run-{run}][_space-{space}][_atlas-{atlas}][_cohort-{cohort}][_desc-{desc}]_{suffix<dseg|mask|dwi|epiref|fieldmap>}{extension<.html|.svg|.png>}",
"sub-{subject}[/ses-{session}]/{datatype<anat>|anat}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_run-{run}]_from-{from}_to-{to}_mode-{mode<image|points>|image}_{suffix<xfm>|xfm}{extension<.txt|.h5|.json>}",
Expand Down
56 changes: 10 additions & 46 deletions aslprep/data/boilerplate.bib
Original file line number Diff line number Diff line change
Expand Up @@ -557,27 +557,6 @@ @article{groves2009combined
publisher={Elsevier}
}

@article{dai2012reduced,
title={Reduced resolution transit delay prescan for quantitative continuous arterial spin labeling perfusion imaging},
author={Dai, Weiying and Robson, Philip M and Shankaranarayanan, Ajit and Alsop, David C},
journal={Magnetic resonance in medicine},
volume={67},
number={5},
pages={1252--1265},
year={2012},
publisher={Wiley Online Library}
}

@article{wang2013multi,
title={Multi-delay multi-parametric arterial spin-labeled perfusion MRI in acute ischemic stroke—comparison with dynamic susceptibility contrast enhanced perfusion imaging},
author={Wang, Danny JJ and Alger, Jeffry R and Qiao, Joe X and Gunther, Matthias and Pope, Whitney B and Saver, Jeffrey L and Salamon, Noriko and Liebeskind, David S and UCLA Stroke Investigators and others},
journal={NeuroImage: Clinical},
volume={3},
pages={1--7},
year={2013},
publisher={Elsevier}
}

@article{clement2022asl,
title={ASL-BIDS, the brain imaging data structure extension for arterial spin labeling},
author={Clement, Patricia and Castellaro, Marco and Okell, Thomas W and Thomas, David L and Vandemaele, Pieter and Elgayar, Sara and Oliver-Taylor, Aaron and Kirk, Thomas and Woods, Joseph G and Vos, Sjoerd B and others},
Expand Down Expand Up @@ -615,31 +594,6 @@ @article{wang2005amplitude
doi={10.1148/radiol.2351031663}
}

@article{fan2017long,
title={Long-delay arterial spin labeling provides more accurate cerebral blood flow measurements in moyamoya patients: a simultaneous positron emission tomography/MRI study},
author={Fan, Audrey P and Guo, Jia and Khalighi, Mohammad M and Gulaka, Praveen K and Shen, Bin and Park, Jun Hyung and Gandhi, Harsh and Holley, Dawn and Rutledge, Omar and Singh, Prachi and others},
journal={Stroke},
volume={48},
number={9},
pages={2441--2449},
year={2017},
publisher={Am Heart Assoc},
url={https://doi.org/10.1161/STROKEAHA.117.017773},
doi={10.1161/STROKEAHA.117.017773}
}

@article{juttukonda2021characterizing,
title={Characterizing cerebral hemodynamics across the adult lifespan with arterial spin labeling MRI data from the Human Connectome Project-Aging},
author={Juttukonda, Meher R and Li, Binyin and Almaktoum, Randa and Stephens, Kimberly A and Yochim, Kathryn M and Yacoub, Essa and Buckner, Randy L and Salat, David H},
journal={Neuroimage},
volume={230},
pages={117807},
year={2021},
publisher={Elsevier},
url={https://doi.org/10.1016/j.neuroimage.2021.117807},
doi={10.1016/j.neuroimage.2021.117807}
}

@article{noguchi2015technical,
title={A technical perspective for understanding quantitative arterial spin-labeling MR imaging using Q2TIPS},
author={Noguchi, Tomoyuki and Nishihara, Masashi and Hara, Yukiko and Hirai, Tetsuyoshi and Egashira, Yoshiaki and Azama, Shinya and Irie, Hiroyuki},
Expand Down Expand Up @@ -852,3 +806,13 @@ @article{topup
doi = {10.1016/S1053-8119(03)00336-7},
url = {https://www.sciencedirect.com/science/article/pii/S1053811903003367}
}

@article{woods2023recommendations,
title={Recommendations for quantitative cerebral perfusion MRI using multi-timepoint arterial spin labeling: Acquisition, quantification, and clinical applications},
author={Woods, Joseph G and Achten, Eric and Asllani, Iris and Bolar, Divya S and Dai, Weiying and Detre, John A and Fan, Audrey P and Fern{\'a}ndez-Seara, Maria and Golay, Xavier and G{\"u}nther, Matthias and Guo, Jia and Hernandez-Garcia, Luis and Ho, Mai-Lan and Juttukonda, Meher R. and Lu, Hanzhang and MacIntosh, Bradley J. and Madhuranthakam, Ananth J. and Mutsaerts, Henk J.M.M. and Okell, Thomas W. and Parkes, Laura M. and Pinter, Nandor and Pinto, Joana and Qin, Qin and Smits, Marion and Suzuki, Yuriko and Thomas, David L. and van Osch, Matthias J.P. and Wang, Danny J.J. and Warnert, Esther A.H. and Zaharchuk, Greg and Zelaya, Fernando and Zhao, Moss and Chappell, Michael A.},
year={2023},
journal={OSF Preprints},
publisher={OSF Preprints},
doi={10.31219/osf.io/4tskr},
url={https://doi.org/10.31219/osf.io/4tskr},
}
Loading
Loading