Package topo :: Package patterns :: Module image :: Class FastPatternSampler
[hide private]
[frames] | no frames]

Class FastPatternSampler

source code

                                  object --+    
                                           |    
base.parameterizedobject.ParameterizedObject --+
                                               |
                                              FastPatternSampler

A fast-n-dirty pattern sampler using Python Imaging Library routines. Currently this sampler doesn't support user-specified scaling or cropping but rather simply scales and crops the image to fit the given matrix size without distorting the aspect ratio of the original picture.

Nested Classes [hide private]

Inherited from base.parameterizedobject.ParameterizedObject: __metaclass__

Instance Methods [hide private]
 
__init__(self, pattern=None, image=None, whole_pattern_output_fn=IdentityOF(name='IdentityOF00033', norm_value=None, print_leve..., background_value_fn=None)
Initialize this ParameterizedObject.
source code
 
__call__(self, x, y, sheet_xdensity, sheet_ydensity, scaling, width=1.0, height=1.0) source code

Inherited from base.parameterizedobject.ParameterizedObject: __getstate__, __repr__, __setstate__, __str__, as_uninitialized, debug, defaults, force_new_dynamic_value, get_param_values, get_value_generator, inspect_value, message, print_param_values, script_repr, verbose, warning

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__

Class Methods [hide private]

Inherited from base.parameterizedobject.ParameterizedObject: params, print_param_defaults

Class Variables [hide private]
  sampling_method = <topo.base.parameterclasses.Integer object a...
Python Imaging Library sampling method for resampling an image.

Inherited from base.parameterizedobject.ParameterizedObject: name, print_level

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, pattern=None, image=None, whole_pattern_output_fn=IdentityOF(name='IdentityOF00033', norm_value=None, print_leve..., background_value_fn=None)
(Constructor)

source code 

Initialize this ParameterizedObject.

The values of parameters can be supplied as keyword arguments to the constructor (using parametername=parametervalue); these values will override the class default values for this one instance.

If no 'name' parameter is supplied, self.name defaults to the object's class name with a unique number appended to it.

Overrides: base.parameterizedobject.ParameterizedObject.__init__
(inherited documentation)

Class Variable Details [hide private]

sampling_method

Python Imaging Library sampling method for resampling an image. Defaults to Image.NEAREST.
Value:
Integer(default= PIL.NEAREST, doc= """
       Python Imaging Library sampling method for resampling an image.
       Defaults to Image.NEAREST.""")