VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkLinkEdgels Class Reference

links edgels together to form digital curves. More...

#include <vtkLinkEdgels.h>

Inherits vtkPolyDataAlgorithm.

Public Types

typedef vtkPolyDataAlgorithm Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkLinkEdgelsNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual void SetLinkThreshold (double)
 
virtual double GetLinkThreshold ()
 
virtual void SetPhiThreshold (double)
 
virtual double GetPhiThreshold ()
 
virtual void SetGradientThreshold (double)
 
virtual double GetGradientThreshold ()
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkLinkEdgelsSafeDownCast (vtkObjectBase *o)
 
static vtkLinkEdgelsNew ()
 

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 
 vtkLinkEdgels ()
 
 ~vtkLinkEdgels ()
 
virtual int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
virtual int FillInputPortInformation (int port, vtkInformation *info)
 
void LinkEdgels (int xdim, int ydim, double *image, vtkDataArray *inVectors, vtkCellArray *newLines, vtkPoints *newPts, vtkDoubleArray *outScalars, vtkDoubleArray *outVectors, int z)
 

Protected Attributes

double GradientThreshold
 
double PhiThreshold
 
double LinkThreshold
 

Detailed Description

links edgels together to form digital curves.

vtkLinkEdgels links edgels into digital curves which are then stored as polylines. The algorithm works one pixel at a time only looking at its immediate neighbors. There is a GradientThreshold that can be set that eliminates any pixels with a smaller gradient value. This can be used as the lower threshold of a two value edgel thresholding.

For the remaining edgels, links are first tried for the four connected neighbors. A successful neighbor will satisfy three tests. First both edgels must be above the gradient threshold. Second, the difference between the orientation between the two edgels (Alpha) and each edgels orientation (Phi) must be less than LinkThreshold. Third, the difference between the two edgels Phi values must be less than PhiThreshold. The most successful link is selected. The measure is simply the sum of the three angle differences (actually stored as the sum of the cosines). If none of the four connect neighbors succeeds, then the eight connect neighbors are examined using the same method.

This filter requires gradient information so you will need to use a vtkImageGradient at some point prior to this filter. Typically a vtkNonMaximumSuppression filter is also used. vtkThresholdEdgels can be used to complete the two value edgel thresholding as used in a Canny edge detector. The vtkSubpixelPositionEdgels filter can also be used after this filter to adjust the edgel locations.

See Also
vtkImageData vtkImageGradient vtkImageNonMaximumSuppression
Tests:
vtkLinkEdgels (Tests)

Definition at line 61 of file vtkLinkEdgels.h.

Member Typedef Documentation

typedef vtkPolyDataAlgorithm vtkLinkEdgels::Superclass

Definition at line 64 of file vtkLinkEdgels.h.

Constructor & Destructor Documentation

vtkLinkEdgels::vtkLinkEdgels ( )
protected
vtkLinkEdgels::~vtkLinkEdgels ( )
inlineprotected

Definition at line 92 of file vtkLinkEdgels.h.

Member Function Documentation

static int vtkLinkEdgels::IsTypeOf ( const char *  type)
static
virtual int vtkLinkEdgels::IsA ( const char *  type)
virtual
static vtkLinkEdgels* vtkLinkEdgels::SafeDownCast ( vtkObjectBase *  o)
static
virtual vtkObjectBase* vtkLinkEdgels::NewInstanceInternal ( ) const
protectedvirtual
vtkLinkEdgels* vtkLinkEdgels::NewInstance ( ) const
void vtkLinkEdgels::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
static vtkLinkEdgels* vtkLinkEdgels::New ( )
static

Construct instance of vtkLinkEdgels with GradientThreshold set to 0.1, PhiThreshold set to 90 degrees and LinkThreshold set to 90 degrees.

virtual void vtkLinkEdgels::SetLinkThreshold ( double  )
virtual

Set/Get the threshold for Phi vs. Alpha link thresholding.

virtual double vtkLinkEdgels::GetLinkThreshold ( )
virtual

Set/Get the threshold for Phi vs. Alpha link thresholding.

virtual void vtkLinkEdgels::SetPhiThreshold ( double  )
virtual

Set/get the threshold for Phi vs. Phi link thresholding.

virtual double vtkLinkEdgels::GetPhiThreshold ( )
virtual

Set/get the threshold for Phi vs. Phi link thresholding.

virtual void vtkLinkEdgels::SetGradientThreshold ( double  )
virtual

Set/Get the threshold for image gradient thresholding.

virtual double vtkLinkEdgels::GetGradientThreshold ( )
virtual

Set/Get the threshold for image gradient thresholding.

virtual int vtkLinkEdgels::RequestData ( vtkInformation *  ,
vtkInformationVector **  ,
vtkInformationVector *   
)
protectedvirtual
virtual int vtkLinkEdgels::FillInputPortInformation ( int  port,
vtkInformation *  info 
)
protectedvirtual
void vtkLinkEdgels::LinkEdgels ( int  xdim,
int  ydim,
double *  image,
vtkDataArray *  inVectors,
vtkCellArray *  newLines,
vtkPoints *  newPts,
vtkDoubleArray *  outScalars,
vtkDoubleArray *  outVectors,
int  z 
)
protected

Member Data Documentation

double vtkLinkEdgels::GradientThreshold
protected

Definition at line 101 of file vtkLinkEdgels.h.

double vtkLinkEdgels::PhiThreshold
protected

Definition at line 102 of file vtkLinkEdgels.h.

double vtkLinkEdgels::LinkThreshold
protected

Definition at line 103 of file vtkLinkEdgels.h.


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