Package topo :: Package plotting :: Module bitmap :: Class Bitmap
[hide private]
[frames] | no frames]

Class Bitmap

source code

                       object --+    
                                |    
param.parameterized.Parameterized --+
                                    |
                                   Bitmap
Known Subclasses:

Wrapper class for the PIL Image class.

The main purpose for this base class is to provide a consistent interface for defining bitmaps constructed in various different ways. The resulting bitmap is a PIL Image object that can be accessed using the normal PIL interface.

If subclasses use the _arrayToImage() function provided, any pixels larger than the maximum that can be displayed will be counted before they are clipped; these are stored in the clipped_pixels attribute.

Nested Classes [hide private]

Inherited from param.parameterized.Parameterized: __metaclass__

Instance Methods [hide private]
 
__init__(self, image)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__copy__(self) source code
 
__getstate__(self)
Return the object's state (as in the superclass), but replace the 'image' attribute's Image with a string representation.
source code
 
__setstate__(self, state)
Load the object's state (as in the superclass), but replace the 'image' string with an actual Image object.
source code
 
show(self)
Renaming of Image.show() for the Bitmap.bitmap attribute.
source code
 
width(self) source code
 
height(self) source code
 
zoom(self, factor)
Return a resized Image object, given the input 'factor' parameter.
source code
 
_arrayToImage(self, inArray)
Generate a 1-channel PIL Image from an array of values from 0 to 1.0.
source code

Inherited from param.parameterized.Parameterized: __repr__, __str__, debug, defaults, force_new_dynamic_value, get_param_values, get_value_generator, inspect_value, message, print_param_values, script_repr, set_dynamic_time_fn, state_pop, state_push, verbose, warning

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

Class Methods [hide private]

Inherited from param.parameterized.Parameterized: params, print_param_defaults

Class Variables [hide private]
  clipped_pixels = 0
int(x[, base]) -> integer

Inherited from param.parameterized.Parameterized: name, print_level

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, image)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

__getstate__(self)

source code 
Return the object's state (as in the superclass), but replace the 'image' attribute's Image with a string representation.
Overrides: param.parameterized.Parameterized.__getstate__

__setstate__(self, state)

source code 
Load the object's state (as in the superclass), but replace the 'image' string with an actual Image object.
Overrides: param.parameterized.Parameterized.__setstate__

zoom(self, factor)

source code 
Return a resized Image object, given the input 'factor' parameter. 1.0 is the same size, 2.0 is doubling the height and width, 0.5 is 1/2 the original size. The original Image is not changed.

_arrayToImage(self, inArray)

source code 

Generate a 1-channel PIL Image from an array of values from 0 to 1.0.

Values larger than 1.0 are clipped, after adding them to the total clipped_pixels. Returns a one-channel (monochrome) Image.


Class Variable Details [hide private]

clipped_pixels

int(x[, base]) -> integer

Convert a string or number to an integer, if possible. A floating point argument will be truncated towards zero (this does not include a string representation of a floating point number!) When converting a string, use the optional base. It is an error to supply a base when converting a non-string. If the argument is outside the integer range a long object will be returned instead.

Value:
0