Beispiel #1
0
def test_WB_fetch_nodes_and_labels2():
    ##Set example inputs##
    base_dir = str(Path(__file__).parent / "examples")
    parlistfile = base_dir + '/whole_brain_cluster_labels_PCA200.nii.gz'
    atlas_select = 'whole_brain_cluster_labels_PCA200'
    dir_path = base_dir + '/997'
    func_file = dir_path + '/sub-997_ses-01_task-REST_run-01_bold_space-MNI152NLin2009cAsym_preproc_masked.nii.gz'
    ref_txt = None
    parc = False

    [
        label_names, coords, atlas_name, networks_list, parcel_list, par_max,
        parlistfile, dir_path
    ] = nodemaker.WB_fetch_nodes_and_labels(atlas_select, parlistfile, ref_txt,
                                            parc, func_file)

    assert parlistfile is not None
    assert par_max is not None
    assert parcel_list is not None
    assert atlas_name is not None
    assert coords is not None
    assert dir_path is not None
Beispiel #2
0
def test_WB_fetch_nodes_and_labels2():
    # Set example inputs
    base_dir = str(Path(__file__).parent / "examples")
    parlistfile = base_dir + '/whole_brain_cluster_labels_PCA200.nii.gz'
    atlas_select = 'whole_brain_cluster_labels_PCA200'
    dir_path = base_dir + '/997'
    func_file = dir_path + '/sub-997_ses-01_task-REST_run-01_bold_space-MNI152NLin2009cAsym_preproc_masked.nii.gz'
    ref_txt = None
    parc = False

    start_time = time.time()
    [_, coords, atlas_name, _, parcel_list, par_max, parlistfile,
     dir_path] = nodemaker.WB_fetch_nodes_and_labels(atlas_select, parlistfile,
                                                     ref_txt, parc, func_file)
    print("%s%s%s" %
          ('WB_fetch_nodes_and_labels (Spherical Nodes) --> finished: ',
           str(np.round(time.time() - start_time, 1)), 's'))

    assert parlistfile is not None
    assert par_max is not None
    assert parcel_list is not None
    assert atlas_name is not None
    assert coords is not None
    assert dir_path is not None