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

Create an empty, umbrella, area weighted umbrella, finite-element LP, or finite-volume finite-element stencil for a particular data set. More...

#include <vtkvmtkStencils.h>

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

Public Types

typedef vtkvmtkItems Superclass
Public Types inherited from vtkvmtkDataSetItems
typedef vtkvmtkItems Superclass
Public Types inherited from vtkvmtkItems
typedef vtkObject Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkvmtkStencils * NewInstance () const
void SetStencilTypeToEmptyStencil ()
void SetStencilTypeToUmbrellaStencil ()
void SetStencilTypeToAreaWeightedUmbrellaStencil ()
void SetStencilTypeToFELaplaceBeltramiStencil ()
void SetStencilTypeToFVFELaplaceBeltramiStencil ()
void SetStencilTypeToGradientStencil ()
vtkvmtkStencil * GetStencil (vtkIdType ptId)
void AllocateStencil (vtkIdType i, vtkIdType stencilType)
void SetNumberOfStencils (vtkIdType numberOfStencils)
vtkIdType GetNumberOfStencils ()
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 vtkvmtkDataSetItems
vtkvmtkDataSetItems * NewInstance () const
void Build ()
void SetDataSet (vtkDataSet *dataSet)
vtkDataSet * GetDataSet ()
virtual void SetReallocateOnBuild (int)
virtual int GetReallocateOnBuild ()
virtual void ReallocateOnBuildOn ()
virtual void ReallocateOnBuildOff ()
Public Member Functions inherited from vtkvmtkItems
vtkvmtkItems * NewInstance () const
void Allocate (vtkIdType numItems, vtkIdType ext=1000)
vtkvmtkItem * GetItem (vtkIdType id)
void Squeeze ()
void Reset ()
void Initialize ()
void ReleaseArray ()
void AllocateItem (vtkIdType i, vtkIdType itemType)
void DeepCopy (vtkvmtkItems *src)
void ShallowCopy (vtkvmtkItems *src)
virtual void SetItemType (int)
virtual int GetItemType ()
void SetNumberOfItems (vtkIdType numberOfItems)
vtkIdType GetNumberOfItems ()

Static Public Member Functions

static vtkvmtkStencils * New ()
static int IsTypeOf (const char *type)
static vtkvmtkStencils * SafeDownCast (vtkObjectBase *o)
Static Public Member Functions inherited from vtkvmtkDataSetItems
static int IsTypeOf (const char *type)
static vtkvmtkDataSetItems * SafeDownCast (vtkObjectBase *o)
Static Public Member Functions inherited from vtkvmtkItems
static int IsTypeOf (const char *type)
static vtkvmtkItems * SafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 vtkvmtkStencils ()
 ~vtkvmtkStencils ()
virtual vtkvmtkItem * InstantiateNewItem (int itemType) override
Protected Member Functions inherited from vtkvmtkDataSetItems
 vtkvmtkDataSetItems ()
 ~vtkvmtkDataSetItems ()
Protected Member Functions inherited from vtkvmtkItems
 vtkvmtkItems ()
 ~vtkvmtkItems ()
vtkvmtkItem ** Resize (vtkIdType sz)

Protected Attributes

int WeightScaling
int NegateWeights
Protected Attributes inherited from vtkvmtkDataSetItems
vtkDataSet * DataSet
int ReallocateOnBuild
Protected Attributes inherited from vtkvmtkItems
vtkvmtkItem ** Array
vtkIdType Size
vtkIdType MaxId
vtkIdType Extend
int ItemType

Detailed Description

Create an empty, umbrella, area weighted umbrella, finite-element LP, or finite-volume finite-element stencil for a particular data set.

A vtkvmtkItems collection specialized to hold one vtkvmtkStencil per point of a data set (see vtkvmtkDataSetItems::SetDataSet), instantiating the concrete stencil subclass requested by SetItemType (or the SetStencilTypeTo* convenience methods) for each point. WeightScaling and NegateWeights are propagated to every stencil instantiated afterwards, mirroring the like-named flags on vtkvmtkStencil itself.

See also
vtkvmtkStencil, vtkvmtkDataSetItems

Definition at line 42 of file vtkvmtkStencils.h.

Member Typedef Documentation

◆ Superclass

Definition at line 47 of file vtkvmtkStencils.h.

Constructor & Destructor Documentation

◆ vtkvmtkStencils()

vtkvmtkStencils::vtkvmtkStencils ( )
protected

Definition at line 35 of file vtkvmtkStencils.cxx.

36{
37 this->WeightScaling = 1;
38 this->NegateWeights = 1;
39 this->ReallocateOnBuild = 0;
40}

◆ ~vtkvmtkStencils()

vtkvmtkStencils::~vtkvmtkStencils ( )
inlineprotected

Definition at line 129 of file vtkvmtkStencils.h.

129{};

Member Function Documentation

◆ New()

vtkvmtkStencils * vtkvmtkStencils::New ( )
static

◆ IsTypeOf()

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

◆ IsA()

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

Reimplemented from vtkvmtkDataSetItems.

◆ SafeDownCast()

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

◆ NewInstanceInternal()

virtual vtkObjectBase * vtkvmtkStencils::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkvmtkDataSetItems.

◆ NewInstance()

vtkvmtkStencils * vtkvmtkStencils::NewInstance ( ) const

◆ SetStencilTypeToEmptyStencil()

void vtkvmtkStencils::SetStencilTypeToEmptyStencil ( )
inline

Convenience method: subsequent AllocateStencil/AllocateItem calls create vtkvmtkEmptyStencil instances.

Definition at line 53 of file vtkvmtkStencils.h.

virtual void SetItemType(int)
@ VTK_VMTK_EMPTY_STENCIL

◆ SetStencilTypeToUmbrellaStencil()

void vtkvmtkStencils::SetStencilTypeToUmbrellaStencil ( )
inline

Convenience method: subsequent AllocateStencil/AllocateItem calls create vtkvmtkPolyDataUmbrellaStencil instances (uniform Laplacian weights).

Definition at line 59 of file vtkvmtkStencils.h.

@ VTK_VMTK_UMBRELLA_STENCIL

◆ SetStencilTypeToAreaWeightedUmbrellaStencil()

void vtkvmtkStencils::SetStencilTypeToAreaWeightedUmbrellaStencil ( )
inline

Convenience method: subsequent AllocateStencil/AllocateItem calls create vtkvmtkPolyDataAreaWeightedUmbrellaStencil instances.

Definition at line 65 of file vtkvmtkStencils.h.

◆ SetStencilTypeToFELaplaceBeltramiStencil()

void vtkvmtkStencils::SetStencilTypeToFELaplaceBeltramiStencil ( )
inline

Convenience method: subsequent AllocateStencil/AllocateItem calls create vtkvmtkPolyDataFELaplaceBeltramiStencil instances.

Definition at line 71 of file vtkvmtkStencils.h.

◆ SetStencilTypeToFVFELaplaceBeltramiStencil()

void vtkvmtkStencils::SetStencilTypeToFVFELaplaceBeltramiStencil ( )
inline

Convenience method: subsequent AllocateStencil/AllocateItem calls create vtkvmtkPolyDataFVFELaplaceBeltramiStencil instances.

Definition at line 77 of file vtkvmtkStencils.h.

◆ SetStencilTypeToGradientStencil()

void vtkvmtkStencils::SetStencilTypeToGradientStencil ( )
inline

Convenience method: subsequent AllocateStencil/AllocateItem calls create vtkvmtkPolyDataGradientStencil instances.

Definition at line 83 of file vtkvmtkStencils.h.

@ VTK_VMTK_GRADIENT_STENCIL

◆ GetStencil()

vtkvmtkStencil * vtkvmtkStencils::GetStencil ( vtkIdType ptId)
inline

Get a stencil given a point id.

Definition at line 89 of file vtkvmtkStencils.h.

89{return (vtkvmtkStencil*)this->Array[ptId];};
vtkvmtkItem ** Array

◆ SetNumberOfStencils()

void vtkvmtkStencils::SetNumberOfStencils ( vtkIdType numberOfStencils)
inline

Set/Get the number of stencils held by this collection (one per data set point).

Definition at line 95 of file vtkvmtkStencils.h.

95{ this->SetNumberOfItems(numberOfStencils);};
void SetNumberOfItems(vtkIdType numberOfItems)

◆ GetNumberOfStencils()

vtkIdType vtkvmtkStencils::GetNumberOfStencils ( )
inline

Set/Get the number of stencils held by this collection (one per data set point).

Definition at line 96 of file vtkvmtkStencils.h.

96{return this->GetNumberOfItems();};
vtkIdType GetNumberOfItems()

◆ AllocateStencil()

void vtkvmtkStencils::AllocateStencil ( vtkIdType i,
vtkIdType stencilType )
inline

Instantiate the stencil for point i as the given stencilType (one of the VTK_VMTK_*_STENCIL constants, or use the SetStencilTypeTo* convenience methods beforehand and call AllocateItem(i, GetItemType()) via the base class instead).

Definition at line 104 of file vtkvmtkStencils.h.

104{this->AllocateItem(i,stencilType);};
void AllocateItem(vtkIdType i, vtkIdType itemType)

◆ SetWeightScaling()

virtual void vtkvmtkStencils::SetWeightScaling ( int )
virtual

Toggle whether ScaleWeights() rescales stencil weights, propagated to every stencil instantiated by this collection afterwards. See vtkvmtkStencil::WeightScaling. Default: on.

◆ GetWeightScaling()

virtual int vtkvmtkStencils::GetWeightScaling ( )
virtual

Toggle whether ScaleWeights() rescales stencil weights, propagated to every stencil instantiated by this collection afterwards. See vtkvmtkStencil::WeightScaling. Default: on.

◆ WeightScalingOn()

virtual void vtkvmtkStencils::WeightScalingOn ( )
virtual

Toggle whether ScaleWeights() rescales stencil weights, propagated to every stencil instantiated by this collection afterwards. See vtkvmtkStencil::WeightScaling. Default: on.

◆ WeightScalingOff()

virtual void vtkvmtkStencils::WeightScalingOff ( )
virtual

Toggle whether ScaleWeights() rescales stencil weights, propagated to every stencil instantiated by this collection afterwards. See vtkvmtkStencil::WeightScaling. Default: on.

◆ SetNegateWeights()

virtual void vtkvmtkStencils::SetNegateWeights ( int )
virtual

Toggle whether stencil weights are sign-negated after being computed, propagated to every stencil instantiated by this collection afterwards. See vtkvmtkStencil::NegateWeights. Default: on.

◆ GetNegateWeights()

virtual int vtkvmtkStencils::GetNegateWeights ( )
virtual

Toggle whether stencil weights are sign-negated after being computed, propagated to every stencil instantiated by this collection afterwards. See vtkvmtkStencil::NegateWeights. Default: on.

◆ NegateWeightsOn()

virtual void vtkvmtkStencils::NegateWeightsOn ( )
virtual

Toggle whether stencil weights are sign-negated after being computed, propagated to every stencil instantiated by this collection afterwards. See vtkvmtkStencil::NegateWeights. Default: on.

◆ NegateWeightsOff()

virtual void vtkvmtkStencils::NegateWeightsOff ( )
virtual

Toggle whether stencil weights are sign-negated after being computed, propagated to every stencil instantiated by this collection afterwards. See vtkvmtkStencil::NegateWeights. Default: on.

◆ InstantiateNewItem()

vtkvmtkItem * vtkvmtkStencils::InstantiateNewItem ( int itemType)
overrideprotectedvirtual

Implements vtkvmtkItems.

Definition at line 42 of file vtkvmtkStencils.cxx.

43 {
44 vtkvmtkStencil* newStencil;
45
46 switch(itemType)
47 {
49 newStencil = vtkvmtkEmptyStencil::New();
50 break;
53 break;
56 break;
59 break;
62 break;
65 break;
66 default:
67 vtkErrorMacro(<<"Invalid stencil type");
68 return NULL;
69 }
70
71 newStencil->SetWeightScaling(this->WeightScaling);
72 newStencil->SetNegateWeights(this->NegateWeights);
73 newStencil->SetReallocateOnBuild(this->ReallocateOnBuild);
74
75 newStencil->Register(this);
76 newStencil->Delete();
77
78 return newStencil;
79 }
virtual void SetReallocateOnBuild(int)
static vtkvmtkEmptyStencil * New()
static vtkvmtkPolyDataAreaWeightedUmbrellaStencil * New()
static vtkvmtkPolyDataFELaplaceBeltramiStencil * New()
static vtkvmtkPolyDataFVFELaplaceBeltramiStencil * New()
static vtkvmtkPolyDataGradientStencil * New()
static vtkvmtkPolyDataUmbrellaStencil * New()
virtual void SetWeightScaling(int)
virtual void SetNegateWeights(int)

Member Data Documentation

◆ WeightScaling

int vtkvmtkStencils::WeightScaling
protected

Definition at line 133 of file vtkvmtkStencils.h.

◆ NegateWeights

int vtkvmtkStencils::NegateWeights
protected

Definition at line 135 of file vtkvmtkStencils.h.


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