Did I find the right examples for you? yes no

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/m/e/MedPy-0.1.0/medpy/itkvtk/utilities/itku.py   MedPy(Download)
 
# own modules
from ...core.exceptions import DependencyError, ImageTypeError
 
# information
    # chek for unknown array data type
    if not arr.dtype.type in scipy_to_itk_types:
        raise ImageTypeError('The array dtype {} could not be mapped to any itk image type.'.format(arr.dtype))
 
    # check if any valid conversion exists
    if 0 == len(scipy_to_itk_types[arr.dtype.type]):
        raise ImageTypeError('No valid itk type for the pixel data dtype {}.'.format(arr.dtype))