Changes between Version 8 and Version 9 of barSoftwareGapFillDetails
- Timestamp:
- 07/25/11 14:49:52 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
barSoftwareGapFillDetails
v8 v9 12 12 Leaking structures are handled in 3dBAR by gap filling algorithm, an extension of the basic tracing procedure. The algorithm requires single input parameter – `MaxGrowLevel` describing maximal size of the gaps that will be closed during tracing of a particular area. The algorithm creates multiple (`n=MaxGrowLevel`) copies of initial input bitmap, each with the contours expanded using the [http://en.wikipedia.org/wiki/Dilation_%28morphology%29 dilation filter] approximately by one pixel. 13 13 14 15 14 [[Image(debug_460_461_VO_step_0-anim.gif)]] 16 15 17 Sizes of consecutive flood-filled areas are compared the resulting region is dilated the same number of times as the boundaries were grown to make the area of the resulting path unbiased. If the number of flooded pixels lowers proportionally to boundary length or remains stable across different levels of gap filling it means that most probably the boundaries of the structure in question do not have any gaps: 16 Consecutive flood-filled areas are dilated the same number of times as the boundaries were grown to make the area of the resulting path unbiased. If it remains stable or slightly lowers (less than 2% in our implementation) at consecutive stages of the algorithm it means that most probably the boundaries of the structure in question do not have any gaps (see Fig. 3). 18 17 19 18 [[Image(debug_460_461_VO_step_0-anim-AOP.gif)]] 20 19 21 Structure without gaps has no significant changes of its area. 22 20 '''Figure 3''': Structure without gaps does not express significant changes of its area across different stages of algorithm (see table below). 23 21 ||= growlevel =||= area of the structure in pixels =|| 24 22 || 0 || 51124 || … … 29 27 || 5 || 51112 || 30 28 29 31 30 [[Image(debug_460_461_VO_step_0-anim-VO.gif)]] 32 31 33 Structure with gaps in its contours has significant changes of its area. 32 '''Figure 4''': Structure with gap(s) in it's contour expresses significant changes of its area. 33 We can see sudden drop of the number of pixels at certain stage (here at `growlevel=2`) of the algorithm application when the gap is closed (see table below). 34 34 35 35 ||= growlevel =||= area of the structure in pixels =|| 36 36 || 0 || 196243 || 37 37 || 1 || '''196232''' || 38 || 2|| '''84384''' ||38 || '''2''' || '''84384''' || 39 39 || 3 || 84331 || 40 40 || 4 || 84331 || 41 41 || 5 || 84309 || 42 42 43 44 If the reduction of flooded area is grated then expected at certain stage of filter application, it means that boundary gap must have been closed. After finding the optimal number of border expansions (denoted by `growlevel`) and the bitmap is passed to [http://potrace.sourceforge.net/ PoTrace]. 43 If the reduction of flooded area at certain stage of filter application is grated than defined threshold (2% in our implementation), it means that boundary gap must have been closed. After finding the optimal number of border expansions (denoted by `growlevel`) and the bitmap is passed to [http://potrace.sourceforge.net/ PoTrace]. 45 44 46 45 The gap filling algorithm is applied individually for each seed label thus different regions may be processed with different value of `GrowLevel`. Information about which `GrowLevel` was used to trace a particular path is stored in its attributes. 47 46 47 Exemplary result of the gap filling algorithm applied to 47 paths from 13th coronal section (2.1mm ant. from bregma) from Paxinos and Franklin ''The Mouse Brain In Stereotaxic Coordinates, third edition''. 48 48 49 Chart showing results of gap filling algorithm used for tracing all 47 paths from the slide. 50 51 ||= number of paths =||= optimal grow level =|| 52 || 28 || 0 || 53 || 9 || 1 || 54 || 10 || 2 || 55 49 ||= optimal grow level =||= number of paths =|| 50 || 0 || 28 || 51 || 1 || 9 || 52 || 2 || 10 || 56 53 57 54 ==== Preconfiguration ====