Public Types | Public Member Functions | Static Public Attributes
C2DMorphShape Class Reference

a class for advanced morphological filter masks More...

#include <mia/2d/morphshape.hh>

Inheritance diagram for C2DMorphShape:
CProductBase CPropertyFlagHolder

Public Types

typedef C2DImage plugin_data
 helper type for plug-in handling More...
 
typedef C2DMorphShape plugin_type
 helper type for plug-in handling More...
 
typedef std::shared_ptr
< C2DMorphShape
Pointer
 The pointer type of the class. More...
 
typedef C2DShape::value_type value_type
 the value type based on the shape representation More...
 

Public Member Functions

void add_pixel (const value_type &pixel, bool foreground)
 
void add_pixel (int x, int y, bool foreground)
 
 C2DMorphShape ()
 default constructor More...
 
 C2DMorphShape (P2DShape foreground_mask, P2DShape background_mask)
 
const C2DShapeget_background_mask () const
 
const C2DShapeget_foreground_mask () const
 
C2DMorphShape rotate_by_90 () const
 
- Public Member Functions inherited from CProductBase
const char * get_init_string () const
 
void set_init_string (const char *init)
 
void set_module (PPluginModule module)
 
- Public Member Functions inherited from CPropertyFlagHolder
void add (const char *property)
 
Set get_missing_properties (const CPropertyFlagHolder &testset) const
 
bool has (const char *property) const
 
bool has_all_in (const CPropertyFlagHolder &testset) const
 
virtual ~CPropertyFlagHolder ()
 

Static Public Attributes

static const char * type_descr
 helper string for plug-in handling More...
 

Detailed Description

a class for advanced morphological filter masks

This class provides the base for masks that support foregound, background and don't care pixels. Such masks are used in more advanced morphological filters like thinning, pruning, corner detection, and the likes.

Definition at line 38 of file morphshape.hh.

Member Typedef Documentation

helper type for plug-in handling

Definition at line 41 of file morphshape.hh.

helper type for plug-in handling

Definition at line 44 of file morphshape.hh.

typedef std::shared_ptr<C2DMorphShape> C2DMorphShape::Pointer

The pointer type of the class.

Definition at line 50 of file morphshape.hh.

the value type based on the shape representation

Definition at line 53 of file morphshape.hh.

Constructor & Destructor Documentation

C2DMorphShape::C2DMorphShape ( )

default constructor

C2DMorphShape::C2DMorphShape ( P2DShape  foreground_mask,
P2DShape  background_mask 
)

Constructor to create the mask from given shapes for background and foreground mask locations. Note, that these two masks must not overlap.

Parameters
foreground_maskshape describing the foreground pixles
background_maskshape describing the background pixles

Member Function Documentation

void C2DMorphShape::add_pixel ( const value_type pixel,
bool  foreground 
)

Add a pixel to either the foreground or the background mask

Parameters
pixelthe pixel location
foregroundset to true if the pixel goes to the foreground mask and to false if the pixel belongs to the background.
void C2DMorphShape::add_pixel ( int  x,
int  y,
bool  foreground 
)

Add a pixel to either the foreground or the background mask

Parameters
xx-coordinate of the pixel location
yy-coordinate of the pixel location
foregroundset to true if the pixel goes to the foreground mask and to false if the pixel belongs to the background.
const C2DShape& C2DMorphShape::get_background_mask ( ) const
Returns
the background mask
const C2DShape& C2DMorphShape::get_foreground_mask ( ) const
Returns
the foreground mask
C2DMorphShape C2DMorphShape::rotate_by_90 ( ) const
Returns
the combined mask rotate by 90 degree

Field Documentation

const char* C2DMorphShape::type_descr
static

helper string for plug-in handling

Definition at line 47 of file morphshape.hh.


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