.. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_nifti_get_slice.py: ============================= Index nifti object ============================= In this example, we load a brain object as a nifti object, and index 5 timepoints. .. code-block:: python # Code source: Lucy Owen & Andrew Heusser # License: MIT # load import supereeg as se # initialize a nifti object with a brain object or model object bo_nii = se.load('example_data', return_type='nii') # or you can slice first 5 time points bo_nii_slice = bo_nii.get_slice(index=[0,1,2,3,4]) **Total running time of the script:** ( 0 minutes 0.000 seconds) .. _sphx_glr_download_auto_examples_nifti_get_slice.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download :download:`Download Python source code: nifti_get_slice.py ` .. container:: sphx-glr-download :download:`Download Jupyter notebook: nifti_get_slice.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_