Public Member Functions | Protected Member Functions | Protected Attributes | Friends
vdgl_edgel_chain Class Reference

#include <vdgl_edgel_chain.h>

Inheritance diagram for vdgl_edgel_chain:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 vdgl_edgel_chain ()
 vdgl_edgel_chain (vcl_vector< vdgl_edgel > const &edgels)
 vdgl_edgel_chain (const double x0, const double y0, const double x1, const double y1)
 make a straight edgel chain from p0 to p1.
 vdgl_edgel_chain (vdgl_edgel_chain const &x)
 ~vdgl_edgel_chain ()
bool add_edgel (const vdgl_edgel &e)
bool add_edgels (const vcl_vector< vdgl_edgel > &es, const int index)
bool set_edgel (const int index, const vdgl_edgel &e)
vdgl_edgel_chain_sptr extract_subchain (int start, int end)
 return a new edgel_chain, containing the edgels numbered start up to end.
bool split (double x, double y, vdgl_edgel_chain_sptr &ec1, vdgl_edgel_chain_sptr &ec2)
 split the current edgel_chain at or around the given point (x,y).
unsigned int size () const
vdgl_edgeledgel (int i)
vdgl_edgel const & edgel (int i) const
vdgl_edgeloperator[] (int i)
vdgl_edgel const & operator[] (int i) const
void notify_change ()
 should call this if one of the edgels is likely to have changed.
void b_write (vsl_b_ostream &os) const
 Binary save self to stream.
void b_read (vsl_b_istream &is)
 Binary load self from stream.
short version () const
 Return IO version number;.
void print_summary (vcl_ostream &os) const
 Print an ascii summary to the stream.
virtual vcl_string is_a () const
 Return a platform independent string identifying the class.
virtual bool is_class (vcl_string const &cls) const
 Return true if the argument matches the string identifying the class or any parent class.
void touch ()
unsigned long get_time_stamp () const
bool older (vul_timestamp const &t) const
bool older (vul_timestamp const *t) const
void ref ()
void unref ()
int get_references () const
bool is_referenced () const

Protected Member Functions

bool line_gen (double xs, double ys, double xe, double ye, bool &init, bool &done, double &x, double &y)
 Advance along a line and generate contiguous pixels on the line.

Protected Attributes

vcl_vector< vdgl_edgeles_
unsigned long timestamp_

Friends

vcl_ostream & operator<< (vcl_ostream &s, const vdgl_edgel_chain &p)
 Stream operator.
bool operator== (const vdgl_edgel_chain &ec1, const vdgl_edgel_chain &ec2)
bool operator!= (const vdgl_edgel_chain &ec1, const vdgl_edgel_chain &ec2)

Detailed Description

Definition at line 27 of file vdgl_edgel_chain.h.


Constructor & Destructor Documentation

vdgl_edgel_chain::vdgl_edgel_chain ( ) [inline]

Definition at line 34 of file vdgl_edgel_chain.h.

vdgl_edgel_chain::vdgl_edgel_chain ( vcl_vector< vdgl_edgel > const &  edgels) [inline]

Definition at line 35 of file vdgl_edgel_chain.h.

vdgl_edgel_chain::vdgl_edgel_chain ( const double  x0,
const double  y0,
const double  x1,
const double  y1 
)

make a straight edgel chain from p0 to p1.

Useful for boundary filling and debugging

Definition at line 15 of file vdgl_edgel_chain.cxx.

vdgl_edgel_chain::vdgl_edgel_chain ( vdgl_edgel_chain const &  x) [inline]

Definition at line 41 of file vdgl_edgel_chain.h.

vdgl_edgel_chain::~vdgl_edgel_chain ( ) [inline]

Definition at line 43 of file vdgl_edgel_chain.h.


Member Function Documentation

bool vdgl_edgel_chain::add_edgel ( const vdgl_edgel e)

Definition at line 24 of file vdgl_edgel_chain.cxx.

bool vdgl_edgel_chain::add_edgels ( const vcl_vector< vdgl_edgel > &  es,
const int  index 
)

