File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -704,6 +704,33 @@ def agg_data(self, intent_code=None):
704
704
-------
705
705
tuple of ndarrays or ndarray
706
706
If the input is a tuple, the returned tuple will match the order.
707
+
708
+ Examples
709
+ --------
710
+ >>> import nibabel as nib
711
+ >>> from nibabel.testing import test_data
712
+ >>> surf_gii_fname = test_data('gifti', 'ascii.gii')
713
+ >>> surf_gii_img = nib.load(surf_gii_fname)
714
+ >>> func_gii_fname = test_data('gifti', 'task.func.gii')
715
+ >>> func_gii_img = nib.load(func_gii_fname)
716
+
717
+ Retrieve data without passing ``intent code``
718
+
719
+ >>> surf_data = surf_gii_img.agg_data()
720
+ >>> func_data = func_gii_img.agg_data()
721
+
722
+ When passig matching intend codes ``intent_code``
723
+
724
+ >>> pointset_data = surf_gii_img.agg_data('pointset') # surface pointset
725
+ >>> triangle_data = surf_gii_img.agg_data('triangle') # surface triangle
726
+ >>> ts_data = func_gii_img.agg_data('time series') # functional file
727
+
728
+ When passing mismatching ``intent_code``, the function return a empty ``tuple``
729
+
730
+ >>> surf_gii_img.agg_data('time series')
731
+ ()
732
+ >>> func_gii_img.agg_data('triangle')
733
+ ()
707
734
"""
708
735
709
736
# Allow multiple intents to specify the order
You can’t perform that action at this time.
0 commit comments