Did I find the right examples for you? yes no

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)

src/n/i/nipy-0.3.0/nipy/algorithms/registration/tests/test_histogram_registration.py   nipy(Download)
    R.subsample(spacing=[2, 1, 3])
    R.similarity = simi
    assert_almost_equal(R.eval(Affine()), val)
 
 
    R.similarity = 'cc'
    null_affine = Affine()
    val = R.eval(null_affine)
    assert_almost_equal(val, 1.0)
    # Try with what should be identity
    R.subsample(spacing=[1, 1, 1])
    assert_array_equal(R._from_data.shape, I.shape)
    val = R.eval(null_affine)
    mask[10:20,10:20,10:20] = True
    R = HistogramRegistration(I, J, to_mask=mask, from_mask=mask)
    sim1 = R.eval(Affine())
    I = make_xyz_image(I.get_data()[mask].reshape(10,10,10), dummy_affine, 'scanner')
    J = make_xyz_image(J.get_data()[mask].reshape(10,10,10), dummy_affine, 'scanner')
    R = HistogramRegistration(I, J)
    sim2 = R.eval(Affine())