Did I find the right examples for you? yes no

All Samples(10)  |  Call(8)  |  Derive(0)  |  Import(2)

src/m/e/MedPy-0.1.0/medpy/graphcut/wrapper.py   MedPy(Download)
from energy_label import boundary_stawiaski
from generate import graph_from_labels
from ..core.exceptions import ArgumentError
from ..core.logger import Logger
from medpy.filter.label import relabel, relabel_map
 
    # ensure correctness of supplied images
    if not (img_region.shape == img_gradient.shape == img_fg.shape == img_bg.shape): raise ArgumentError('All supplied images must be of the same shape.')    
 
    # check and eventually enhance input parameters
    if minimal_edge_length < 10: raise ArgumentError('A minimal edge length smaller than 10 is not supported.')
    if overlap < 0: raise ArgumentError('A negative overlap is not supported.')
    if overlap >= minimal_edge_length: raise ArgumentError('The overlap is not allowed to exceed the minimal edge length.')

src/m/e/MedPy-0.1.0/medpy/filter/label.py   MedPy(Download)
 
# own modules
from ..core.exceptions import ArgumentError
 
# code
    def _map(x):
        try:
            return key(mapping, x)
        except Exception as e:
            raise ArgumentError('No conversion for region id {} found in the supplied mapping. Error: {}'.format(x, e))
    @rtype numpy.ndarray
    """
    if start <= 0: raise ArgumentError('The starting value can not be 0 or lower.')
 
    l = list(scipy.unique(label_image))