| Trees | Indices | Help |
|
|---|
|
|
Generic 2D image generator.
Generates a pattern from a Python Imaging Library image object. Subclasses should override the _get_image method to produce the image object.
The background value is calculated as an edge average: see edge_average(). Black-bordered images therefore have a black background, and white-bordered images have a white background. Images with no border have a background that is less of a contrast than a white or black one.
At present, rotation, size_normalization, etc. just resample; it would be nice to support some interpolation options as well.
|
|||
|
Inherited from |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
__abstract = Truebool(x) -> bool |
|||
aspect_ratio = param.Number(default= 1.0, bounds= (0.0, None),Ratio of width to height; size*aspect_ratio gives the width. |
|||
size = param.Number(default= 1.0, bounds= (0.0, None), softbouHeight of the image. |
|||
pattern_sampler = param.ClassSelector(class_= ImageSampler, deThe PatternSampler to use to resample/resize the image. |
|||
cache_image = param.Boolean(default= True, doc= If False, discards the image and pattern_sampler after drawing the pattern each time, to make it possible to use very large databases of images without running out of memory. |
|||
name = <param.parameterized.String object at 0xb589dac>String identifier for this object. |
|||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
Function to draw a pattern that will then be scaled and rotated. Instead of implementing __call__ directly, PatternGenerator subclasses will typically implement this helper function used by __call__, because that way they can let __call__ handle the scaling and rotation for them. Alternatively, __call__ itself can be reimplemented entirely by a subclass (e.g. if it does not need to do any scaling or rotation), in which case this function will be ignored.
|
|
|
|
|||
__abstractbool(x) -> bool Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.
|
aspect_ratioRatio of width to height; size*aspect_ratio gives the width.
|
sizeHeight of the image.
|
pattern_samplerThe PatternSampler to use to resample/resize the image.
|
cache_imageIf False, discards the image and pattern_sampler after drawing the pattern each time, to make it possible to use very large databases of images without running out of memory.
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Thu Aug 5 14:59:41 2010 | http://epydoc.sourceforge.net |