Changes between Version 17 and Version 18 of barSoftwareGapFillDetails
- Timestamp:
- 08/22/11 18:13:47 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
barSoftwareGapFillDetails
v17 v18 10 10 '''Figure 1''': Examples of gaps in structures contours. 11 11 12 Fragment of rasterized conto r slide based on Paxinos and Franklin ''The Mouse Brain In Stereotaxic Coordinates, third edition''.12 Fragment of rasterized contour slide based on Paxinos and Franklin ''The Mouse Brain In Stereotaxic Coordinates, third edition''. 13 13 14 Leaking structures are handled in 3dBAR by ''gap filling'' algorithm, an extension of the basic tracing procedure.15 The main idea behind this algorithm is to expand the contours by applying [http://en.wikipedia.org/wiki/Dilation_%28morphology%29 dilation filter] filteruntil the boundary closes.14 Leaking structures are handled in 3dBAR by a ''gap filling'' algorithm, an extension of the basic tracing procedure. 15 The main idea behind this algorithm is to expand the contours by applying [http://en.wikipedia.org/wiki/Dilation_%28morphology%29 dilation filter] until the boundary closes. 16 16 17 The algorithm requires single input parameter – `MaxGrowLevel` describing maximal size of the gaps that may be closed during tracing of a particular area. 18 19 First, the initial bitmap is duplicated. Dilation filter is applied to the copy and the result is 17 The algorithm requires a single input parameter – `MaxGrowLevel` - describing the maximum size of the gaps that may be closed during tracing of a particular area, and works as follows: First, the initial bitmap is duplicated. Dilation filter is applied to the copy and the result is 20 18 also cached. This procedure is repeated `MaxGrowLevel` times. Each application of the 21 19 dilation filter causes the boundaries of the structures to grow approximately 1 pixel in diameter. … … 24 22 [[Image(debug_460_461_VO_step_0-anim.gif)]] 25 23 26 '''Figure 2''': Consecutive application of dilation filter to rasterized contour slide.24 '''Figure 2''': Consecutive application of dilation filter to a rasterized contour slide. 27 25 28 26 Structure areas on each cached bitmap are flood-filled and then dilated the same number of times as the boundaries were grown to ensure that the area of the resulting path stays 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). … … 40 38 41 39 42 If the reduction of flooded area at certain stage of filter application is gr ater than defined threshold (15-20% in our implementation), it means that boundary gapmust have been closed (see Figure 4 below). After finding the optimal number of border expansions (denoted by `growlevel`) the corresponding bitmap is passed to [http://potrace.sourceforge.net/ PoTrace].40 If the reduction of flooded area at certain stage of filter application is greater than a defined threshold (15-20% in our implementation), it means that a gap in the boundary must have been closed (see Figure 4 below). After finding the optimal number of border expansions (denoted by `growlevel`) the corresponding bitmap is passed to [http://potrace.sourceforge.net/ PoTrace]. 43 41 44 42 [[Image(debug_460_461_VO_step_0-anim-VO.gif)]] … … 56 54 57 55 58 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.56 The gap filling algorithm is applied individually for each seed label thus different regions may be processed with different values of `growlevel`. Information about which `growlevel` was used to trace a particular path is stored in its attributes. 59 57 60 58 === Preconfiguration === … … 69 67 === Algorithm efficacy and limitations === 70 68 71 T able below summarizes resultof 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''.69 The table below summarizes results 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''. 72 70 73 71 ||= optimal grow level =||= number of paths =|| … … 76 74 || 2 || 10 || 77 75 78 The performance of the algorithm depends on the initial size of the structure and on the bitmap resolution. Intensive use of this algorithm may distort or even erase some (particularly narrow) structures. There is no specific mechanism implemented against such behavio ur. If a very accurate reconstruction is required, the best policy is to carefully prepare contour slides adjusting stroke width and slice resterization resolution so there is no need to apply gap filling.76 The performance of the algorithm depends on the initial size of the structure and on the bitmap resolution. Intensive use of this algorithm may distort or even erase some (particularly narrow) structures. There is no specific mechanism implemented against such behavior. If a very accurate reconstruction is required, the best policy is to carefully prepare contour slides adjusting stroke width and slice resterization resolution so there is no need to apply gap filling. 79 77 80 78 {{{