VMTK
Loading...
Searching...
No Matches
vtkvmtkStencil.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: VMTK
4
5 Copyright (c) Luca Antiga, David Steinman. All rights reserved.
6 See LICENSE file for details.
7
8 Portions of this code are covered under the VTK copyright.
9 See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm
10 for details.
11
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
15
16=========================================================================*/
35
36#ifndef __vtkvmtkStencil_h
37#define __vtkvmtkStencil_h
38
39#include "vtkObject.h"
40#include "vtkvmtkNeighborhood.h"
41//#include "vtkvmtkDifferentialGeometryWin32Header.h"
42#include "vtkvmtkWin32Header.h"
43
44class VTK_VMTK_DIFFERENTIAL_GEOMETRY_EXPORT vtkvmtkStencil : public vtkvmtkNeighborhood
45{
46public:
47
49
51
56 vtkSetMacro(NumberOfComponents,vtkIdType);
57 vtkGetMacro(NumberOfComponents,vtkIdType);
59
61
65 double GetWeight(vtkIdType i) {return this->Weights[i];};
66 void SetWeight(vtkIdType i, double weight) {this->Weights[i] = weight;};
68
70
74 double GetWeight(vtkIdType i, vtkIdType component) {return this->Weights[this->NumberOfComponents * i + component];};
75 void SetWeight(vtkIdType i, vtkIdType component, double weight) {this->Weights[this->NumberOfComponents * i + component] = weight;};
77
82 vtkIdType GetNumberOfWeights() {return this->NumberOfComponents * this->NPoints;};
83
90 void ScaleWeights(double factor);
91
93
96 double GetCenterWeight() {return this->CenterWeight[0];};
97 void SetCenterWeight(double weight) {this->CenterWeight[0] = weight;};
99
103 const double* GetCenterWeightTuple() {return this->CenterWeight;};
104
106
110 double GetCenterWeight(vtkIdType component) {return this->CenterWeight[component];};
111 void SetCenterWeight(vtkIdType component, double weightComponent) {this->CenterWeight[component] = weightComponent;};
113
114// vtkSetMacro(CenterWeight,double);
115// vtkGetMacro(CenterWeight,double);
116
120 virtual void Build() override = 0;
121
125 virtual void DeepCopy(vtkvmtkItem *src) override;
126
128
132 vtkSetMacro(WeightScaling,int)
133 vtkGetMacro(WeightScaling,int)
134 vtkBooleanMacro(WeightScaling,int)
136
138
144 vtkSetMacro(NegateWeights,int)
145 vtkGetMacro(NegateWeights,int)
146 vtkBooleanMacro(NegateWeights,int)
148
149protected:
152
153 void ResizePointList(vtkIdType ptId, int size);
154
155 void ChangeWeightSign();
156
158 double* Weights;
160
162
164
165private:
166 vtkvmtkStencil(const vtkvmtkStencil&); // Not implemented.
167 void operator=(const vtkvmtkStencil&); // Not implemented.
168};
169
170#endif
171
virtual void DeepCopy(vtkvmtkItem *src) override
vtkIdType GetNumberOfWeights()
const double * GetCenterWeightTuple()
vtkIdType NumberOfComponents
void SetCenterWeight(vtkIdType component, double weightComponent)
double * CenterWeight
void ResizePointList(vtkIdType ptId, int size)
void SetWeight(vtkIdType i, double weight)
double GetCenterWeight(vtkIdType component)
void SetCenterWeight(double weight)
void SetWeight(vtkIdType i, vtkIdType component, double weight)
virtual void Build() override=0
double GetWeight(vtkIdType i, vtkIdType component)
double GetCenterWeight()
double GetWeight(vtkIdType i)