VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkImplicitPolyDataDistance Class Reference

Implicit function that computes the distance from a point x to the nearest point p on an input vtkPolyData. More...

#include <vtkImplicitPolyDataDistance.h>

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

Public Types

typedef vtkImplicitFunction Superclass
 
- Public Types inherited from vtkImplicitFunction
typedef vtkObject Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class. More...
 
vtkImplicitPolyDataDistanceNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses. More...
 
vtkMTimeType GetMTime () override
 Return the MTime also considering the Input dependency. More...
 
double EvaluateFunction (double x[3]) override
 Evaluate plane equation of nearest triangle to point x[3]. More...
 
void EvaluateGradient (double x[3], double g[3]) override
 Evaluate function gradient of nearest triangle to point x[3]. More...
 
double EvaluateFunctionAndGetClosestPoint (double x[3], double closestPoint[3])
 Evaluate plane equation of nearest triangle to point x[3] and provides closest point on an input vtkPolyData. More...
 
void SetInput (vtkPolyData *input)
 Set the input vtkPolyData used for the implicit function evaluation. More...
 
virtual void SetNoValue (double)
 Set/get the function value to use if no input vtkPolyData specified. More...
 
virtual double GetNoValue ()
 Set/get the function value to use if no input vtkPolyData specified. More...
 
virtual void SetNoGradient (double, double, double)
 Set/get the function gradient to use if no input vtkPolyData specified. More...
 
virtual void SetNoGradient (double[3])
 Set/get the function gradient to use if no input vtkPolyData specified. More...
 
virtual doubleGetNoGradient ()
 Set/get the function gradient to use if no input vtkPolyData specified. More...
 
virtual void GetNoGradient (double &, double &, double &)
 Set/get the function gradient to use if no input vtkPolyData specified. More...
 
virtual void GetNoGradient (double[3])
 Set/get the function gradient to use if no input vtkPolyData specified. More...
 
virtual void SetNoClosestPoint (double, double, double)
 Set/get the closest point to use if no input vtkPolyData specified. More...
 
virtual void SetNoClosestPoint (double[3])
 Set/get the closest point to use if no input vtkPolyData specified. More...
 
virtual doubleGetNoClosestPoint ()
 Set/get the closest point to use if no input vtkPolyData specified. More...
 
virtual void GetNoClosestPoint (double &, double &, double &)
 Set/get the closest point to use if no input vtkPolyData specified. More...
 
virtual void GetNoClosestPoint (double[3])
 Set/get the closest point to use if no input vtkPolyData specified. More...
 
virtual double GetTolerance ()
 Set/get the tolerance usued for the locator. More...
 
virtual void SetTolerance (double)
 Set/get the tolerance usued for the locator. More...
 
- Public Member Functions inherited from vtkImplicitFunction
vtkImplicitFunctionNewInstance () const
 
double FunctionValue (const double x[3])
 Evaluate function at position x-y-z and return value. More...
 
double FunctionValue (double x, double y, double z)
 Evaluate function at position x-y-z and return value. More...
 
void FunctionGradient (const double x[3], double g[3])
 Evaluate function gradient at position x-y-z and pass back vector. More...
 
doubleFunctionGradient (const double x[3])
 Evaluate function gradient at position x-y-z and pass back vector. More...
 
doubleFunctionGradient (double x, double y, double z)
 Evaluate function gradient at position x-y-z and pass back vector. More...
 
virtual void SetTransform (vtkAbstractTransform *)
 Set/Get a transformation to apply to input points before executing the implicit function. More...
 
virtual void SetTransform (const double elements[16])
 Set/Get a transformation to apply to input points before executing the implicit function. More...
 
virtual vtkAbstractTransformGetTransform ()
 Set/Get a transformation to apply to input points before executing the implicit function. More...
 
double EvaluateFunction (double x, double y, double z)
 Evaluate function at position x-y-z and return value. More...
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 Turn debugging output on. More...
 
virtual void DebugOff ()
 Turn debugging output off. More...
 
bool GetDebug ()
 Get the value of the debug flag. More...
 
void SetDebug (bool debugFlag)
 Set the value of the debug flag. More...
 
