-
-
Notifications
You must be signed in to change notification settings - Fork 2
Quick Assistance #53 #58
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
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| # **Quick Assistance** | ||
|
|
||
| This section provides minimal examples of common tasks in `asltk`, to help new users get started quickly. | ||
|
|
||
| Each snippet includes links to full guides and deeper usage in the rest of the documentation. | ||
|
|
||
| --- | ||
|
|
||
| ## Load and Save an ASL Image | ||
|
|
||
| ```python | ||
| from asltk.io import load_asl, save_asl | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please, check the |
||
|
|
||
| asl_data = load_asl("input_asl.nii.gz") | ||
| save_asl(asl_data, "output_asl.nii.gz") | ||
| ``` | ||
| * Related: [Examples](docs/usage_examples.md), [Getting started](docs/getting_started.md) | ||
| --- | ||
| ## Modify Parameters of an ASL Image | ||
| ```python | ||
| from asltk.io import load_asl | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please, check the |
||
|
|
||
| asl_data = load_asl("image.nii.gz") | ||
| asl_data.pld_values = [1.5] # Update post-label delay | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. a sugestion is to provide more data in the list, even though that new data is randomly choosen. |
||
| asl_data.ld_values = [1.8] # Update label duration | ||
| ``` | ||
| --- | ||
| ## Copy an ASL Dataset | ||
| ```python | ||
| from copy import deepcopy | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please, check the |
||
| from asltk.io import load_asl | ||
|
|
||
| asl_data = load_asl("scan.nii.gz") | ||
| asl_copy = deepcopy(asl_data) | ||
| ``` | ||
| --- | ||
| ## Create T1-BLG Map from MultiTE-ASL | ||
| ```python | ||
| from asltk.io import load_asl | ||
| from asltk.multite import generate_t1blgm_map | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please, check the |
||
|
|
||
| multi_te_asl = load_asl("multite_asl.nii.gz") | ||
| t1blgm_map = generate_t1blgm_map(multi_te_asl) | ||
| ``` | ||
| * see also: [usage examples](usage_examples.md) | ||
| --- | ||
| ## Modify Parameters Before Reconstruction | ||
| ```python | ||
| from asltk.io import load_asl | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please, check the |
||
| from asltk.recon import CBFReconstruction | ||
|
|
||
| asl_data = load_asl("input_asl.nii.gz") | ||
| asl_data.pld_values = [2.0] | ||
| asl_data.ld_values = [1.5] | ||
|
|
||
| cbf = CBFReconstruction() | ||
| cbf_map = cbf.run(asl_data) | ||
| ``` | ||
| --- | ||
| ## Add Logging to a Script | ||
| ```python | ||
| from asltk import setup_logging, get_logger | ||
|
|
||
| setup_logging(level="INFO", console_output=True) | ||
| logger = get_logger() | ||
| logger.info("Starting ASL processing...") | ||
| ``` | ||
| * See: [logging](logging.md) | ||
| * full logging guide: [logging](logging.md) | ||
| --- | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is also needed to be allocated the new
quick_assistance.mdfile into themkdocs.ymlconfiguration.Please modify the configuration to propagate the documentation correctly.