VMTK
Loading...
Searching...
No Matches
vtkvmtkPolyDataUmbrellaStencil Class Reference

Implements a uniform (unweighted) Laplacian stencil for the one-ring neighborhood of a surface mesh. point. More...

#include <vtkvmtkPolyDataUmbrellaStencil.h>

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

Public Types

typedef vtkvmtkPolyDataManifoldStencil Superclass
Public Types inherited from vtkvmtkPolyDataManifoldStencil
typedef vtkvmtkStencil Superclass
Public Types inherited from vtkvmtkStencil
typedef vtkvmtkNeighborhood Superclass
Public Types inherited from vtkvmtkNeighborhood
typedef vtkvmtkDataSetItem Superclass
Public Types inherited from vtkvmtkDataSetItem
typedef vtkvmtkItem Superclass
Public Types inherited from vtkvmtkItem
typedef vtkObject Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkvmtkPolyDataUmbrellaStencil * NewInstance () const
virtual vtkIdType GetItemType () override
void Build () override
Public Member Functions inherited from vtkvmtkPolyDataManifoldStencil
vtkvmtkPolyDataManifoldStencil * NewInstance () const
virtual double GetArea ()
virtual void ComputeArea ()
void DeepCopy (vtkvmtkPolyDataManifoldStencil *src)
virtual int GetUseExtendedNeighborhood ()
virtual void SetUseExtendedNeighborhood (int)
virtual void UseExtendedNeighborhoodOn ()
virtual void UseExtendedNeighborhoodOff ()
Public Member Functions inherited from vtkvmtkStencil
vtkvmtkStencil * NewInstance () const
vtkIdType GetNumberOfWeights ()
void ScaleWeights (double factor)
const double * GetCenterWeightTuple ()
virtual void DeepCopy (vtkvmtkItem *src) override
virtual void SetNumberOfComponents (vtkIdType)
virtual vtkIdType GetNumberOfComponents ()
double GetWeight (vtkIdType i)
void SetWeight (vtkIdType i, double weight)
double GetWeight (vtkIdType i, vtkIdType component)
void SetWeight (vtkIdType i, vtkIdType component, double weight)
double GetCenterWeight ()
void SetCenterWeight (double weight)
double GetCenterWeight (vtkIdType component)
void SetCenterWeight (vtkIdType component, double weightComponent)
virtual void SetWeightScaling (int)
virtual int GetWeightScaling ()
virtual void WeightScalingOn ()
virtual void WeightScalingOff ()
virtual void SetNegateWeights (int)
virtual int GetNegateWeights ()
virtual void NegateWeightsOn ()
virtual void NegateWeightsOff ()
Public Member Functions inherited from vtkvmtkNeighborhood
vtkvmtkNeighborhood * NewInstance () const
virtual bool GetIsBoundary ()
vtkIdType GetNumberOfPoints ()
vtkIdType GetPointId (vtkIdType i)
vtkIdType * GetPointer (vtkIdType i)
Public Member Functions inherited from vtkvmtkDataSetItem
vtkvmtkDataSetItem * NewInstance () const
void SetDataSet (vtkDataSet *dataSet)
vtkDataSet * GetDataSet ()
virtual void SetDataSetPointId (vtkIdType)
virtual vtkIdType GetDataSetPointId ()
virtual void SetReallocateOnBuild (int)
virtual int GetReallocateOnBuild ()
virtual void ReallocateOnBuildOn ()
virtual void ReallocateOnBuildOff ()
Public Member Functions inherited from vtkvmtkItem
vtkvmtkItem * NewInstance () const

Static Public Member Functions

static vtkvmtkPolyDataUmbrellaStencil * New ()
static int IsTypeOf (const char *type)
static vtkvmtkPolyDataUmbrellaStencil * SafeDownCast (vtkObjectBase *o)
Static Public Member Functions inherited from vtkvmtkPolyDataManifoldStencil
static int IsTypeOf (const char *type)
static vtkvmtkPolyDataManifoldStencil * SafeDownCast (vtkObjectBase *o)
Static Public Member Functions inherited from vtkvmtkStencil
static int IsTypeOf (const char *type)
static vtkvmtkStencil * SafeDownCast (vtkObjectBase *o)
Static Public Member Functions inherited from vtkvmtkNeighborhood
static int IsTypeOf (const char *type)
static vtkvmtkNeighborhood * SafeDownCast (vtkObjectBase *o)
Static Public Member Functions inherited from vtkvmtkDataSetItem
static int IsTypeOf (const char *type)
static vtkvmtkDataSetItem * SafeDownCast (vtkObjectBase *o)
Static Public Member Functions inherited from vtkvmtkItem
static int IsTypeOf (const char *type)
static vtkvmtkItem * SafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 vtkvmtkPolyDataUmbrellaStencil ()
 ~vtkvmtkPolyDataUmbrellaStencil ()
void ScaleWithArea () override
Protected Member Functions inherited from vtkvmtkPolyDataManifoldStencil
 vtkvmtkPolyDataManifoldStencil ()
 ~vtkvmtkPolyDataManifoldStencil ()
void ScaleWithAreaFactor (double factor)
Protected Member Functions inherited from vtkvmtkStencil
 vtkvmtkStencil ()
 ~vtkvmtkStencil ()
