def test_load_bg_img(): # Generate simple simulated data with non-diagonal affine affine = np.eye(4) affine[0, 0] = -1 affine[0, 1] = 0.1 img, data = _simulate_img(affine) # use empty bg_img bg_img, bg_min, bg_max, black_bg = html_stat_map._load_bg_img(img, bg_img=None) # Check positive isotropic, near-diagonal affine _check_affine(bg_img.affine) # Try to load the default background bg_img, bg_min, bg_max, black_bg = html_stat_map._load_bg_img(img) # Check positive isotropic, near-diagonal affine _check_affine(bg_img.affine)
def test_load_bg_img(): # Generate simple simulated data with non-diagonal affine affine = np.eye(4) affine[0, 0] = -1 affine[0, 1] = 0.1 img, data = _simulate_img(affine) # use empty bg_img bg_img, bg_min, bg_max, black_bg = html_stat_map._load_bg_img(img, bg_img=None) # Check positive isotropic, near-diagonal affine _check_affine(bg_img.affine) # Try to load the default background bg_img, bg_min, bg_max, black_bg = html_stat_map._load_bg_img(img) # Check positive isotropic, near-diagonal affine _check_affine(bg_img.affine)