.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_segment_sphinx_macaque_ants_based.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_auto_examples_plot_segment_sphinx_macaque_ants_based.py: .. _plot_segment_sphinx_macaque_ants_based: ============================================================================== Plot the results of a segmentation with ANTS-based pipeline in sphinx position ============================================================================== .. GENERATED FROM PYTHON SOURCE LINES 8-19 .. code-block:: Python # Authors: David Meunier, Bastien Cagna # License: BSD (3-clause) # sphinx_gallery_thumbnail_number = 2 import os import os.path as op from macapype.utils.utils_tests import load_test_data .. GENERATED FROM PYTHON SOURCE LINES 20-22 Testing plot in local ############################################################################# .. GENERATED FROM PYTHON SOURCE LINES 22-25 .. code-block:: Python #orig_data_path = load_test_data("data_test_sphinx_macaque") .. GENERATED FROM PYTHON SOURCE LINES 26-28 # Data preparation ############################################################################## .. GENERATED FROM PYTHON SOURCE LINES 31-33 ## Reorient ##========================== .. GENERATED FROM PYTHON SOURCE LINES 33-49 .. code-block:: Python #orig_T1_file = op.join(orig_data_path, "sub-ziggy_T1w.nii") ## displaying results #orig_T1 = os.path.join(orig_data_path, "orig_T1.png") #cmd = "fsleyes render --outfile {} --size 1800 600 {}".format(orig_T1, orig_T1_file) #os.system(cmd) #import matplotlib.pyplot as plt # noqa #fig, axs = plt.subplots(1, 1, figsize=(36, 24)) #axs.imshow(plt.imread(orig_T1)) #axs.axis('off') #plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.002 seconds) .. _sphx_glr_download_auto_examples_plot_segment_sphinx_macaque_ants_based.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_segment_sphinx_macaque_ants_based.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_segment_sphinx_macaque_ants_based.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_segment_sphinx_macaque_ants_based.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_