Home | Trees | Indices | Help |
---|
|
The module provides classes necessary to handle basic CAF slide manipulations.
Import Graph |
Note: BAR_TRACER_DEFAULT_SETTINGS requires providing following elements:
DumpEachStepSVG
, DumpEachStepPNG
:
(bool
) determines if every step of tracing process
will be saved as PNG or SVG file (tracing results)
DumpWrongSeed
: (bool
) determines if
snapshot with incorectly placed labels will be saved as PNG
files
DumpVBrain
: (bool
) determines,if
consecutive steps of generating whole brain outline will be
stored
DumpDirectory
: (str
) defines
directory where all snapshots are stored
DetectUnlabelled
: (bool
) defines if
unlabelled areas are detected
CacheLevel
: (int
)
MaxGrowLevel
MinFiterTimesApplication
: (int
)
defines intensity of Min filter used for generating consecutive
images in cache
GrowDefaultBoundaryColor
: (int
)
boundary color
RegionAlreadyTraced
: (int
) colour of
areas denoted as traced
PoTraceConf
: (str : ...
) traced
properties, see CONF_DEFAULT_POTRACE_PROPERTIES for details
NewPathIdTemplate
: (str
) template of
path id (eg. 'structure%d_%s_%s'
)
BestFillAlgorithm
: (function
)
reference for function for defining best gap filling level.
This setting may be used to provide custom
'selectBestGapFillingLevel' function
|
|||
barObject Parental class for BAR elements. |
|||
barAtlasSlideElement General class describing all elements that are part of slide. |
|||
barStructureLabel Parental class for all classes representing slide labels. |
|||
barRegularLabel Regular label is used to indicate area corresponding to ordinary brain structure. |
|||
barSpotLabel Spot label is used to indicate point (spot). |
|||
barCommentLabel Comment labels are not related to brain structures. |
|||
barMetadataElement Basic class representing metadata objects. |
|||
barBregmaMetadataElement Class of objects representing bregma metadata elements. |
|||
barTransfMatrixMetadataElement Class of objects representing stereotectical coordinates transformation matrix. |
|||
barMarker Class of objects representing markers. |
|||
barCoordinateMarker Class of objects representing marker of slide position in coronal plane. |
|||
barCoronalMarker Class of objects representing marker of anterior-posterior slide position. |
|||
barPath Class of objects describing enclosed path denoting particular area in the slice. |
|||
barGenericStructure Class of containers of paths related to one structure. |
|||
barBoundingBox Bounding box is a clever class that stores bounding box and implements simple operations that may be performed on bounding boxes such as extracting bounding box from SVG path definition, merging, printing etc. |
|||
barVectorSlide An abstract class representing all types of vector slides - slides that are based on SVG drawings. |
|||
barSlideRenderer Class holding all operation related to rasterizing SVG slides. |
|||
barPretracedSlide Class of objects representing countur slides. |
|||
barTracedSlide Class of objects representing CAF slides. |
|||
barTracedSlideRenderer barTracedSlide class extension with method necessary to render CAF slide. |
|||
barPretracedSlideRenderer Class which converts contour slides into CAF slides. |
|||
barCafSlide barTracedSlide class extension with method necessary to render CAF slide. |
|||
barContourSlide Class which converts contour slides into CAF slides. |
|
|||
{str : str, ...} |
|
||
|
|||
|
|||
(_clsTransfMatrixMetadataElement , _clsBregmaMetadataElement )
|
|
||
str or bool |
|
||
xml.dom.minidom.Document |
|
||
str |
|
||
[?, ...] |
|
||
|
|||
|
|||
Default widht and height of the slide renderer class | |||
---|---|---|---|
|
|
|||
BAR_XML_NAMESPACE =
|
|||
BAR_XML_NAMESPACE_PREFIX =
|
|||
BAR_DEFAULT_GROWLEVEL = 0
|
|||
BAR_COORDINATE_MARKER_TEMPLATE =
|
|||
BAR_CORONAL_MARKER_TEMPLATE =
|
|||
BAR_REGULAR_LABEL_PREFIX =
|
|||
BAR_COMMENT_LABEL_PREFIX =
|
|||
BAR_SPOT_LABEL_PREFIX =
|
|||
BAR_LABEL_MAX_LENGTH = 200
|
|||
BAR_REGULAR_LABEL_COLOUR =
|
|||
BAR_COMMENT_LABEL_COLOUR =
|
|||
BAR_SPOT_LABEL_COLOUR =
|
|||
BAR_BREGMA_METADATA_TAGNAME =
|
|||
BAR_TRAMAT_METADATA_TAGNAME =
|
|||
BAR_DATA_LOCATION_ELEMENT =
|
|||
BAR_XML_ENCODING =
|
|||
CONF_DEFAULT_CONTOUR_WIDTH =
|
|||
CONF_DEFAULT_CONTOUR_COLOUR =
|
|||
CONF_DEFAULT_VBRAIN_LABEL_LOC =
|
|||
CONF_DEFAULT_PATH_ATTRIBUTES =
|
|||
CONF_DEFAULT_PATH_ATTRIBUTES_NS =
|
|||
DEFAULT_TEXT_ELEMENTS_ATTRIBUTES =
|
|||
CONF_DEFAULT_TEXT_ATTRIBUTES_NS =
|
|||
DEFAULT_MARKER_ATTRIBUTES =
|
|||
CONF_ALOWED_STRUCTURE_CHARACTERS = re.compile(r'
|
|||
__package__ =
|
|||
Default widht and height of the slide renderer class | |||
---|---|---|---|
CONF_DEFAULT_RENDER_WIDTH = 1200
|
|||
CONF_DEFAULT_RENDER_HEIGHT = 900
|
|||
CONF_SLIDE_TEMPLATE =
|
|||
CONF_DEFAULT_SLIDE_TEMPLATE =
|
|||
{str : ... } |
CONF_DEFAULT_RENDERING_PROPS =
default settings for rasterizing SVG slides used by barSlideRenderer; CONF_DEFAULT_RENDERING_PROPS['ReferenceWidth'] and
CONF_DEFAULT_RENDERING_PROPS['ReferenceHeight'] are
dimensions of the slide in 1:1 scale (in pixels) while
CONF_DEFAULT_RENDERING_PROPS['imageSize'] is a tuple (w,
h) holding size of the rasterized slide.
|
||
Potrace tracing directives | |||
str |
CONF_POTRACE_ACCURACY_PARAMETER =
accurary of potrace tracing; consult potrace manual for details |
||
str |
CONF_POTRACE_HEIGHT_STRING =
reference image height for potrace |
||
str |
CONF_POTRACE_WIDTH_STRING =
reference image width for potrace |
||
str |
CONF_POTRACE_SVG_RESOLUTION_STRING =
reference resolution for potrace (eg. |
||
CONF_DEFAULT_POTRACE_PROPERTIES =
|
|||
Tracing properties | |||
{str : ... } |
BAR_TRACER_DEFAULT_SETTINGS =
all settings used by barPretracedSlideRenderer to perform conversion from contour slide to CAF slide; requires providing following elements: |
||
GrowLevel settings | |||
CONF_GAPFILLING_MAXLEVEL = 5
|
|
|
Print given string to stderr using red color.
|
Print debug message to stderr. Error messages are printed in red colour. If the message is not an error message it is printed only if
|
Calculate stereotectical coordinates transformation matrix and anterior-posterior coordinate of slide from given markers.
|
Note: Name is validated only when debug mode is not disabled. It means that reconstruction modules can have disabled __debug__ mode while parsers should always run WITHOUT python -OO switch. |
Create SVG document (with fixed paths) from provided PoTrace output.
|
Strip filename from prohibited characters. Prohibited characters are replaced by underscore characted.
|
Create a flat sequence containing all elements retrieved from the sequence recursively contained sub-sequences (iterables). Examples: >>> [1, 2, [3,4], (5,6)] [1, 2, [3, 4], (5, 6)] >>> flatten([[[1,2,3], (42,None)], [4,5], [6], 7, MyVector(8,9,10)]) [1, 2, 3, 42, None, 4, 5, 6, 7, 8, 9, 10]
|
Remove unnecessary white spaces from given XML element.
|
|
CONF_DEFAULT_PATH_ATTRIBUTES
|
DEFAULT_TEXT_ELEMENTS_ATTRIBUTES
|
DEFAULT_MARKER_ATTRIBUTES
|
CONF_ALOWED_STRUCTURE_CHARACTERS
|
CONF_SLIDE_TEMPLATE
|
CONF_DEFAULT_SLIDE_TEMPLATE
|
CONF_DEFAULT_RENDERING_PROPSdefault settings for rasterizing SVG slides used by barSlideRenderer;CONF_DEFAULT_RENDERING_PROPS['ReferenceWidth'] and
CONF_DEFAULT_RENDERING_PROPS['ReferenceHeight'] are
dimensions of the slide in 1:1 scale (in pixels) while
CONF_DEFAULT_RENDERING_PROPS['imageSize'] is a tuple (w, h)
holding size of the rasterized slide. Usually
CONF_DEFAULT_RENDERING_PROPS['imageSize'] is few times
larger than CONF_DEFAULT_RENDERING_PROPS['ReferenceHeight']
and CONF_DEFAULT_RENDERING_PROPS['ReferenceWidth'] allowing
to more precise tracing and automatic label generation
|
CONF_POTRACE_SVG_RESOLUTION_STRINGreference resolution for potrace (eg.'300x300' ); provides
resolution in dpi; final image will be scaled using this reference
resolution so setting it porperly is very important; consult potrace
manual for details
|
CONF_DEFAULT_POTRACE_PROPERTIES
|
BAR_TRACER_DEFAULT_SETTINGSall settings used by barPretracedSlideRenderer to perform conversion from contour slide to CAF slide; requires providing following elements:
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Wed Mar 20 14:31:32 2013 | http://epydoc.sourceforge.net |