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

Class barBackgroundImageContourSlide


Extenstion of the regular bar.barTracedSlideIndexer allowing the user to load a number of different image underlays in addition to the annotation layer. This class preserves its patent's ability to trace contours into structures.

Nested Classes [hide private]
Instance Methods [hide private]
 
__init__(self, **kwargs)
Class requires providing following properties in order to work properly:
barTracedSlideRenderer
trace(self, colorMapping)
Perform tracing of the slide according to self._tracingConf.
xml.dom.minidom.Document
getXMLelement(self)
Generate XML DOM representation of the object.

Inherited from base.barPretracedSlide: __delitem__, __getitem__, __setitem__, affineTransform, modifyContours, parseMarkers, values

Inherited from base.barSlideRenderer: renderSlide

Inherited from base.barVectorSlide: Show, addLabel, alignToRefMatrix, deleteLabelByCaption, deleteLabelByID, getCommentLabels, getLabelByName, getRegularLabels, getSpotLabels, renameLabelByCaption, retypeLabelByCaption, srs2svg, svg2srs, updateMetadata

Inherited from base.barObject: __str__, getElementById, writeXMLtoFile

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

    Main functions - they do most of the work
    Auxiliary functions
Class Methods [hide private]
 
_fromXML_BeforeCleanUpHook(cls, slide, svgdom)
Customization hook allowing the developers implementing additional methods or features during parsing of XML document.
 
_fromXML_AfterCleanUpHook(cls, slide, svgdom)
Customization hook allowing the developers implementing additional methods or features during parsing of XML document.

Inherited from base.barPretracedSlide: fromXML

Static Methods [hide private]

Inherited from base.barObject (private): _getAttributesDict

Instance Variables [hide private]

Inherited from base.barPretracedSlideRenderer (private): _tracingConf

Inherited from base.barVectorSlide: slideNumber, slideTemplate

Inherited from base.barVectorSlide (private): _labels, _metadata

Properties [hide private]

Inherited from base.barPretracedSlide: svgDocument

Inherited from base.barSlideRenderer: bitmapSize, size

Inherited from base.barVectorSlide: labelIndex, labels, metadata

Inherited from object: __class__

Method Details [hide private]

__init__(self, **kwargs)
(Constructor)

 

Class requires providing following properties in order to work properly:

  • rendererConfiguration['ReferenceWidth']: (int) width of SVG drawing
  • rendererConfiguration['ReferenceHeight']: (int) height of SVG drawing
  • rendererConfiguration['imageSize'] : ((int, int)) size (width, height) of resulting bitmap image
Parameters:
  • slideTemplate - SVG slide template
  • rendererConfiguration - renderer configuration (see module description for details)
  • tracingConfiguration - tracing configuration (see module description for details)
  • slideNumber - slide number
Overrides: object.__init__
(inherited documentation)

_fromXML_BeforeCleanUpHook(cls, slide, svgdom)
Class Method

 

Customization hook allowing the developers implementing additional methods or features during parsing of XML document. This hook is executed after parsing whole slide, just before cleaning all unnecessary elements and extracting slide template.

Overrides: base.barVectorSlide._fromXML_BeforeCleanUpHook
(inherited documentation)

_fromXML_AfterCleanUpHook(cls, slide, svgdom)
Class Method

 

Customization hook allowing the developers implementing additional methods or features during parsing of XML document. This hook is executed just after removing all unnecessary elements and before assigning slide's template.

Overrides: base.barVectorSlide._fromXML_AfterCleanUpHook
(inherited documentation)

trace(self, colorMapping)

 

Perform tracing of the slide according to self._tracingConf.

Parameters:
  • colorMapping - structure name to hexadecimal color mapping defining unique colour for each structure
Returns: barTracedSlideRenderer
traced slide created by tracing the contour slide
Overrides: base.barPretracedSlideRenderer.trace
(inherited documentation)

getXMLelement(self)

 

Generate XML DOM representation of the object.

Returns: xml.dom.minidom.Document
generated XML DOM representation
Overrides: base.barObject.getXMLelement
(inherited documentation)