3162e475ad96caa7e62a6351544fac23e148ab30,niftynet/engine/sampler_selective.py,,rand_choice_coordinates,#Any#Any#Any#Any#Any#,196

Before Change


        assert uniq_spatial_size[i] >= max_spatial_win[i], \
            "window size {} is larger than image size {}".format(
                max_spatial_win[i], uniq_spatial_size[i])
        max_coords[:, i] = np.random.randint(
            0, max(uniq_spatial_size[i] - max_spatial_win[i], 1), n_samples)

    // adjust max spatial coordinates based on each spatial window size
    all_coordinates = {}
    for mod in list(win_sizes):

After Change


        indices_to_add = candidates_indices[list_indices[i]]
        print(max_coords.shape, indices_to_add)
        for s in range(0, N_SPATIAL):
            max_coords[i, s] = indices_to_add[s] - np.floor(
                spatial_win_sizes[0]/2)[s]
    // for i in range(0, N_SPATIAL):
    //     assert uniq_spatial_size[i] >= max_spatial_win[i], \
    //         "window size {} is larger than image size {}".format(
    //             max_spatial_win[i], uniq_spatial_size[i])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: NifTK/NiftyNet
Commit Name: 3162e475ad96caa7e62a6351544fac23e148ab30
Time: 2017-09-16
Author: carole.sudre.12@ucl.ac.uk
File Name: niftynet/engine/sampler_selective.py
Class Name:
Method Name: rand_choice_coordinates


Project Name: keras-team/keras
Commit Name: 403b4fc7a25da5d957b24f1c269103ef6e290bd6
Time: 2016-01-26
Author: udi@benreuven.com
File Name: keras/preprocessing/image.py
Class Name: ImageDataGenerator
Method Name: flow


Project Name: keras-team/autokeras
Commit Name: b048efa4f956b80266942caea6ee8b4311e1d17a
Time: 2018-04-08
Author: jin@tamu.edu
File Name: autokeras/net_transformer.py
Class Name:
Method Name: to_wider_graph