VMTK
Loading...
Searching...
No Matches
vtkvmtkStencils.cxx
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: VMTK
4 Module: $RCSfile: vtkvmtkStencils.cxx,v $
5 Language: C++
6 Date: $Date: 2005/11/15 17:39:25 $
7 Version: $Revision: 1.3 $
8
9 Copyright (c) Luca Antiga, David Steinman. All rights reserved.
10 See LICENSE file for details.
11
12 Portions of this code are covered under the VTK copyright.
13 See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm
14 for details.
15
16 This software is distributed WITHOUT ANY WARRANTY; without even
17 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
18 PURPOSE. See the above copyright notices for more information.
19
20=========================================================================*/
21
22#include "vtkvmtkStencils.h"
23
24#include "vtkObjectFactory.h"
25#include "vtkvmtkEmptyStencil.h"
31
32
34
36{
37 this->WeightScaling = 1;
38 this->NegateWeights = 1;
39 this->ReallocateOnBuild = 0;
40}
41
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 }
80
virtual void SetReallocateOnBuild(int)
static vtkvmtkEmptyStencil * New()
Serves as the base class for constructing neighborhoods and stencils from a set of points.
Definition vtkvmtkItem.h:42
static vtkvmtkPolyDataAreaWeightedUmbrellaStencil * New()
static vtkvmtkPolyDataFELaplaceBeltramiStencil * New()
static vtkvmtkPolyDataFVFELaplaceBeltramiStencil * New()
static vtkvmtkPolyDataGradientStencil * New()
static vtkvmtkPolyDataUmbrellaStencil * New()
Serves as an abstract base for a weighting scheme applied to a single point's neighborhood of a data ...
virtual void SetWeightScaling(int)
virtual void SetNegateWeights(int)
Create an empty, umbrella, area weighted umbrella, finite-element LP, or finite-volume finite-element...
virtual vtkvmtkItem * InstantiateNewItem(int itemType) override
@ VTK_VMTK_AREA_WEIGHTED_UMBRELLA_STENCIL
@ VTK_VMTK_EMPTY_STENCIL
@ VTK_VMTK_FE_LAPLACE_BELTRAMI_STENCIL
@ VTK_VMTK_FVFE_LAPLACE_BELTRAMI_STENCIL
@ VTK_VMTK_GRADIENT_STENCIL
@ VTK_VMTK_UMBRELLA_STENCIL
vtkStandardNewMacro(vtkvmtkStencils)