Class which converts contour slides into CAF slides.
barTracedSlideRenderer
|
trace(self,
colorMapping)
Perform tracing of the slide according to self._tracingConf . |
|
|
Inherited from barPretracedSlide :
__delitem__ ,
__getitem__ ,
__init__ ,
__setitem__ ,
affineTransform ,
getXMLelement ,
modifyContours ,
parseMarkers ,
values
Inherited from barSlideRenderer :
renderSlide
Inherited from barVectorSlide :
Show ,
addLabel ,
alignToRefMatrix ,
deleteLabelByCaption ,
deleteLabelByID ,
getCommentLabels ,
getLabelByName ,
getRegularLabels ,
getSpotLabels ,
renameLabelByCaption ,
retypeLabelByCaption ,
srs2svg ,
svg2srs ,
updateMetadata
Inherited from barObject :
__str__ ,
getElementById ,
writeXMLtoFile
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|
|
__loadImage(self)
Render provided contour slide with given resolution and put rendered
image as a first element of self.__imageCache . |
|
|
int
|
__setContourColor(self,
pixelColorValue)
Apply treshold function for given pixel value. |
|
|
|
|
[barPath, ...]
|
|
[barRegularLabel, ...]
|
__getMissplacedLabels(self)
Dectect labels that cannot be traced as they are missplaced: placed
over the contours or outside the brain area. |
|
|
[barPath, ...]
|
|
([barPath,
...], [barRegularLabel, ...])
|
__getUnlabeled(self)
Create list of paths and corresponding labels by tracing areas that
were not labeled in pretraced files (unlabeled areas). |
|
|
|
|
[barPath, ...]
|
__processSingleLabel(self,
seedLabel)
Extract a path defined by coordinates of the given seed label. |
|
|
[barPath, ...]
|
__bitmapToPaths(self,
sourceImage,
seedLabel,
invert=False)
Perform all operation releted with tracing bitmap into list of paths: |
|
|
barPath
|
_getPath(self,
pathElem,
seedLabel)
Create barPath
from provided SVG path element (result of tracing) and seed label. |
|
|
str
|
_getNewPathID(self,
seedLabel)
Generate proper path identifier of the path related to the seed
label. |
|
|
|
|
(PIL.Image.Image, int) or PIL.Image.Image
|
__applyFill(self,
sourceImage,
seedLabel,
retNPIX=False)
Apply flood fill to given image using coordinates passed in the seed
label. |
|
|
bool
|
__isAllowedForFilling(self,
im,
seedLabel)
Determine if bitmap with given seed label is suitable for tracing. |
|
|
(int, int)
|
|
bool
|
|
bool
|
__isOverContour(self,
im,
seedLabel)
Determine if label is not placed over boundary. |
|
|
|
|
|
_saveSVG(self,
svgdom,
filename)
Save provided SVG. |
|
|
([PIL.Image.Image, ...], [int, ...])
|
|
|
__dumpWrongSeed(self,
im,
seedLabel)
Output warning message to stderr and dump invalid image into a file. |
|
|
PIL.Image.Image
|
__brainOutline
whole brain outline; image is generated in moment of provedding
vBrain labels; during tracing consecutive areas are substracted from
brain outline; remaining white areas are considered as ublabelled
areas
|
[PIL.Image.Image, ...]
|
__imageCache
images representing slide; consecutive elements have thicker contours
due to gap filling algorithm
|
{str : barStructureLabel, ...}
|
__labelCache
temporary cache holding labels from contour slide; removed after
tracing
|
[barStructureLabel, ...]
|
__labelsLeft
labels undergoing tracing procedure; removed after tracing
|
[barStructureLabel, ...]
|
__vBrainLabels
subset of __labelCache holding
'vBrain' labels processed in different way than other
labels
|
{str : ?, ...}
|
_tracingConf
tracing configuration (see module description for details)
|
Inherited from barVectorSlide :
slideNumber ,
slideTemplate
|