Did I find the right examples for you? yes no

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

src/n/i/nipy-0.3.0/nipy/algorithms/registration/tests/test_histogram_registration.py   nipy(Download)
def _test_clamping(I, thI=0.0, clI=256, mask=None):
    R = HistogramRegistration(I, I, from_bins=clI, from_mask=mask, to_mask=mask)
    R.subsample(spacing=[1, 1, 1])
    Ic = R._from_data
    Ic2 = R._to_data[1:-1, 1:-1, 1:-1]
def _test_similarity_measure(simi, val):
    I = make_xyz_image(make_data_int16(), dummy_affine, 'scanner')
    J = make_xyz_image(I.get_data().copy(), dummy_affine, 'scanner')
    R = HistogramRegistration(I, J)
    R.subsample(spacing=[2, 1, 3])
    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)

src/n/i/nipy-0.3.0/nipy/algorithms/registration/tests/test_register.py   nipy(Download)
                                  similarity=cost,
                                  interp=interp)
        R.subsample([2,2,2])
        affine = R.optimize(affine_type)
        yield assert_array_almost_equal, affine.as_affine(), np.eye(4), 2