.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/example_sulcal_depth.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_example_sulcal_depth.py: .. _example_differential_geometry: =================================== example of differential geometry tools in slam =================================== .. GENERATED FROM PYTHON SOURCE LINES 8-14 .. code-block:: Python # Authors: Guillaume Auzias # License: MIT # sphinx_gallery_thumbnail_number = 2 .. GENERATED FROM PYTHON SOURCE LINES 15-19 NOTE: there is no visualization tool in slam, but we provide at the end of this script exemplar code to do the visualization with an external solution ############################################################################## .. GENERATED FROM PYTHON SOURCE LINES 21-22 importation of slam modules .. GENERATED FROM PYTHON SOURCE LINES 22-25 .. code-block:: Python import slam.io as sio import slam.sulcal_depth as sdepth .. GENERATED FROM PYTHON SOURCE LINES 26-27 loading an examplar mesh and corresponding texture .. GENERATED FROM PYTHON SOURCE LINES 27-31 .. code-block:: Python mesh_file = "../examples/data/example_mesh.gii" texture_file = "../examples/data/example_texture.gii" mesh = sio.load_mesh(mesh_file) .. GENERATED FROM PYTHON SOURCE LINES 32-33 compute the depth potential function .. GENERATED FROM PYTHON SOURCE LINES 33-35 .. code-block:: Python dpf = sdepth.depth_potential_function(mesh) .. rst-class:: sphx-glr-script-out .. code-block:: none Calculating vertex normals .... Please wait Finished calculating vertex normals Calculating curvature tensors ... Please wait Finished Calculating curvature tensors Calculating Principal Components ... Please wait Finished Calculating principal components Computing Laplacian Computing mesh weights of type fem -edge length threshold needed for 0 values = 0.0 % -number of Nan in weights: 0 = 0.0 % -number of Negative values in weights: 936 = 6.706792777300086 % -nb Nan in Laplacian : 0 -nb Inf in Laplacian : 0 .. GENERATED FROM PYTHON SOURCE LINES 36-37 compute the dpf_star .. GENERATED FROM PYTHON SOURCE LINES 37-38 .. code-block:: Python dpf_star = sdepth.dpf_star(mesh) .. rst-class:: sphx-glr-script-out .. code-block:: none Calculating vertex normals .... Please wait Finished calculating vertex normals Calculating curvature tensors ... Please wait Finished Calculating curvature tensors Calculating Principal Components ... Please wait Finished Calculating principal components Computing Laplacian Computing mesh weights of type conformal -edge length threshold needed for 0 values = 0.0 % -number of Nan in weights: 0 = 0.0 % -number of Negative values in weights: 936 = 6.706792777300086 % -nb Nan in Laplacian : 0 -nb Inf in Laplacian : 0 .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 5.439 seconds) .. _sphx_glr_download_auto_examples_example_sulcal_depth.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: example_sulcal_depth.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: example_sulcal_depth.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: example_sulcal_depth.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_