.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "howto/howto_examples/cerebellar_peduncles.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_howto_howto_examples_cerebellar_peduncles.py: ================================ Delineating cerebellar peduncles ================================ The cerebellar peduncles are white matter tracts that connect the cerebellum to the brainstem and cortex. In this example, we show how to delineate the cerebellar peduncles using a subject from the Healthy Brain Network dataset. This how-to will focus on the definition of the Cerebellar Peduncles (CP) based on [1]_, [2]. .. GENERATED FROM PYTHON SOURCE LINES 14-102 .. code-block:: Python import AFQ.data.fetch as afd import AFQ.api.bundle_dict as abd from AFQ.api.group import GroupAFQ from AFQ.definitions.image import RoiImage, ImageFile """ We will use a subject from the HBN dataset. When considering the data for this operation, look to see whether the acquisition volume includes the cerbellum. If it does not, it will be hard to delineate the CPs. """ bids_path = afd.fetch_hbn_afq(["NDARAA948VFH"])[1] """ The next line downloads the cerebellar peduncle templates from `Figshare `_. """ cp_rois = afd.read_cp_templates() """ The following line defines a bundle dictionary for the cerebellar peduncles. There are three CPs: The ICP, the MCP, and the SCP. Each CP is defined by two inclusion ROIs and one exclusion ROI. The Inferior CPs are defined by inclusion ROIs. They do not decussate, so "cross_midline" is set to False. The Superior CPs are defined by two inclusion ROIs and an exclusion ROI, where each SCP's most superior inclusion ROI is the other SCP's exclusion ROI. They decussate, so "cross_midline" is set to True. The Middle CPs are defined by two inclusion ROIs and they use the SCP intermediate ROIs as exclusion ROIs. """ cp_bundles = abd.cerebellar_bd() """ The bundle dict has been defined, and now we are ready to run the AFQ pipeline. In this case, we are using data that has been preprocessed with QSIprep, so we have a brain mask that was generated from the T1w data of this subject. """ brain_mask_definition = ImageFile( suffix="mask", filters={'desc': 'brain', 'space': 'T1w', 'scope': 'qsiprep'}) """ Next, we define a GroupAFQ object. In this case, the tracking parameters focus specifically on the CP, by using the ``RoiImage`` class to define the seed region. We seed extensively in the ROIs that define the CPs. """ cp_afq = GroupAFQ( name="cp_afq", bids_path=bids_path, preproc_pipeline="qsiprep", brain_mask_definition=brain_mask_definition, tracking_params={ "n_seeds": 4, "directions": "prob", "odf_model": "CSD", "seed_mask": RoiImage()}, clip_edges=True, bundle_info=cp_bundles) """ The call to `export("bundles")` triggers the execution of the full pipeline. """ cp_afq.export("bundles") """ References ---------- .. [1] S. Jossinger, A. Sares, A. Zislis, D. Sury, V. Gracco, M. Ben-Shachar (2022) White matter correlates of sensorimotor synchronization in persistent developmental stuttering, Journal of Communication Disorders, 95. .. [2] S. Jossinger, M. Yablonski, O. Amir, M. Ben-Shachar (2023). The contributions of the cerebellar peduncles and the frontal aslant tract in mediating speech fluency. Neurobiology of Language 2023; doi: https://doi.org/10.1162/nol_a_00098 """ **Estimated memory usage:** 0 MB .. _sphx_glr_download_howto_howto_examples_cerebellar_peduncles.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: cerebellar_peduncles.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: cerebellar_peduncles.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_