beaff02d91a80c2cf12e626d47b3f1678188472d,mne/source_space.py,,_get_volume_label_mask,#Any#Any#Any#,1852

Before Change


    vox_bool = mgz_data == vol_id

    // Get the 3 dimensional indices in voxel space
    vox_ijk = np.array(np.where(vox_bool)).T

    // Transform to MRI coordinates (where our surfaces live)
    _, vox_mri_t, _, _, _ = _read_mri_info(mri)
    rr_voi = apply_trans(vox_mri_t, vox_ijk)  // mri voxels -> MRI surface RAS
    // Filter out points too far from volume region voxels
    dists = _compute_nearest(rr_voi, rr, return_dists=True)[1]
    // Maximum distance from center of mass of a voxel to any of its corners
    maxdist = linalg.norm(vox_mri_t["trans"][:3, :3].sum(0) / 2.)
    return dists <= maxdist

After Change


    rr_vox = apply_trans(mri_vox_t, rr)
    good = (rr_vox >= -.5).all(-1)
    idx = np.empty(rr.shape[::-1], np.int64)
    for ii in range(3):
        good &= rr_vox[:, ii] < mgz_data.shape[ii] - 0.5
        idx[ii] = np.clip(np.round(rr_vox[:, ii]).astype(np.int64),
                          0, mgz_data.shape[ii] - 1)
    good &= mgz_data[tuple(idx)] == vol_id
    return good

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: mne-tools/mne-python
Commit Name: beaff02d91a80c2cf12e626d47b3f1678188472d
Time: 2020-04-22
Author: larson.eric.d@gmail.com
File Name: mne/source_space.py
Class Name:
Method Name: _get_volume_label_mask


Project Name: biotite-dev/biotite
Commit Name: 1675e2873db77528ef1dee6fc49aaccfca9a369b
Time: 2020-11-27
Author: tom.mueller@beachouse.de
File Name: src/biotite/structure/dotbracket.py
Class Name:
Method Name: dot_bracket


Project Name: tensorflow/models
Commit Name: 5e854f25098ca40a4ac80197607bf883feaeb375
Time: 2018-02-13
Author: lzc@google.com
File Name: research/object_detection/utils/learning_schedules.py
Class Name:
Method Name: manual_stepping


Project Name: aertslab/pySCENIC
Commit Name: 6d6a32dd677aa6097c4e77b359f81989c3e949af
Time: 2018-04-05
Author: vandesande.bram@gmail.com
File Name: src/pyscenic/rnkdb.py
Class Name:
Method Name: build_rankings