Package bar :: Module base :: Class barMarker
[hide private]
[frames] | no frames]

Class barMarker


Class of objects representing markers.

Markers are elements which allows to provide spatial coordinate system via graphical SVG element which can be easily done by various graphics software. Markers are recalculated into metadata elements by barPretracedSlide.parseMarkers.

Nested Classes [hide private]
Instance Methods [hide private]
 
__init__(self, spatialLocation, svgLocation, properties=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
xml.dom.minidom.Node
getXMLelement(self, textNodeCaption='')
Generate XML DOM representation of the object.
(float, float)
_getSpatialLocation(self)
Returns: location (x, y) of the marker in spatial coordinate system
 
_setSpatialLocation(self, SpatialLocationTuple)
Assign the location of the marker in spatial coordinate system.
(float, float)
_getSVGLocation(self)
Returns: location (x, y) of the marker in SVG coordinate system
 
_setSVGLocation(self, SVGLocationTuple)
Assign the location of the marker in SVG coordinate system.
 
__affineTransform(self, M)
Transform the location of the marker in SVG coordinate system.
 
affineTransform(self, M)
An alias for self.__affineTransform(M).

Inherited from barAtlasSlideElement (private): _getTextNodeXMLelement

Inherited from barObject: __str__, getElementById, writeXMLtoFile

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

Class Methods [hide private]
barMarker
fromXML(cls, svgTextElement)
Create marker from its XML representation.
Static Methods [hide private]

Inherited from barObject (private): _getAttributesDict

Class Variables [hide private]
str _elementName = 'text'
name of the represented XML element

Inherited from barAtlasSlideElement (private): _attributes, _attributesNS

Properties [hide private]
(float, float) spatialLocation
The location of the marker in spatial coordinate system.
(float, float) svgLocation
The location of the marker in SVG coordinate system.

Inherited from object: __class__

Method Details [hide private]

__init__(self, spatialLocation, svgLocation, properties=None)
(Constructor)

 

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

Parameters:
  • spatialLocation ((float, float)) - location (x, y) of the marker in spatial coordinate system
  • svgLocation ((float, float)) - location (x, y) of the markers in SVG coordinate system
  • properties ({str : ?}) - SVG attribute name to value mapping appended to the XML representation of the marker (please remember that, in fact, marker is a text element)
Overrides: object.__init__

fromXML(cls, svgTextElement)
Class Method

 

Create marker from its XML representation.

Parameters:
  • svgTextElement (xml.dom.minidom.Node) - source XML element
Returns: barMarker
created object
Overrides: barAtlasSlideElement.fromXML

getXMLelement(self, textNodeCaption='')

 

Generate XML DOM representation of the object.

Parameters:
  • textNodeCaption (str) - caption of the marker
Returns: xml.dom.minidom.Node
generated XML DOM representation
Overrides: barObject.getXMLelement

_getSpatialLocation(self)

 
Returns: (float, float)
location (x, y) of the marker in spatial coordinate system

_setSpatialLocation(self, SpatialLocationTuple)

 

Assign the location of the marker in spatial coordinate system.

Parameters:
  • SpatialLocationTuple ((float, float)) - new location (x, y) of the marker

_getSVGLocation(self)

 
Returns: (float, float)
location (x, y) of the marker in SVG coordinate system

_setSVGLocation(self, SVGLocationTuple)

 

Assign the location of the marker in SVG coordinate system.

Parameters:
  • SVGLocationTuple ((float, float)) - new location (x, y) of the marker

__affineTransform(self, M)

 

Transform the location of the marker in SVG coordinate system.

Parameters:
  • M (numpy 3x3 array) - transformation matrix

affineTransform(self, M)

 

An alias for self.__affineTransform(M).

Parameters:
  • M - transformation matrix
Overrides: barAtlasSlideElement.affineTransform

Property Details [hide private]

spatialLocation

The location of the marker in spatial coordinate system.

Get Method:
_getSpatialLocation(self) - Returns: location (x, y) of the marker in spatial coordinate system
Set Method:
_setSpatialLocation(self, SpatialLocationTuple) - Assign the location of the marker in spatial coordinate system.
Type:
(float, float)

svgLocation

The location of the marker in SVG coordinate system.

Get Method:
_getSVGLocation(self) - Returns: location (x, y) of the marker in SVG coordinate system
Set Method:
_setSVGLocation(self, SVGLocationTuple) - Assign the location of the marker in SVG coordinate system.
Type:
(float, float)