Base structuring element.
More...
Base structuring element.
#include <DStructuringElement.h>
|
| StrElt (UINT s=1) |
| Class constructor - generic structurant element.
|
|
| StrElt (const StrElt &rhs) |
| Class constructor - clone another structuring element.
|
|
| StrElt (bool oddSE, vector< UINT > indexList) |
| Class constructor.
|
|
IntPoint | getPoint (const UINT i) |
| getPoint() - Get the coordinates (as a point) of the pixel of order i in the structuring element
|
|
UINT | getSize () const |
| getSize() - Get the size of the Structuring Element
|
|
StrElt & | operator= (const StrElt &rhs) |
| Clone a structuring element.
|
|
void | clone (const StrElt &rhs) |
| clone() - Clone a structuring element
|
|
void | addPoint (const UINT index) |
| addPoint() - Add a point to the structurant element based on an index on a grid.
|
|
void | addPoint (int x, int y, int z=0) |
| addPoint() - Add a point to the structurant element given its coordinates
|
|
void | addPoint (const IntPoint &pt) |
| addPoint() - Add a point to the structurant element given its coordinates in a IntPoint data structure.
|
|
const StrElt | operator() (int s=1) const |
| operator() -
|
|
StrElt | homothety (const UINT s) const |
| homothety() - Build and return an homothetic SE with size s
|
|
StrElt | transpose () const |
| transpose() - Return the opposite SE (symmetry with respect to 0)
|
|
StrElt | merge (const StrElt &rhs) |
| merge() - Merge a structuring element
|
|
StrElt | noCenter () const |
| Return the SE with no center.
|
|
virtual seType | getType () const |
| getType() - Get the type of the structuring element
|
|
void | setName (string name) |
| setName() - Set the name of the structuring element
|
|
void | setName () |
| setName() - Set the name of the structuring element
|
|
const char * | getName () const |
| getName() - Get the name of the structuring element
|
|
virtual void | printSelf (ostream &os=std::cout, string indent="") const |
| printSelf() - Print the contents of the structuring element
|
|
virtual void | printSelf (string indent) const |
| printSelf() - Print the contents of the structuring element
|
|
|
vector< IntPoint > | points |
| List of neighbor points.
|
|
◆ StrElt() [1/3]
Class constructor - generic structurant element.
- Parameters
-
[in] | s | : size of the structinrg element |
◆ StrElt() [2/3]
Class constructor - clone another structuring element.
- Parameters
-
[in] | rhs | : structuring element |
◆ StrElt() [3/3]
StrElt |
( |
bool |
oddSE, |
|
|
vector< UINT > |
indexList |
|
) |
| |
|
inline |
Class constructor.
Construct a structuring element with points defined by their indexes.
- Parameters
-
[in] | oddSE | : Specify if we want to use an hexagonal grid (true) or a square grid (false) |
[in] | indexList | : The list of point indexes |
The index values are defined for each grid type as follow:
Example:
diagSE_s = StrElt(False, (0,8))
diagSE_h = StrElt(True, (0,6))
◆ getPoint()
getPoint() - Get the coordinates (as a point) of the pixel of order i
in the structuring element
- Parameters
-
- Returns
- the coordinates of the pixel, relative to the StrElt center
◆ getSize()
getSize() - Get the size of the Structuring Element
- Returns
- the size of the structuring element
◆ operator=()
Clone a structuring element.
Clone a strunturing element to, eventually, create another one based on it.
Example:
import smilPython as sp
se = sp.VertSE()
se.addPoint(1,0)
print(se)
Structuring Element
Type : 5 VertSE
Size : 1
Point Nbr : 4
◆ clone()
void clone |
( |
const StrElt & |
rhs | ) |
|
clone() - Clone a structuring element
- Parameters
-
[in] | rhs | : structuring element to be cloned |
◆ addPoint() [1/3]
void addPoint |
( |
const UINT |
index | ) |
|
addPoint() - Add a point to the structurant element based on an index on a grid.
Index are defined as in the following drawings :
- Grids : Square and Hexagonal
- Parameters
-
[in] | index | : index to predefined point coordinates, as above. |
Example:
import smilPython as sp
diagSE_s = sp.StrElt(False)
diagSE_s.addPoint(0)
diagSE_s.addPoint(4)
diagSE_s.addPoint(8)
diagSE_h = sp.StrElt(True)
diagSE_h.addPoint(0)
diagSE_h.addPoint(3)
diagSE_h.addPoint(6)
◆ addPoint() [2/3]
void addPoint |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
z = 0 |
|
) |
| |
addPoint() - Add a point to the structurant element given its coordinates
- Parameters
-
[in] | x,y,[z] | : point coordinates |
◆ addPoint() [3/3]
addPoint() - Add a point to the structurant element given its coordinates in a IntPoint
data structure.
- Parameters
-
[in] | pt | : a point to be added to the structuring element (itself) |
◆ homothety()
StrElt homothety |
( |
const UINT |
s | ) |
const |
homothety() - Build and return an homothetic SE with size s
- Parameters
-
[in] | s | : size of the new structuring element |
- Returns
- a structuring element of size s
◆ transpose()
transpose() - Return the opposite SE (symmetry with respect to 0)
- Returns
- a structuring element
◆ merge()
merge() - Merge a structuring element
- Parameters
-
[in] | rhs | : structuring element to be merged |
- Returns
- a structuring element
◆ noCenter()
Return the SE with no center.
Remove the central point of the Structuring Element
- Returns
- a structuring element
◆ getType()
virtual seType getType |
( |
| ) |
const |
|
inlinevirtual |
getType() - Get the type of the structuring element
- Returns
- the content of the seT private field
◆ setName() [1/2]
void setName |
( |
string |
name | ) |
|
|
inline |
setName() - Set the name of the structuring element
- Parameters
-
◆ setName() [2/2]
setName() - Set the name of the structuring element
Set the structuring element based on the type field seT
◆ getName()
const char * getName |
( |
| ) |
const |
|
inlinevirtual |
getName() - Get the name of the structuring element
- Returns
- the name of the structuring element (as a string)
Reimplemented from BaseObject.
◆ printSelf() [1/2]
void printSelf |
( |
ostream & |
os = std::cout , |
|
|
string |
indent = "" |
|
) |
| const |
|
virtual |
printSelf() - Print the contents of the structuring element
- Note
- In Python this has the same effect than print(se)
Reimplemented from BaseObject.
◆ printSelf() [2/2]
virtual void printSelf |
( |
string |
indent | ) |
const |
|
inlinevirtual |
printSelf() - Print the contents of the structuring element
- Note
- In Python this has the same effect than print(se)
The documentation for this class was generated from the following files:
- Morpho/include/DStructuringElement.h
- Morpho/src/DStructuringElement.cpp