| Trees | Indices | Help |
|
|---|
|
|
When called, resamples - according to the size_normalization parameter - an image at the supplied (x,y) sheet coordinates.
(x,y) coordinates outside the image are returned as the background value.
|
|||
|
Inherited from |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
whole_pattern_output_fns = param.HookList(class_= TransferFn, Functions to apply to the whole image before any sampling is done. |
|||
background_value_fn = param.Callable(default= None, doc= Function to compute an appropriate background value. |
|||
size_normalization = param.ObjectSelector(default= 'original',Determines how the pattern is scaled initially, relative to the default retinal dimension of 1.0 in sheet coordinates: |
|||
name = <param.parameterized.String object at 0xb26faac>String identifier for this object. |
|||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
|
|
|
Return pixels from the supplied image at the given Sheet (x,y) coordinates. The image is assumed to be a NumPy array or other object that exports the NumPy buffer interface (i.e. can be converted to a NumPy array by passing it to numpy.array(), e.g. Image.Image). The whole_pattern_output_fns are applied to the image before any sampling is done. To calculate the sample, the image is scaled according to the size_normalization parameter, and any supplied width and height. sheet_xdensity and sheet_ydensity are the xdensity and ydensity of the sheet on which the pattern is to be drawn.
|
|
|||
whole_pattern_output_fnsFunctions to apply to the whole image before any sampling is done.
|
background_value_fnFunction to compute an appropriate background value. Must accept an array and return a scalar.
|
size_normalizationDetermines how the pattern is scaled initially, relative to the default retinal dimension of 1.0 in sheet coordinates: 'stretch_to_fit': scale both dimensions of the pattern so they would fill a Sheet with bounds=BoundingBox(radius=0.5) (disregards the original's aspect ratio). 'fit_shortest': scale the pattern so that its shortest dimension is made to fill the corresponding dimension on a Sheet with bounds=BoundingBox(radius=0.5) (maintains the original's aspect ratio, filling the entire bounding box). 'fit_longest': scale the pattern so that its longest dimension is made to fill the corresponding dimension on a Sheet with bounds=BoundingBox(radius=0.5) (maintains the original's aspect ratio, fitting the image into the bounding box but not necessarily filling it). 'original': no scaling is applied; each pixel of the pattern corresponds to one matrix unit of the Sheet on which the pattern being displayed.
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Thu Aug 5 14:59:41 2010 | http://epydoc.sourceforge.net |