Did I find the right examples for you? yes no

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

src/n/i/nipy-0.3.0/nipy/algorithms/registration/resample.py   nipy(Download)
from scipy.ndimage import affine_transform, map_coordinates
 
from ...core.image.image_spaces import (make_xyz_image,
                                        as_xyz_image,
                                        xyz_affine)
    """
    # Function assumes xyz_affine for inputs
    moving = as_xyz_image(moving)
    mov_aff = xyz_affine(moving)
    if reference == None:
    else:
        # Expecting image. Must be an image that can make an xyz_affine
        reference = as_xyz_image(reference)
        ref_shape = reference.shape
        ref_aff = xyz_affine(reference)

src/n/i/nipy-0.3.0/nipy/algorithms/registration/tests/test_resample.py   nipy(Download)
import numpy as np
 
from ....core.image.image_spaces import (as_xyz_image,
                                         xyz_affine)
from ....core.api import Image, vox2mni
        img2 = resample(img, T, interp_order=i)
        assert_array_almost_equal(img2.get_data(), img.get_data())
        img_aff = as_xyz_image(img)
        img2 = resample(img, T, reference=(img_aff.shape, xyz_affine(img_aff)),
                        interp_order=i)

src/n/i/nipy-0.3.0/nipy/algorithms/registration/histogram_registration.py   nipy(Download)
import numpy as np
 
from ...core.image.image_spaces import (make_xyz_image,
                                        as_xyz_image,
                                        xyz_affine)
        """
        # Function assumes xyx_affine for inputs
        from_img = as_xyz_image(from_img)
        to_img = as_xyz_image(to_img)
 

src/n/i/nipy-0.3.0/nipy/io/nifti_ref.py   nipy(Download)
from ..core.reference import spaces as ncrs
from ..core.image.image import Image
from ..core.image.image_spaces import as_xyz_image
 
 
            known_names[c] = c
    try:
        img = as_xyz_image(img, known_names)
    except (ncrs.AxesError, ncrs.AffineError):
        # Python 2.5 / 3 compatibility

src/n/i/nipy-0.3.0/nipy/algorithms/registration/groupwise_registration.py   nipy(Download)
from ...fixes.nibabel import io_orientation
 
from ...core.image.image_spaces import (make_xyz_image,
                                        xyz_affine,
                                        as_xyz_image)
        self.affine_class = affine_class
        for im in images:
            xyz_img = as_xyz_image(im)
            self._runs.append(Image4d(xyz_img.get_data,
                                      xyz_affine(xyz_img),