next up previous contents index
Next: flst_reconstruct Up: Reference Previous: flst   Contents   Index


$ \bigcirc$Name

flst_pixels Fill the field PIXELS of a tree of shapes. Module meant to be called from another one, not from the command line

$ \bigcirc$Command Synopsis

flst_pixels tree

tree : The tree of the interpolated image

$ \bigcirc$Function Summary

void flst_pixels (pTree )

Shapes pTree ;

$ \bigcirc$Description

This module fills the field pixels of a Shapes structure. Each shape (as defined in the FLST) points to the array of pixels belonging to it. Actually, only one array, whose size is the number of pixels, is allocated and stored in pTree->the_shapes[0].pixels, the other pixels are only pointers to positions in this array. The consequence is that in order to free the allocated memory, the user must use the command free(pTree->the_shapes[0].pixels.

The number of pixels in each shape is stored in its field area.

The complexity of the algorithm is O(N), N being the number of shapes. This is very fast, which explains why the field pixels needs not be stored in the file corresponding to a Shapes structure.

This module plays the same role for the bilinear FLST (see module flst_bilinear). In this case, the field corresponds to the data points inside the shapes, i.e., points where the original image values were given, in contrast to interpolated points.

The computation of the field pixels allows to quickly examine if the shape S contains the shape T. This condition is simply

T->area <= S->area && S->pixels <= T->pixels && T->pixels < S->pixels + S->area,
which is evaluated in constant time. As proper pixels of shape S are placed before pixels of descendants, and as each shape contains at least one proper pixel in the case of FLST (but not necessarily in the case of bilinear FLST), except possibly the root, the condition can also be written
S->pixels < T->pixels && T->pixels < S->pixels + S->area.

Notice the field pixels is orthogonal to the term smallest_shape of Shapes. The former gives for each shape the pixels it contains, whereas the latter gives for each pixel the shapes that contain it. In practice, the computation of pixels relies on the use of smallest_shape.

$ \bigcirc$See Also

flstb_dualchain, flstb_dual, flst_boundary, flstb_quantize, ll_boundaries2.

$ \bigcirc$Version 1.0

Last Modification date : Thu Nov 29 20:23:56 2001

$ \bigcirc$Author

Pascal Monasse

next up previous contents index
Next: flst_reconstruct Up: Reference Previous: flst   Contents   Index
mw 2004-05-05