Package bar :: Module barImageUnderlays :: Class barSlideBackgorundElement
[hide private]
[frames] | no frames]

Class barSlideBackgorundElement


Extension of the 3dBAR API providing the ability to embed image underlays within an CAF slide. In SVG terms, the image underlays are implemented as image tags contained within dedicated g element represented with barSlideBackgroundList object.


See Also: http://www.w3.org/TR/SVG/struct.html#ImageElement for full description of a SVG image tag.

Nested Classes [hide private]
Instance Methods [hide private]
 
__init__(self, imageLink, position=(0, 0), size=(100, 100), id=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
_getId(self)
 
_setId(self, value)
 
_getImage(self)
 
_setImage(self, value)
 
_getPosition(self)
 
_setPosition(self, value)
 
_getSize(self)
 
_setSize(self, value)
 
_getOpacity(self)
 
_setOpacity(self, value)
 
_getStain(self)
 
_setStain(self, value)
 
_getPreparation(self)
 
_setPreparation(self, value)
 
_getDescription(self)
 
_setDescription(self, value)

Inherited from base.barAtlasSlideElement: affineTransform, getXMLelement

Inherited from base.barObject: __str__, getElementById, writeXMLtoFile

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Methods [hide private]
 
fromXML(cls, svgImageElement)
A stub of method.
Static Methods [hide private]

Inherited from base.barObject (private): _getAttributesDict

Class Variables [hide private]
str _elementName = 'image'
name of the represented XML element
Properties [hide private]
str id
Identifier of the label.
str imageLink
URI of a image.
(float, float) position
Coordinates of a anchor point (the upper-left corner) of a image in SVG coordinates.
(float, float) size
Size of the image in SVG coordinates.
float opacity
Opacity of the image.
str modality
Description of image's modality (Nissl, AChE, T1, etc.).
str preparation
Image preparation description - arbitrary.
str description
An arbitrary comment.

Inherited from object: __class__

Method Details [hide private]

__init__(self, imageLink, position=(0, 0), size=(100, 100), id=None)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • imageLink (str) - URI of image associated with the element.
  • position ((float, float)) - A position of a left upper corner of an image underlay. See barSlideBackgorundElement.position property for details.
  • size ((float, float)) - Size of the given image underlay in SVG coordinates. See barSlideBackgorundElement.size property description for details.
  • id (str) - Identifier of an instance. If not provided, it is assigned automatically
Overrides: object.__init__

fromXML(cls, svgImageElement)
Class Method

 

A stub of method. Raise NotImplementedError.

Parameters:
  • sourceXMLElement - XML representation of the element
Overrides: base.barAtlasSlideElement.fromXML
(inherited documentation)

Property Details [hide private]

id

Identifier of the label. Usually a strange combination of digits and characters.

Get Method:
_getId(self)
Set Method:
_setId(self, value)

imageLink

URI of a image. String value is required. Provided value will be translated into image's element xlink:href attribute.

Get Method:
_getImage(self)
Set Method:
_setImage(self, value)

position

Coordinates of a anchor point (the upper-left corner) of a image in SVG coordinates. Provided values are used to define image's tag x and y attributes.

Get Method:
_getPosition(self)
Set Method:
_setPosition(self, value)

size

Size of the image in SVG coordinates. The tuple is used to generate tag's height and width attributes.

Get Method:
_getSize(self)
Set Method:
_setSize(self, value)

opacity

Opacity of the image. A float value between 0 and 1 is required. Other providing other values will raise an error.

Get Method:
_getOpacity(self)
Set Method:
_setOpacity(self, value)

modality

Description of image's modality (Nissl, AChE, T1, etc.). Put wathever string you want.

Get Method:
_getStain(self)
Set Method:
_setStain(self, value)

preparation

Image preparation description - arbitrary.

Get Method:
_getPreparation(self)
Set Method:
_setPreparation(self, value)

description

An arbitrary comment.

Get Method:
_getDescription(self)
Set Method:
_setDescription(self, value)