Horus Doc || C++ Reference || Class Overview   Pixels   Images   Detector   Geometry   Registry || Doxygen's quick Index  

HxSF Class Reference

Class definition of the structuring function used for Mathematical Morphology operations. More...

#include <HxSF.h>

List of all members.

Public Methods

HxImageRep getKernel () const
HxImageRep getHorizontalKernel () const
HxImageRep getVerticalKernel () const
bool isSeparable () const
bool isSymetric () const
int getConnectivity () const
HxSF dilateSF (int n)
 perform a "n-1" dilation or Minkowski addition of the SF. More...

HxSF erodeSF (int n)
HxSF rotateSF (int theta, bool sense)
 perform rotation of the SF; this is used in Thickening and Thinning the allowed values for theta are 45, 90, 180 sense is TRUE for COUNTERCLOCKWISE and FALSE for CLOCKWISE. More...

Constructors
 HxSF ()
 Null Structuring Function. More...

 HxSF (const HxSF &)
 Copy Constructor. More...

 HxSF (HxImageRep im, bool sym, bool decomp, int conn)
 HxSF (HxImageRep imH, HxImageRep imV, bool sym, bool decomp, int conn)
 HxSF (HxImageRep im, HxImageRep imH, HxImageRep imV, bool sym, bool decomp, int conn)
Destructor
 ~HxSF ()
Operators
HxSF & operator= (const HxSF &)
 Assignment operator. More...


Friends

class HxSFFactory


Detailed Description

Class definition of the structuring function used for Mathematical Morphology operations.

Author:
Leon Todoran (todoran@science.uva.nl)
Version:
0.1
Date:
10.01.2002
the structuring element should have the same signature as the argument image

Remarks:
is it allowed for the se to have:

Todo:
still have to implement: -roatation of se


Constructor & Destructor Documentation

HxSF::HxSF  
 

Null Structuring Function.

00018 {
00019     symetric        = false;
00020     separable       = false;
00021     connectivity    = 8;
00022 }

HxSF::HxSF const HxSF &    a
 

Copy Constructor.

00026 {
00027     se              = a.getKernel();
00028     seH             = a.getHorizontalKernel();
00029     seV             = a.getVerticalKernel();
00030     symetric        = a.isSymetric();
00031     separable       = a.isSeparable();
00032     connectivity    = a.getConnectivity();
00033 }


Member Function Documentation

HxSF & HxSF::operator= const HxSF &    a
 

Assignment operator.

00073 {
00074     se              = a.getKernel();
00075     seH             = a.getHorizontalKernel();
00076     seV             = a.getVerticalKernel();
00077     symetric        = a.isSymetric();
00078     separable       = a.isSeparable();
00079     connectivity    = a.getConnectivity();
00080 
00081     return *this;   
00082 }

HxSF HxSF::dilateSF int    n
 

perform a "n-1" dilation or Minkowski addition of the SF.

00111 {
00112     if(n==0)
00113         return *this;
00114 
00115     size = se.sizes();
00116     int increaseFactorX = size.x()/2;
00117     int increaseFactorY = size.y()/2;
00118     int newx = size.x()+2*n*increaseFactorX;
00119     int newy = size.y()+2*n*increaseFactorY;
00120     HxSizes sz(newx,newy,1);
00121     HxPoint p(newx/2-size.x()/2,newy/2-(size.y())/2,0);
00122     
00123     HxImageRep im = HxExtendVal(se,sz,0,p);
00124 
00125     for(int i=0; i< n; i++)
00126         im = HxDilation(im, *this);
00127 
00128 
00129     HxSF sf(im, this->isSymetric(), false, this->getConnectivity() );
00130     
00131     return sf;
00132 }

HxSF HxSF::rotateSF int    theta,
bool    sense
 

perform rotation of the SF; this is used in Thickening and Thinning the allowed values for theta are 45, 90, 180 sense is TRUE for COUNTERCLOCKWISE and FALSE for CLOCKWISE.


The documentation for this class was generated from the following files:
Generated on Mon Jan 27 15:49:10 2003 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001