#include <brip_rect_mask.h>
Public Types | |
enum | mask_id { cr1 = 0, s1, b0, b1, b0s, b1s, r10, r30, r31, r32, r51, r52, c4_90_0, c4_45_0, c4_45_45, e2, e3, e5, e11, m1, m4, m4s, m7, f3, b3, f5, b5, b7, ntypes } |
construct from radius, aspect ratio and orientation (degrees). More... | |
enum | ang_id { a0 = 0, a22, a45, a67, a90, a112, a135, a157, a180, a202, a225, a247, a270, a292, a315, a337, nangles } |
Public Member Functions | |
brip_rect_mask (mask_id mid) | |
~brip_rect_mask () | |
unsigned | ni () const |
the number of columns needed to span the mask. | |
unsigned | nj () const |
the number of rows needed to span the mask. | |
unsigned | n_angles () const |
the number of orientations. | |
ang_id | angle_id (unsigned angle_index) const |
the orientation code. | |
unsigned | nplus () const |
the number of plus symbols for the current mask. | |
unsigned | nminus () const |
the number of minus symbols for the current mask. | |
bool | set_angle_id (ang_id aid) |
set current angle id. | |
int | operator() (int du, int dv) const |
du and dv are measured from the center of the mask, returns +1, -1, 0;. | |
void | print (ang_id aid) |
print the mask with angle id, aid. | |
Static Public Member Functions | |
static void | init () |
initialize static quantities. | |
static vcl_string | name (ang_id aid) |
string name of angle id. | |
static float | angle (ang_id aid) |
floating point angle from id. | |
static float | ang_diff (ang_id aid0, ang_id aid1) |
angle difference angle(aid1)-angle(aid0). | |
static bool | intersect (mask_id mid, ang_id aid0, unsigned short i0, unsigned short j0, ang_id aid1, unsigned short i1, unsigned short j1) |
Intersect '+' symbols of two masks of the same type. | |
static bool | intersect_domain (mask_id mid, ang_id aid0, unsigned short i0, unsigned short j0, ang_id aid1, unsigned short i1, unsigned short j1) |
Intersect full domain of two masks of the same type (0, ni, 0-nj). | |
Protected Member Functions | |
bool | find_ait (ang_id aid, vcl_map< ang_id, vnl_matrix< int > >::const_iterator &ait) const |
brip_rect_mask () | |
Protected Attributes | |
vnl_matrix< int > | current_mask_ |
int | ru_ |
int | rv_ |
vcl_map< ang_id, vnl_matrix < int > > | masks_ |
Static Protected Attributes | |
static vcl_map< ang_id, vcl_string > | names_ = vcl_map<brip_rect_mask::ang_id, vcl_string >() |
static vcl_map< ang_id, float > | angles_ = vcl_map<brip_rect_mask::ang_id, float >() |
static bool | is_init_ = false |
Definition at line 29 of file brip_rect_mask.h.
Definition at line 36 of file brip_rect_mask.h.
construct from radius, aspect ratio and orientation (degrees).
cr1 | |
s1 | |
b0 | |
b1 | |
b0s | |
b1s | |
r10 | |
r30 | |
r31 | |
r32 | |
r51 | |
r52 | |
c4_90_0 | |
c4_45_0 | |
c4_45_45 | |
e2 | |
e3 | |
e5 | |
e11 | |
m1 | |
m4 | |
m4s | |
m7 | |
f3 | |
b3 | |
f5 | |
b5 | |
b7 | |
ntypes |
Definition at line 33 of file brip_rect_mask.h.
brip_rect_mask::brip_rect_mask | ( | mask_id | mid | ) |
Definition at line 798 of file brip_rect_mask.cxx.
brip_rect_mask::~brip_rect_mask | ( | ) | [inline] |
Definition at line 39 of file brip_rect_mask.h.
brip_rect_mask::brip_rect_mask | ( | ) | [protected] |
angle difference angle(aid1)-angle(aid0).
Definition at line 1124 of file brip_rect_mask.cxx.
float brip_rect_mask::angle | ( | ang_id | aid | ) | [static] |
floating point angle from id.
Definition at line 1094 of file brip_rect_mask.cxx.
brip_rect_mask::ang_id brip_rect_mask::angle_id | ( | unsigned | angle_index | ) | const |
the orientation code.
Definition at line 1039 of file brip_rect_mask.cxx.
bool brip_rect_mask::find_ait | ( | ang_id | aid, |
vcl_map< ang_id, vnl_matrix< int > >::const_iterator & | ait | ||
) | const [protected] |
Definition at line 1030 of file brip_rect_mask.cxx.
void brip_rect_mask::init | ( | ) | [static] |
initialize static quantities.
Definition at line 1061 of file brip_rect_mask.cxx.
bool brip_rect_mask::intersect | ( | mask_id | mid, |
ang_id | aid0, | ||
unsigned short | i0, | ||
unsigned short | j0, | ||
ang_id | aid1, | ||
unsigned short | i1, | ||
unsigned short | j1 | ||
) | [static] |
Intersect '+' symbols of two masks of the same type.
Definition at line 1132 of file brip_rect_mask.cxx.
bool brip_rect_mask::intersect_domain | ( | mask_id | mid, |
ang_id | aid0, | ||
unsigned short | i0, | ||
unsigned short | j0, | ||
ang_id | aid1, | ||
unsigned short | i1, | ||
unsigned short | j1 | ||
) | [static] |
Intersect full domain of two masks of the same type (0, ni, 0-nj).
Definition at line 1155 of file brip_rect_mask.cxx.
unsigned brip_rect_mask::n_angles | ( | ) | const [inline] |
the number of orientations.
Definition at line 72 of file brip_rect_mask.h.
vcl_string brip_rect_mask::name | ( | ang_id | aid | ) | [static] |
string name of angle id.
Definition at line 1084 of file brip_rect_mask.cxx.
unsigned brip_rect_mask::ni | ( | ) | const [inline] |
the number of columns needed to span the mask.
Definition at line 66 of file brip_rect_mask.h.
unsigned brip_rect_mask::nj | ( | ) | const [inline] |
the number of rows needed to span the mask.
Definition at line 69 of file brip_rect_mask.h.
unsigned brip_rect_mask::nminus | ( | ) | const |
the number of minus symbols for the current mask.
Definition at line 1114 of file brip_rect_mask.cxx.
unsigned brip_rect_mask::nplus | ( | ) | const |
the number of plus symbols for the current mask.
Definition at line 1104 of file brip_rect_mask.cxx.
int brip_rect_mask::operator() | ( | int | du, |
int | dv | ||
) | const [inline] |
du and dv are measured from the center of the mask, returns +1, -1, 0;.
Definition at line 86 of file brip_rect_mask.h.
void brip_rect_mask::print | ( | ang_id | aid | ) |
print the mask with angle id, aid.
Definition at line 1176 of file brip_rect_mask.cxx.
bool brip_rect_mask::set_angle_id | ( | ang_id | aid | ) |
set current angle id.
Definition at line 1047 of file brip_rect_mask.cxx.
vcl_map< brip_rect_mask::ang_id, float > brip_rect_mask::angles_ = vcl_map<brip_rect_mask::ang_id, float >() [static, protected] |
Definition at line 102 of file brip_rect_mask.h.
vnl_matrix<int> brip_rect_mask::current_mask_ [protected] |
Definition at line 98 of file brip_rect_mask.h.
bool brip_rect_mask::is_init_ = false [static, protected] |
Definition at line 103 of file brip_rect_mask.h.
vcl_map<ang_id, vnl_matrix<int> > brip_rect_mask::masks_ [protected] |
Definition at line 100 of file brip_rect_mask.h.
vcl_map< brip_rect_mask::ang_id, vcl_string > brip_rect_mask::names_ = vcl_map<brip_rect_mask::ang_id, vcl_string >() [static, protected] |
Definition at line 101 of file brip_rect_mask.h.
int brip_rect_mask::ru_ [protected] |
Definition at line 99 of file brip_rect_mask.h.
int brip_rect_mask::rv_ [protected] |
Definition at line 99 of file brip_rect_mask.h.