Classes
contrib/brl/bseg/brip/brip_line_generator.h File Reference

A process for generating a digital line. More...

Go to the source code of this file.

Classes

class  brip_line_generator

Detailed Description

A process for generating a digital line.

Author:
J.L. Mundy
Date:
May 4, 2008
    Modifications ported from TargetJr
   

Incremental generation of a digital line, a series of pixels that lie on a line segment specified by (xs, ys)->(xe, ye). The function returns true when each new pixel is generated. When the line segment is completed the function returns false. The first call to the function should have init = true to signal the start of the generation process.

Usage is as follows: ... vil_image_view<unsigned short> img = resc.get_view();//some resource bool init = true; while (brip_line_generator::generate(init, xs, ys, xe, ye, x, y)) { int xi = (int)x, yi = (int)y; //convert the pixel location to integer unsigned short val = img(xi, yi) //get a pixel value .... }

-------------------------------------------------------------------------

Definition in file brip_line_generator.h.