4dc161e3b8ebdd5c62f2dd4fa8a176568a92659d,dipy/align/reslice.py,,reslice,#Any#Any#Any#Any#Any#Any#Any#,5
Before Change
if data.ndim == 4:
data2l=[]
for i in range(data.shape[-1]):
tmp = affine_transform(input=data[..., i], matrix=R,
offset=np.zeros(3,),
output_shape=tuple(new_shape),
order=order, mode=mode, cval=cval)
data2l.append(tmp)
data2 = np.zeros(tmp.shape+(data.shape[-1],), data.dtype)
for i in range(data.shape[-1]):
data2[..., i] = data2l[i]
After Change
R = np.array(new_zooms) / np.array(zooms)
new_shape = np.array(zooms)/np.array(new_zooms) * np.array(data.shape[:3])
new_shape = tuple(np.round(new_shape).astype("i8"))
if data.ndim == 3:
data2 = affine_transform(input=data, matrix=R, output_shape=new_shape,
order=order, mode=mode, cval=cval)
if data.ndim == 4:
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: nipy/dipy
Commit Name: 4dc161e3b8ebdd5c62f2dd4fa8a176568a92659d
Time: 2015-10-31
Author: dimrozakis@gmail.com
File Name: dipy/align/reslice.py
Class Name:
Method Name: reslice
Project Name: datascienceinc/Skater
Commit Name: 058c79c9653af78184deb94aa3853f8a37eec32a
Time: 2017-03-02
Author: aikramer2@gmail.com
File Name: pyinterpret/core/global_interpretation/partial_dependence.py
Class Name: PartialDependence
Method Name: partial_dependence
Project Name: keras-team/keras
Commit Name: cfbaec60c77448e6249f912d4b4d4a8c079f2bcf
Time: 2016-07-16
Author: farizrahman4u@gmail.com
File Name: keras/engine/topology.py
Class Name: Merge
Method Name: get_output_shape_for
Project Name: NifTK/NiftyNet
Commit Name: f0916495c649228212cff47d57fc25871d5c89c9
Time: 2017-05-15
Author: wenqi.li@ucl.ac.uk
File Name: layer/input_sampler.py
Class Name: ImageSampler
Method Name: layer_op