C2DMorphShape Class Reference
Uncategorized

a class for advanced morphological filter masks More...

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

Inheritance diagram for C2DMorphShape:
[legend]
Collaboration diagram for C2DMorphShape:
[legend]

## Public Types

typedef C2DImage | plugin_data
| helper type for plug-in handling
typedef C2DMorphShape | plugin_type
| helper type for plug-in handling
typedef std::shared_ptr< C2DMorphShape > | Pointer
| The pointer type of the class.
typedef C2DShape::value_type | value_type
| the value type based on the shape representation
Public Types inherited from CPropertyFlagHolder
typedef std::set< const char * > | Set
| define the type of the set of flags

## Public Member Functions

void | add_pixel (const value_type &pixel, bool foreground)
void | add_pixel (int x, int y, bool foreground)
| C2DMorphShape ()
| default constructor
| C2DMorphShape (P2DShape foreground_mask, P2DShape background_mask)
const C2DShape & | get_background_mask () const
const C2DShape & | get_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

## 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

## plugin_data

typedef C2DImage C2DMorphShape::plugin_data

helper type for plug-in handling

Definition at line 42 of file morphshape.hh.

## plugin_type

typedef C2DMorphShape C2DMorphShape::plugin_type

helper type for plug-in handling

Definition at line 45 of file morphshape.hh.

## Pointer

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

The pointer type of the class.

Definition at line 51 of file morphshape.hh.

## value_type

typedef C2DShape::value_type C2DMorphShape::value_type

the value type based on the shape representation

Definition at line 54 of file morphshape.hh.

## Constructor & Destructor Documentation

## C2DMorphShape() [1/2]

C2DMorphShape::C2DMorphShape | ( |  | ) |

default constructor

Referenced by rotate_by_90().

## C2DMorphShape() [2/2]

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_mask | shape describing the foreground pixles
  background_mask | shape describing the background pixles

## Member Function Documentation

## add_pixel() [1/2]

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

Add a pixel to either the foreground or the background mask

Parameters

  pixel | the pixel location
  foreground | set to true if the pixel goes to the foreground mask and to false if the pixel belongs to the background.

## add_pixel() [2/2]

void C2DMorphShape::add_pixel | ( | int | x,
|  | int | y,
|  | bool | foreground )

Add a pixel to either the foreground or the background mask

Parameters

  x | x-coordinate of the pixel location
  y | y-coordinate of the pixel location
  foreground | set to true if the pixel goes to the foreground mask and to false if the pixel belongs to the background.

## get_background_mask()

const C2DShape & C2DMorphShape::get_background_mask | ( |  | ) | const

Returns
  the background mask

## get_foreground_mask()

const C2DShape & C2DMorphShape::get_foreground_mask | ( |  | ) | const

Returns
  the foreground mask

## rotate_by_90()

C2DMorphShape C2DMorphShape::rotate_by_90 | ( |  | ) | const

Returns
  the combined mask rotate by 90 degree

References C2DMorphShape().

## Field Documentation

## type_descr

const char* C2DMorphShape::type_descr

static

helper string for plug-in handling

Definition at line 48 of file morphshape.hh.

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

- morphshape.hh