{ "cells": [ { "cell_type": "markdown", "id": "230c35bb", "metadata": {}, "source": [ "# Delineating cerebellar peduncles\n", "\n", "The cerebellar peduncles are white matter tracts that connect the cerebellum to\n", "the brainstem and cortex. In this example, we show how to delineate the\n", "cerebellar peduncles using a subject from the Healthy Brain Network dataset.\n", "\n", "This how-to will focus on the definition of the Cerebellar Peduncles (CP) based\n", "on [^1], [^2]." ] }, { "cell_type": "code", "execution_count": null, "id": "56962d3a", "metadata": {}, "outputs": [], "source": [ "import AFQ.data.fetch as afd\n", "import AFQ.api.bundle_dict as abd\n", "from AFQ.api.group import GroupAFQ\n", "from AFQ.definitions.image import RoiImage, ImageFile" ] }, { "cell_type": "markdown", "id": "5d92fa49", "metadata": {}, "source": [ "We will use a subject from the HBN dataset. When considering the data\n", "for this operation, look to see whether the acquisition volume includes the\n", "cerbellum. If it does not, it will be hard to delineate the CPs." ] }, { "cell_type": "code", "execution_count": null, "id": "c2e698ac", "metadata": {}, "outputs": [], "source": [ "bids_path = afd.fetch_hbn_afq([\"NDARAA948VFH\"])[1]" ] }, { "cell_type": "markdown", "id": "e23943e0", "metadata": {}, "source": [ "The next line downloads the cerebellar peduncle templates from `Figshare `_." ] }, { "cell_type": "code", "execution_count": null, "id": "63bfd906", "metadata": {}, "outputs": [], "source": [ "cp_rois = afd.read_cp_templates()" ] }, { "cell_type": "markdown", "id": "bec2c351", "metadata": {}, "source": [ "The following line defines a bundle dictionary for the cerebellar\n", "peduncles. There are three CPs: The ICP, the MCP, and the SCP. Each CP is\n", "defined by two inclusion ROIs and one exclusion ROI. The Inferior CPs are\n", "defined by inclusion ROIs. They do not decussate, so \"cross_midline\" is set to\n", "False. The Superior CPs are defined by two inclusion ROIs and an exclusion ROI,\n", "where each SCP's most superior inclusion ROI is the other SCP's exclusion ROI.\n", "They decussate, so \"cross_midline\" is set to True. The Middle CPs are defined\n", "by two inclusion ROIs and they use the SCP intermediate ROIs as exclusion ROIs." ] }, { "cell_type": "code", "execution_count": null, "id": "61f58887", "metadata": {}, "outputs": [], "source": [ "cp_bundles = abd.cerebellar_bd()" ] }, { "cell_type": "markdown", "id": "14a00adb", "metadata": {}, "source": [ "The bundle dict has been defined, and now we are ready to run the AFQ pipeline.\n", "Next, we define a GroupAFQ object. In this case, the tracking parameters\n", "focus specifically on the CP, by using the `RoiImage` class to define the\n", "seed region. We seed extensively in the ROIs that define the CPs." ] }, { "cell_type": "code", "execution_count": null, "id": "9eae93a5", "metadata": {}, "outputs": [], "source": [ "cp_afq = GroupAFQ(\n", " name=\"cp_afq\",\n", " bids_path=bids_path,\n", " dwi_preproc_pipeline=\"qsiprep\",\n", " tracking_params={\n", " \"n_seeds\": 4,\n", " \"random_seeds\": False,\n", " \"directions\": \"prob\",\n", " \"odf_model\": \"CSD\",\n", " \"seed_mask\": RoiImage()},\n", " clip_edges=True,\n", " bundle_info=cp_bundles)" ] }, { "cell_type": "markdown", "id": "245ef415", "metadata": {}, "source": [ "The call to `export(\"bundles\")` triggers the execution of the full pipeline." ] }, { "cell_type": "code", "execution_count": null, "id": "d2541495", "metadata": {}, "outputs": [], "source": [ "cp_afq.export(\"bundles\")" ] }, { "cell_type": "markdown", "id": "f96927b3", "metadata": {}, "source": [ "## References\n", "\n", "[^1]: S. Jossinger, A. Sares, A. Zislis, D. Sury, V. Gracco, M. Ben-Shachar (2022)\n", " White matter correlates of sensorimotor synchronization in persistent\n", " developmental stuttering, Journal of Communication Disorders, 95.\n", "\n", "[^2]: S. Jossinger, M. Yablonski, O. Amir, M. Ben-Shachar (2023). The\n", " contributions of the cerebellar peduncles and the frontal aslant tract\n", " in mediating speech fluency. Neurobiology of Language 2023;\n", " doi: https://doi.org/10.1162/nol_a_00098\n", "\n", ":::{only} html\n", "{download}`Download as Jupyter Notebook `\n", ":::" ] } ], "metadata": { "file_format": "mystnb", "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "name": "python", "pygments_lexer": "ipython3" }, "mystnb": { "execution_mode": "off" } }, "nbformat": 4, "nbformat_minor": 5 }