5af1994def9a52fe1ffd2847b2519f1e27cfbc64,niftynet/io/misc_io.py,,do_resampling,#Any#Any#Any#Any#,149

Before Change


        return data_array
    to_multiply = np.divide(pixdim_init, pixdim_fin[:len(pixdim_init)])
    if len(to_multiply) < data_array.ndim:
        ones = np.ones(data_array.ndim - len(to_multiply))
        to_multiply = np.concatenate((to_multiply, ones))
    to_multiply = to_multiply[:data_array.ndim]
    data_resampled = scipy.ndimage.zoom(data_array,
                                        zoom=to_multiply,

After Change


    data_resampled = []
    for t in range(0, data_array.shape[4]):
        data_mod = []
        for m in range(0, data_array.shape[3]):
            data_3d = data_array[..., m, t]
            data_new = scipy.ndimage.zoom(data_3d,
                                          to_multiply[0:3],
                                          order=interp_order)
            data_mod.append(data_new[..., np.newaxis])
        data_mod = np.concatenate(data_mod, axis=-1)
        data_resampled.append(data_mod[..., np.newaxis])
    data_resampled = np.concatenate(data_resampled, axis=-1)
    return data_resampled
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: NifTK/NiftyNet
Commit Name: 5af1994def9a52fe1ffd2847b2519f1e27cfbc64
Time: 2017-08-12
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/io/misc_io.py
Class Name:
Method Name: do_resampling


Project Name: keras-team/keras
Commit Name: 9d15c9611570bd3ecab52ed924c69a60ac3b2784
Time: 2016-01-03
Author: julien@fhtagn.net
File Name: tests/keras/layers/test_convolutional.py
Class Name:
Method Name: test_upsampling_2d


Project Name: keras-team/keras
Commit Name: c60e2dfbdbb49b383b159fba7f46810c7dcbbf34
Time: 2015-10-05
Author: makoto.matsuyama@gmx.com
File Name: tests/auto/keras/layers/test_recurrent.py
Class Name:
Method Name: _runner