Did I find the right examples for you? yes no

All Samples(5)  |  Call(4)  |  Derive(0)  |  Import(1)

src/n/i/nipy-0.3.0/nipy/labs/spatial_models/tests/test_parcel_io.py   nipy(Download)
from nibabel import Nifti1Image, save
from numpy.testing import assert_equal
from ...utils.simul_multisubject_fmri_dataset import surrogate_3d_dataset
from ..parcel_io import (mask_parcellation, fixed_parcellation,
                         parcellation_based_analysis)
    mask_image = Nifti1Image(np.ones(shape), np.eye(4))
    with InTemporaryDirectory() as dir_context:
        surrogate_3d_dataset(mask=mask_image, out_image_file='image.nii')
 
        #run the algo 
        data_image = ['image_%d.nii' % i for i in range(5)]
        for datim in data_image:
            surrogate_3d_dataset(mask=mask_image, out_image_file=datim)
 
        #run the algo
    mask_image = Nifti1Image(np.ones(shape), np.eye(4))
    with InTemporaryDirectory() as dir_context:
        surrogate_3d_dataset(n_subj=10, mask=mask_image, 
                             out_image_file='image.nii')    
        osp = fixed_parcellation(mask_image, ['image.nii'], n_parcel, nn,
        data_image = ['image_%d.nii' % i for i in range(5)]
        for datim in data_image:
            surrogate_3d_dataset(shape=shape, out_image_file=datim)
        ldata = np.random.randn(n_subj, np.prod(shape), 1)
        domain = grid_domain_from_shape(shape)