84 if(iposition.
size() == 2)
89 else if(iposition.
size() == 3)
129 void read(std::istream& in);
132 void write(std::ostream& out)
const;
135 virtual void draw(
kjb::Image & img,
double ir,
double ig,
double ib,
double width = 1.0)
const;
Corner(std::istream &in)
Definition: corner.h:60
virtual void randomly_color(kjb::Image &img, double width=1.0) const
Randomly colors this line segment on an image.
Definition: corner.cpp:84
Abstract class to write this object to an output stream.
Definition: l_writeable.h:41
Corner(const kjb::Vector &iposition)
Constructor without initializations.
Definition: corner.h:45
size_type size() const
Alias to get_length(). Required to comply with stl Container concept.
Definition: m_vector.h:510
void read(std::istream &in)
Reads this Line segment from an input stream.
Definition: corner.cpp:22
Abstract class to read this object from an input stream.
Definition: l_readable.h:39
Corner(const Corner &src)
Definition: corner.h:50
Corner()
Constructor without initializations.
Definition: corner.h:42
kjb::Vector position
position of this 2D corner
Definition: corner.h:143
void set_position(const kjb::Vector &iposition)
Definition: corner.h:82
This class implements vectors, in the linear-algebra sense, with real-valued elements.
Definition: m_vector.h:87
const kjb::Vector & get_position() const
Definition: corner.h:72
const kjb::Line_segment & get_segment(unsigned int i) const
Definition: corner.h:104
void set_segment(unsigned int i, const kjb::Line_segment isegment)
Definition: corner.h:114
std::vector< kjb::Line_segment > segments
Definition: corner.h:146
Corner & operator=(const Corner &src)
Definition: corner.h:65
#define KJB_THROW_2(ex, msg)
Definition: l_exception.h:48
Object thrown when an argument to a function is not acceptable.
Definition: l_exception.h:377
Class to manipulate a 2D corner. The corener is defined in terms of a set of line segments all inters...
Definition: corner.h:37
void add_segment(const kjb::Line_segment &isegment)
Definition: corner.h:99
virtual void read(std::istream &in)=0
Reads this Readable from an input stream.
get the indices of edges in each direction for i
Definition: APPgetLargeConnectedEdges.m:48
Code for a wrapper class around the C struct KJB_Image.
Support for error handling exception classes in libKJB.
void write(std::ostream &out) const
Writes this Line segment to an output stream.
Definition: corner.cpp:64
Wrapped version of the C struct KJB_image.
Definition: i_image.h:76
unsigned int get_num_segments() const
Definition: corner.h:123
Corner(const char *filename)
Definition: corner.h:55
const std::vector< kjb::Line_segment > & get_segments() const
Definition: corner.h:77
Definition for the Vector class, a thin wrapper on the KJB Vector struct and its related functionalit...
Class to manipulate a line segment The class is parametrized in terms the position of the centre...
Definition: gr_line_segment.h:62
virtual void draw(kjb::Image &img, double ir, double ig, double ib, double width=1.0) const
Draws this line segment.
Definition: corner.cpp:75