1adf6bb44e1897757464394bcf7502de30278b16,nilearn/_utils/niimg_conversions.py,,_iter_check_niimg,#Any#Any#Any#Any#Any#Any#Any#,38
Before Change
atleast_4d=atleast_4d)
if affine is None:
affine = niimg.get_affine()
shape = niimg.shape[:3]
ndim = len(niimg.shape) + 1
if (auto_resample == True) and (not np.array_equal(
niimg.get_affine(), affine) or niimg.shape[:3] != shape):
// if not auto_resample:
// raise ValueError("Affine of image is different"
// " from reference affine"
// "\nReference affine:\n%r\n"
// "Wrong affine:\n%r"
// % (affine,
// niimg.get_affine()))
if verbose > 0:
print("...resampled to first nifti!")
from nilearn import image // we avoid a circular import
niimg = cache(image.resample_img, memory, func_memory_level=2,memory_level=memory_level)(niimg,target_affine=affine,target_shape=shape)
if not _check_fov(niimg, affine, shape):
raise ValueError(
"Field of view of image //%d is different from reference "
"FOV.\n"
After Change
if not _check_fov(niimg, ref_fov[0], ref_fov[1]):
if target_fov is not None:
from nilearn import image // we avoid a circular import
niimg = cache(image.resample_img,
memory,
func_memory_level=2,
memory_level=memory_level)(
niimg,
target_affine=ref_fov[0],
target_shape=ref_fov[1])
else:
raise ValueError(
"Field of view of image //%d is different from "
"reference FOV.\n"
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: nilearn/nilearn
Commit Name: 1adf6bb44e1897757464394bcf7502de30278b16
Time: 2015-04-20
Author: abraham.alexandre@gmail.com
File Name: nilearn/_utils/niimg_conversions.py
Class Name:
Method Name: _iter_check_niimg
Project Name: nilearn/nilearn
Commit Name: 9d82ee8b60076af02169fba6d2fa7ed61e8d47c4
Time: 2013-06-10
Author: abraham.alexandre@gmail.com
File Name: nisl/utils.py
Class Name: CacheMixin
Method Name: _cache
Project Name: Pinafore/qb
Commit Name: 2f74f04253d5a90459401d0f09ea0559d50371a0
Time: 2016-06-25
Author: ski.rodriguez@gmail.com
File Name: util/guess.py
Class Name: GuessList
Method Name: check_recall