virtual void Modified ()
 Update the modification time for this object. More...
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkCommandGetCommand (unsigned long tag)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObserver (vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObservers (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObservers (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
int HasObserver (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
int HasObserver (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Allow user to set the AbortFlagOn() with the return value of the callback method. More...
 
int InvokeEvent (unsigned long event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
int InvokeEvent (const char *event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 Return the class name as a string. More...
 
virtual void Delete ()
 Delete a VTK object. More...
 
virtual void FastDelete ()
 Delete a reference to this object. More...
 
void InitializeObjectBase ()
 
void Print (ostream &os)
 Print an object to an ostream. More...
 
virtual void Register (vtkObjectBase *o)
 Increase the reference count (mark as used by another object). More...
 
virtual void UnRegister (vtkObjectBase *o)
 Decrease the reference count (release by another object). More...
 
int GetReferenceCount ()
 Return the current reference count of this object. More...
 
void SetReferenceCount (int)
 Sets the reference count. More...
 
void PrintRevisions (ostream &)
 Legacy. More...
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 

Static Public Member Functions

static vtkImplicitPolyDataDistanceNew ()
 
static int IsTypeOf (const char *type)
 
static vtkImplicitPolyDataDistanceSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkImplicitFunction
static int IsTypeOf (const char *type)
 
static vtkImplicitFunctionSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 
static void BreakOnError ()
 This method is called when vtkErrorMacro executes. More...
 
static void SetGlobalWarningDisplay (int val)
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOn ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOff ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static int GetGlobalWarningDisplay ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 Return 1 if this class type is the same type of (or a subclass of) the named class. More...
 
static vtkObjectBaseNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkImplicitPolyDataDistance ()
 
 ~vtkImplicitPolyDataDistance () override
 
void CreateDefaultLocator (void)
 Create default locator. More...
 
double SharedEvaluate (double x[3], double g[3], double p[3])
 
- Protected Member Functions inherited from vtkImplicitFunction
 vtkImplicitFunction ()
 
 ~vtkImplicitFunction () override
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
 ~vtkObject () override
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 These methods allow a command to exclusively grab all events. More...
 
void InternalReleaseFocus ()
 These methods allow a command to exclusively grab all events. More...
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

double NoGradient [3]
 
double NoClosestPoint [3]
 
double NoValue
 
double Tolerance
 
vtkPolyDataInput
 
vtkCellLocatorLocator
 
- Protected Attributes inherited from vtkImplicitFunction
vtkAbstractTransformTransform
 
double ReturnValue [3]
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

Implicit function that computes the distance from a point x to the nearest point p on an input vtkPolyData.

The sign of the function is set to the sign of the dot product between the angle-weighted pseudonormal at the nearest surface point and the vector x - p. Points interior to the geometry have a negative distance, points on the exterior have a positive distance, and points on the input vtkPolyData have a distance of zero. The gradient of the function is the angle-weighted pseudonormal at the nearest point.

Baerentzen, J. A. and Aanaes, H. (2005). Signed distance computation using the angle weighted pseudonormal. IEEE Transactions on Visualization and Computer Graphics, 11:243-253.

This code was contributed in the VTK Journal paper: "Boolean Operations on Surfaces in VTK Without External Libraries" by Cory Quammen, Chris Weigle C., Russ Taylor http://hdl.handle.net/10380/3262 http://www.midasjournal.org/browse/publication/797

Tests:
vtkImplicitPolyDataDistance (Tests)

Definition at line 51 of file vtkImplicitPolyDataDistance.h.

Member Typedef Documentation

Definition at line 55 of file vtkImplicitPolyDataDistance.h.

Constructor & Destructor Documentation

vtkImplicitPolyDataDistance::vtkImplicitPolyDataDistance ( )
protected
vtkImplicitPolyDataDistance::~vtkImplicitPolyDataDistance ( )
overrideprotected

Member Function Documentation

static vtkImplicitPolyDataDistance* vtkImplicitPolyDataDistance::New ( )
static
static int vtkImplicitPolyDataDistance::IsTypeOf ( const char *  type)
static
virtual int vtkImplicitPolyDataDistance::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class.

Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkImplicitFunction.

static vtkImplicitPolyDataDistance* vtkImplicitPolyDataDistance::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkImplicitPolyDataDistance::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkImplicitFunction.

vtkImplicitPolyDataDistance* vtkImplicitPolyDataDistance::NewInstance ( ) const
void vtkImplicitPolyDataDistance::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

Methods invoked by print to print information about the object including superclasses.

Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkImplicitFunction.

vtkMTimeType vtkImplicitPolyDataDistance::GetMTime ( )
overridevirtual

Return the MTime also considering the Input dependency.

Reimplemented from vtkImplicitFunction.

double vtkImplicitPolyDataDistance::EvaluateFunction ( double  x[3])
overridevirtual

Evaluate plane equation of nearest triangle to point x[3].

Implements vtkImplicitFunction.

void vtkImplicitPolyDataDistance::EvaluateGradient ( double  x[3],
double  g[3] 
)
overridevirtual

Evaluate function gradient of nearest triangle to point x[3].

Implements vtkImplicitFunction.

double vtkImplicitPolyDataDistance::EvaluateFunctionAndGetClosestPoint ( double  x[3],
double  closestPoint[3] 
)

Evaluate plane equation of nearest triangle to point x[3] and provides closest point on an input vtkPolyData.

void vtkImplicitPolyDataDistance::SetInput ( vtkPolyData input)

Set the input vtkPolyData used for the implicit function evaluation.

Passes input through an internal instance of vtkTriangleFilter to remove vertices and lines, leaving only triangular polygons for evaluation as implicit planes.

virtual void vtkImplicitPolyDataDistance::SetNoValue ( double  )
virtual

Set/get the function value to use if no input vtkPolyData specified.

virtual double vtkImplicitPolyDataDistance::GetNoValue ( )
virtual

Set/get the function value to use if no input vtkPolyData specified.

virtual void vtkImplicitPolyDataDistance::SetNoGradient ( double  ,
double  ,
double   
)
virtual

Set/get the function gradient to use if no input vtkPolyData specified.

virtual void vtkImplicitPolyDataDistance::SetNoGradient ( double  [3])
virtual

Set/get the function gradient to use if no input vtkPolyData specified.

virtual double* vtkImplicitPolyDataDistance::GetNoGradient ( )
virtual

Set/get the function gradient to use if no input vtkPolyData specified.

virtual void vtkImplicitPolyDataDistance::GetNoGradient ( double ,
double ,
double  
)
virtual

Set/get the function gradient to use if no input vtkPolyData specified.

virtual void vtkImplicitPolyDataDistance::GetNoGradient ( double  [3])
virtual

Set/get the function gradient to use if no input vtkPolyData specified.

virtual void vtkImplicitPolyDataDistance::SetNoClosestPoint ( double  ,
double  ,
double   
)
virtual

Set/get the closest point to use if no input vtkPolyData specified.

virtual void vtkImplicitPolyDataDistance::SetNoClosestPoint ( double  [3])
virtual

Set/get the closest point to use if no input vtkPolyData specified.

virtual double* vtkImplicitPolyDataDistance::GetNoClosestPoint ( )
virtual

Set/get the closest point to use if no input vtkPolyData specified.

virtual void vtkImplicitPolyDataDistance::GetNoClosestPoint ( double ,
double ,
double  
)
virtual

Set/get the closest point to use if no input vtkPolyData specified.

virtual void vtkImplicitPolyDataDistance::GetNoClosestPoint ( double  [3])
virtual

Set/get the closest point to use if no input vtkPolyData specified.

virtual double vtkImplicitPolyDataDistance::GetTolerance ( )
virtual

Set/get the tolerance usued for the locator.

virtual void vtkImplicitPolyDataDistance::SetTolerance ( double  )
virtual

Set/get the tolerance usued for the locator.

void vtkImplicitPolyDataDistance::CreateDefaultLocator ( void  )
protected

Create default locator.

Used to create one when none is specified.

double vtkImplicitPolyDataDistance::SharedEvaluate ( double  x[3],
double  g[3],
double  p[3] 
)
protected

Member Data Documentation

double vtkImplicitPolyDataDistance::NoGradient[3]
protected

Definition at line 132 of file vtkImplicitPolyDataDistance.h.

double vtkImplicitPolyDataDistance::NoClosestPoint[3]
protected

Definition at line 133 of file vtkImplicitPolyDataDistance.h.

double vtkImplicitPolyDataDistance::NoValue
protected

Definition at line 134 of file vtkImplicitPolyDataDistance.h.

double vtkImplicitPolyDataDistance::Tolerance
protected

Definition at line 135 of file vtkImplicitPolyDataDistance.h.

vtkPolyData* vtkImplicitPolyDataDistance::Input
protected

Definition at line 137 of file vtkImplicitPolyDataDistance.h.

vtkCellLocator* vtkImplicitPolyDataDistance::Locator
protected

Definition at line 138 of file vtkImplicitPolyDataDistance.h.


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