void ResizePointList (vtkIdType ptId, int size)
void ChangeWeightSign ()
Protected Member Functions inherited from vtkvmtkNeighborhood
 vtkvmtkNeighborhood ()
 ~vtkvmtkNeighborhood ()
void ResizePointList (vtkIdType ptId, int size)
Protected Member Functions inherited from vtkvmtkDataSetItem
 vtkvmtkDataSetItem ()
 ~vtkvmtkDataSetItem ()
Protected Member Functions inherited from vtkvmtkItem
 vtkvmtkItem ()
 ~vtkvmtkItem ()

Additional Inherited Members

Protected Attributes inherited from vtkvmtkPolyDataManifoldStencil
double Area
int UseExtendedNeighborhood
Protected Attributes inherited from vtkvmtkStencil
vtkIdType NumberOfComponents
double * Weights
double * CenterWeight
int WeightScaling
int NegateWeights
Protected Attributes inherited from vtkvmtkNeighborhood
vtkIdType NPoints
vtkIdType * PointIds
bool IsBoundary
Protected Attributes inherited from vtkvmtkDataSetItem
vtkDataSet * DataSet
vtkIdType DataSetPointId
int ReallocateOnBuild

Detailed Description

Implements a uniform (unweighted) Laplacian stencil for the one-ring neighborhood of a surface mesh. point.

vtkvmtkPolyDataUmbrellaStencil builds, for each mesh point, the simplest discrete Laplacian ("umbrella") stencil: every neighbor in the point's one-ring receives an equal weight of 1/N (N being the number of neighbors), and the center point receives a weight of -1 (subject to the sign convention set by NegateWeights), so that applying the stencil yields the displacement towards the unweighted average of the neighbors. This is the cheapest and most common stencil used for surface smoothing / mesh relaxation (see vtkvmtkPolyDataStencilFlowFilter, vtkvmtkStencils).

See also
vtkvmtkPolyDataManifoldStencil, vtkvmtkStencils, vtkvmtkPolyDataStencilFlowFilter

Definition at line 42 of file vtkvmtkPolyDataUmbrellaStencil.h.

Member Typedef Documentation

◆ Superclass

Constructor & Destructor Documentation

◆ vtkvmtkPolyDataUmbrellaStencil()

vtkvmtkPolyDataUmbrellaStencil::vtkvmtkPolyDataUmbrellaStencil ( )
protected

◆ ~vtkvmtkPolyDataUmbrellaStencil()

vtkvmtkPolyDataUmbrellaStencil::~vtkvmtkPolyDataUmbrellaStencil ( )
inlineprotected

Definition at line 64 of file vtkvmtkPolyDataUmbrellaStencil.h.

64{};

Member Function Documentation

◆ New()

vtkvmtkPolyDataUmbrellaStencil * vtkvmtkPolyDataUmbrellaStencil::New ( )
static

◆ IsTypeOf()

int vtkvmtkPolyDataUmbrellaStencil::IsTypeOf ( const char * type)
static

◆ IsA()

virtual int vtkvmtkPolyDataUmbrellaStencil::IsA ( const char * type)
virtual

Reimplemented from vtkvmtkPolyDataManifoldStencil.

◆ SafeDownCast()

vtkvmtkPolyDataUmbrellaStencil * vtkvmtkPolyDataUmbrellaStencil::SafeDownCast ( vtkObjectBase * o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase * vtkvmtkPolyDataUmbrellaStencil::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkvmtkPolyDataManifoldStencil.

◆ NewInstance()

vtkvmtkPolyDataUmbrellaStencil * vtkvmtkPolyDataUmbrellaStencil::NewInstance ( ) const

◆ GetItemType()

virtual vtkIdType vtkvmtkPolyDataUmbrellaStencil::GetItemType ( )
inlineoverridevirtual

Return the stencil item type identifier (VTK_VMTK_UMBRELLA_STENCIL), used by vtkvmtkStencils/vtkvmtkItems factories to instantiate the correct stencil subclass.

Implements vtkvmtkItem.

Definition at line 53 of file vtkvmtkPolyDataUmbrellaStencil.h.

@ VTK_VMTK_UMBRELLA_STENCIL

◆ Build()

void vtkvmtkPolyDataUmbrellaStencil::Build ( )
overridevirtual

Build the umbrella stencil at the current point: populate the one-ring neighbor weights with 1/N each and the center weight with -1 (before sign/area scaling), where N is the number of one-ring neighbors.

Reimplemented from vtkvmtkPolyDataManifoldStencil.

Definition at line 33 of file vtkvmtkPolyDataUmbrellaStencil.cxx.

34 {
35 this->Superclass::Build();
36
37 this->Area = 1.0;
38 for (vtkIdType i=0; i<this->NPoints; i++)
39 {
40 this->Weights[i] = 1.0/double(this->NPoints);
41 }
42 this->CenterWeight[0] = 1.0;
43 this->ChangeWeightSign();
44 }
double * CenterWeight

◆ ScaleWithArea()

void vtkvmtkPolyDataUmbrellaStencil::ScaleWithArea ( )
inlineoverrideprotectedvirtual

Normalize the stencil's Weights/CenterWeight by the area computed by ComputeArea(), typically via the protected ScaleWithAreaFactor helper. Must be implemented by every concrete stencil subclass; called internally at the end of Build().

Implements vtkvmtkPolyDataManifoldStencil.

Definition at line 66 of file vtkvmtkPolyDataUmbrellaStencil.h.

66{};

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