Definition at line 51 of file vdgl_edgel_chain.cxx.

void vdgl_edgel_chain::b_read ( vsl_b_istream is)

Binary load self from stream.

Binary load self from stream (not typically used).

Definition at line 221 of file vdgl_edgel_chain.cxx.

void vdgl_edgel_chain::b_write ( vsl_b_ostream os) const

Binary save self to stream.

Definition at line 208 of file vdgl_edgel_chain.cxx.

vdgl_edgel& vdgl_edgel_chain::edgel ( int  i) [inline]

Definition at line 62 of file vdgl_edgel_chain.h.

vdgl_edgel const& vdgl_edgel_chain::edgel ( int  i) const [inline]

Definition at line 63 of file vdgl_edgel_chain.h.

vdgl_edgel_chain_sptr vdgl_edgel_chain::extract_subchain ( int  start,
int  end 
)

return a new edgel_chain, containing the edgels numbered start up to end.

Definition at line 96 of file vdgl_edgel_chain.cxx.

virtual vcl_string vdgl_edgel_chain::is_a ( ) const [inline, virtual]

Return a platform independent string identifying the class.

Definition at line 85 of file vdgl_edgel_chain.h.

virtual bool vdgl_edgel_chain::is_class ( vcl_string const &  cls) const [inline, virtual]

Return true if the argument matches the string identifying the class or any parent class.

Definition at line 88 of file vdgl_edgel_chain.h.

bool vdgl_edgel_chain::line_gen ( double  xs,
double  ys,
double  xe,
double  ye,
bool &  init,
bool &  done,
double &  x,
double &  y 
) [protected]

Advance along a line and generate contiguous pixels on the line.

Definition at line 133 of file vdgl_edgel_chain.cxx.

void vdgl_edgel_chain::notify_change ( )

should call this if one of the edgels is likely to have changed.

Definition at line 45 of file vdgl_edgel_chain.cxx.

vdgl_edgel& vdgl_edgel_chain::operator[] ( int  i) [inline]

Definition at line 64 of file vdgl_edgel_chain.h.

vdgl_edgel const& vdgl_edgel_chain::operator[] ( int  i) const [inline]

Definition at line 65 of file vdgl_edgel_chain.h.

void vdgl_edgel_chain::print_summary ( vcl_ostream &  os) const

Print an ascii summary to the stream.

Definition at line 256 of file vdgl_edgel_chain.cxx.

bool vdgl_edgel_chain::set_edgel ( const int  index,
const vdgl_edgel e 
)

Definition at line 34 of file vdgl_edgel_chain.cxx.

unsigned int vdgl_edgel_chain::size ( void  ) const [inline]

Definition at line 61 of file vdgl_edgel_chain.h.

bool vdgl_edgel_chain::split ( double  x,
double  y,
vdgl_edgel_chain_sptr ec1,
vdgl_edgel_chain_sptr ec2 
)

split the current edgel_chain at or around the given point (x,y).

Definition at line 107 of file vdgl_edgel_chain.cxx.

short vdgl_edgel_chain::version ( ) const

Return IO version number;.

Definition at line 250 of file vdgl_edgel_chain.cxx.


Friends And Related Function Documentation

bool operator!= ( const vdgl_edgel_chain ec1,
const vdgl_edgel_chain ec2 
) [friend]

Definition at line 198 of file vdgl_edgel_chain.cxx.

vcl_ostream& operator<< ( vcl_ostream &  s,
const vdgl_edgel_chain p 
) [friend]

Stream operator.

Definition at line 79 of file vdgl_edgel_chain.cxx.

bool operator== ( const vdgl_edgel_chain ec1,
const vdgl_edgel_chain ec2 
) [friend]

Definition at line 187 of file vdgl_edgel_chain.cxx.


Member Data Documentation

vcl_vector<vdgl_edgel> vdgl_edgel_chain::es_ [protected]

Definition at line 101 of file vdgl_edgel_chain.h.


The documentation for this class was generated from the following files: