|
VMTK
|
Serves as an abstract base for a weighting scheme applied to a single point's neighborhood of a data set. More...
#include <vtkvmtkStencil.h>
Public Types | |
| 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) |
| vtkvmtkStencil * | NewInstance () const |
| vtkIdType | GetNumberOfWeights () |
| void | ScaleWeights (double factor) |
| const double * | GetCenterWeightTuple () |
| virtual void | Build () override=0 |
| 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 |
| virtual vtkIdType | GetItemType ()=0 |
Static Public Member Functions | |
| 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 |
| 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 () | |
Protected Attributes | |
| 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 |
Serves as an abstract base for a weighting scheme applied to a single point's neighborhood of a data set.
vtkvmtkStencil extends vtkvmtkNeighborhood by attaching a weight to every neighbor point (and to the center point itself, via CenterWeight), supporting multiple weight components per point (NumberOfComponents) for vector-valued stencils such as gradient operators. Concrete subclasses implement Build() to compute the actual weights for a given point according to a specific numerical scheme (e.g. uniform umbrella/Laplacian weights in vtkvmtkPolyDataUmbrellaStencil, area-weighted, or finite-element/finite-volume Laplace-Beltrami weights). Weights can optionally be sign-negated (NegateWeights) and rescaled (WeightScaling, via ScaleWeights) once computed. Stencils are the per-point building blocks copied into the rows of a vtkvmtkSparseMatrix (see vtkvmtkSparseMatrixRow::CopyStencil) to assemble discrete differential operators over a mesh.
Definition at line 44 of file vtkvmtkStencil.h.
Definition at line 48 of file vtkvmtkStencil.h.
|
protected |
Definition at line 29 of file vtkvmtkStencil.cxx.
|
protected |
Definition at line 38 of file vtkvmtkStencil.cxx.
|
static |
|
virtual |
Reimplemented from vtkvmtkNeighborhood.
Reimplemented in vtkvmtkEmptyStencil, vtkvmtkPolyDataAreaWeightedUmbrellaStencil, vtkvmtkPolyDataFELaplaceBeltramiStencil, vtkvmtkPolyDataFVFELaplaceBeltramiStencil, vtkvmtkPolyDataGradientStencil, vtkvmtkPolyDataLaplaceBeltramiStencil, vtkvmtkPolyDataManifoldStencil, and vtkvmtkPolyDataUmbrellaStencil.
|
static |
|
protectedvirtual |
Reimplemented from vtkvmtkNeighborhood.
Reimplemented in vtkvmtkEmptyStencil, vtkvmtkPolyDataAreaWeightedUmbrellaStencil, vtkvmtkPolyDataFELaplaceBeltramiStencil, vtkvmtkPolyDataFVFELaplaceBeltramiStencil, vtkvmtkPolyDataGradientStencil, vtkvmtkPolyDataLaplaceBeltramiStencil, vtkvmtkPolyDataManifoldStencil, and vtkvmtkPolyDataUmbrellaStencil.
| vtkvmtkStencil * vtkvmtkStencil::NewInstance | ( | ) | const |
|
virtual |
Set/get the number of weight components stored per neighbor point (and per center weight component); 1 for a scalar stencil (e.g. Laplacian smoothing), 3 for a vector-valued stencil (e.g. gradient). Default: 1.
|
virtual |
Set/get the number of weight components stored per neighbor point (and per center weight component); 1 for a scalar stencil (e.g. Laplacian smoothing), 3 for a vector-valued stencil (e.g. gradient). Default: 1.
|
inline |
Get/set the (single-component) weight of the i-th neighbor point of the stencil (0-based index into the neighborhood's point list, as with vtkvmtkNeighborhood::GetPointId).
Definition at line 65 of file vtkvmtkStencil.h.
|
inline |
Get/set the (single-component) weight of the i-th neighbor point of the stencil (0-based index into the neighborhood's point list, as with vtkvmtkNeighborhood::GetPointId).
Definition at line 66 of file vtkvmtkStencil.h.
|
inline |
Get/set the weight of the given component of the i-th neighbor point, for multi-component stencils (see NumberOfComponents).
Definition at line 74 of file vtkvmtkStencil.h.
|
inline |
Get/set the weight of the given component of the i-th neighbor point, for multi-component stencils (see NumberOfComponents).
Definition at line 75 of file vtkvmtkStencil.h.
|
inline |
Get the total number of weight values stored for this stencil (NumberOfComponents times the number of neighbor points).
Definition at line 82 of file vtkvmtkStencil.h.
| void vtkvmtkStencil::ScaleWeights | ( | double | factor | ) |
Multiply every neighbor weight and center weight component by factor (only if WeightScaling is on; a no-op otherwise). Guards against overflow/underflow: near-zero factors zero out all weights, near-infinite factors clamp them to VTK_VMTK_LARGE_DOUBLE, and any resulting weight below VTK_VMTK_DOUBLE_TOL is snapped to zero.
Definition at line 78 of file vtkvmtkStencil.cxx.
|
inline |
Get/set the (single-component) weight assigned to the stencil's center point.
Definition at line 96 of file vtkvmtkStencil.h.
|
inline |
Get/set the (single-component) weight assigned to the stencil's center point.
Definition at line 97 of file vtkvmtkStencil.h.
|
inline |
Get a pointer to the full center-weight tuple (NumberOfComponents values).
Definition at line 103 of file vtkvmtkStencil.h.
|
inline |
Get/set the weight of the given component of the stencil's center point, for multi-component stencils (see NumberOfComponents).
Definition at line 110 of file vtkvmtkStencil.h.
|
inline |
Get/set the weight of the given component of the stencil's center point, for multi-component stencils (see NumberOfComponents).
Definition at line 111 of file vtkvmtkStencil.h.
|
overridepure virtual |
Build the stencil.
Implements vtkvmtkNeighborhood.
Implemented in vtkvmtkEmptyStencil, vtkvmtkPolyDataAreaWeightedUmbrellaStencil, vtkvmtkPolyDataGradientStencil, vtkvmtkPolyDataLaplaceBeltramiStencil, vtkvmtkPolyDataManifoldStencil, and vtkvmtkPolyDataUmbrellaStencil.
|
overridevirtual |
Standard DeepCopy method.
Reimplemented from vtkvmtkNeighborhood.
Definition at line 132 of file vtkvmtkStencil.cxx.
|
virtual |
Toggle whether ScaleWeights() actually rescales the stencil weights when called; if off, ScaleWeights() is a no-op. Default: on.
|
virtual |
Toggle whether ScaleWeights() actually rescales the stencil weights when called; if off, ScaleWeights() is a no-op. Default: on.
|
virtual |
Toggle whether ScaleWeights() actually rescales the stencil weights when called; if off, ScaleWeights() is a no-op. Default: on.
|
virtual |
Toggle whether ScaleWeights() actually rescales the stencil weights when called; if off, ScaleWeights() is a no-op. Default: on.
|
virtual |
Toggle whether neighbor weights are sign-negated by ChangeWeightSign() after being computed by a subclass's Build(); most differential-operator stencils are built with a natural sign convention and are negated here so that applying the stencil yields the desired displacement/ operator sign. Default: on.
|
virtual |
Toggle whether neighbor weights are sign-negated by ChangeWeightSign() after being computed by a subclass's Build(); most differential-operator stencils are built with a natural sign convention and are negated here so that applying the stencil yields the desired displacement/ operator sign. Default: on.
|
virtual |
Toggle whether neighbor weights are sign-negated by ChangeWeightSign() after being computed by a subclass's Build(); most differential-operator stencils are built with a natural sign convention and are negated here so that applying the stencil yields the desired displacement/ operator sign. Default: on.
|
virtual |
Toggle whether neighbor weights are sign-negated by ChangeWeightSign() after being computed by a subclass's Build(); most differential-operator stencils are built with a natural sign convention and are negated here so that applying the stencil yields the desired displacement/ operator sign. Default: on.
|
protected |
Definition at line 66 of file vtkvmtkStencil.cxx.
|
protected |
Definition at line 53 of file vtkvmtkStencil.cxx.
|
protected |
Definition at line 157 of file vtkvmtkStencil.h.
|
protected |
Definition at line 158 of file vtkvmtkStencil.h.
|
protected |
Definition at line 159 of file vtkvmtkStencil.h.
|
protected |
Definition at line 161 of file vtkvmtkStencil.h.
|
protected |
Definition at line 163 of file vtkvmtkStencil.h.