Main Page | Data Structures | File List | Data Fields | Globals

mr_lag_section.h File Reference

#include <mr_vector.h>
#include <mr_line.h>

Go to the source code of this file.

Data Structures

struct  MrLagSection
 Section in the LAG. More...

Defines

#define LAG_SECTION_WIDTH(s)   (((MrLagSegment*)mr_vector_get(s->segments, 0))->x - ((MrLagSegment*)mr_vector_get(s->segments, s->segments->size -1))->x + 1)
#define SECTION_START(s)   ((MrLagSegment*)mr_vector_get(s->segments, 0))
#define SECTION_START_X(s)   (SECTION_START(s)->x)
#define SECTION_END(s)   ((MrLagSegment*)mr_vector_get(s->segments, s->segments->size - 1))
#define SECTION_END_X(s)   (SECTION_END(s)->x)

Typedefs

typedef MrLagSection MrLagSection

Functions

MrLagSectionmr_lag_section_new ()
void mr_lag_section_free (void *p)
void mr_lag_section_add_segment (MrLagSection *section, void *segment)
unsigned int mr_lag_section_area (MrLagSection *section)
unsigned int mr_lag_section_mean_Y (MrLagSection *section)
void mr_lag_section_remove (MrLagSection *section)


Define Documentation

#define LAG_SECTION_WIDTH  )     (((MrLagSegment*)mr_vector_get(s->segments, 0))->x - ((MrLagSegment*)mr_vector_get(s->segments, s->segments->size -1))->x + 1)
 

#define SECTION_END  )     ((MrLagSegment*)mr_vector_get(s->segments, s->segments->size - 1))
 

#define SECTION_END_X  )     (SECTION_END(s)->x)
 

#define SECTION_START  )     ((MrLagSegment*)mr_vector_get(s->segments, 0))
 

#define SECTION_START_X  )     (SECTION_START(s)->x)
 


Typedef Documentation

typedef struct MrLagSection MrLagSection
 


Function Documentation

void mr_lag_section_add_segment MrLagSection section,
void *  segment
 

Add a segment to the section. Update the sum and mean

unsigned int mr_lag_section_area MrLagSection section  ) 
 

Return the sum of pixel in the section : return sum_height

void mr_lag_section_free void *  p  ) 
 

Destroys a section. Does not delete junctions and segments object in the vectors

unsigned int mr_lag_section_mean_Y MrLagSection section  ) 
 

Return the mean Y coordinate of the section. Used to define a horizontal line associated to this section.

MrLagSection* mr_lag_section_new  ) 
 

Creates a new section

void mr_lag_section_remove MrLagSection section  ) 
 

update junction as the section does not exist any more


Generated on Sun Apr 9 17:29:41 2006 for MusicReco by  doxygen 1.4.4