Did I find the right examples for you? yes no

All Samples(12)  |  Call(9)  |  Derive(0)  |  Import(3)

src/n/i/nipy-0.3.0/nipy/algorithms/registration/tests/test_histogram_registration.py   nipy(Download)
from ....core.image.image_spaces import make_xyz_image
from ..affine import Affine
from ..histogram_registration import HistogramRegistration
from .._registration import _joint_histogram
 
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])
    R.similarity = simi
    assert_array_equal(I.get_data(), J.get_data())
    # Instantiate default thing
    R = HistogramRegistration(I, J)
    R.similarity = 'cc'
    null_affine = Affine()

src/n/i/nipy-0.3.0/nipy/algorithms/registration/tests/test_register.py   nipy(Download)
from .... import load_image
from ....testing import anatfile
from ..histogram_registration import HistogramRegistration
 
from numpy.testing import assert_array_almost_equal
                                      ('nmi', 'pv', 'rigid'),
                                     ):
        R = HistogramRegistration(anat_img, anat_img,
                                  similarity=cost,
                                  interp=interp)

src/n/i/nipy-0.3.0/nipy/algorithms/registration/__init__.py   nipy(Download)
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
from .resample import resample
from .histogram_registration import (HistogramRegistration, clamp,
                                    ideal_spacing, interp_methods)