VTK  9.0.1
vtkVectorNorm.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkVectorNorm.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
35 #ifndef vtkVectorNorm_h
36 #define vtkVectorNorm_h
37 
38 #define VTK_ATTRIBUTE_MODE_DEFAULT 0
39 #define VTK_ATTRIBUTE_MODE_USE_POINT_DATA 1
40 #define VTK_ATTRIBUTE_MODE_USE_CELL_DATA 2
41 
42 #include "vtkDataSetAlgorithm.h"
43 #include "vtkFiltersCoreModule.h" // For export macro
44 
45 class VTKFILTERSCORE_EXPORT vtkVectorNorm : public vtkDataSetAlgorithm
46 {
47 public:
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
54  static vtkVectorNorm* New();
55 
56  // Specify whether to normalize scalar values. If the data is normalized,
57  // then it will fall in the range [0,1].
58  vtkSetMacro(Normalize, vtkTypeBool);
59  vtkGetMacro(Normalize, vtkTypeBool);
60  vtkBooleanMacro(Normalize, vtkTypeBool);
61 
63 
72  vtkSetMacro(AttributeMode, int);
73  vtkGetMacro(AttributeMode, int);
74  void SetAttributeModeToDefault() { this->SetAttributeMode(VTK_ATTRIBUTE_MODE_DEFAULT); }
76  {
77  this->SetAttributeMode(VTK_ATTRIBUTE_MODE_USE_POINT_DATA);
78  }
80  const char* GetAttributeModeAsString();
82 
83 protected:
84  vtkVectorNorm();
85  ~vtkVectorNorm() override {}
86 
88 
89  vtkTypeBool Normalize; // normalize 0<=n<=1 if true.
90  int AttributeMode; // control whether to use point or cell data, or both
91 
92 private:
93  vtkVectorNorm(const vtkVectorNorm&) = delete;
94  void operator=(const vtkVectorNorm&) = delete;
95 };
96 
97 #endif
vtkVectorNorm::AttributeMode
int AttributeMode
Definition: vtkVectorNorm.h:90
vtkVectorNorm::SetAttributeModeToDefault
void SetAttributeModeToDefault()
Definition: vtkVectorNorm.h:74
VTK_ATTRIBUTE_MODE_USE_CELL_DATA
#define VTK_ATTRIBUTE_MODE_USE_CELL_DATA
Definition: vtkVectorNorm.h:40
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
VTK_ATTRIBUTE_MODE_USE_POINT_DATA
#define VTK_ATTRIBUTE_MODE_USE_POINT_DATA
Definition: vtkVectorNorm.h:39
vtkVectorNorm::SetAttributeModeToUseCellData
void SetAttributeModeToUseCellData()
Definition: vtkVectorNorm.h:79
vtkDataSetAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
Definition: vtkDataSetAlgorithm.h:176
vtkVectorNorm::SetAttributeModeToUsePointData
void SetAttributeModeToUsePointData()
Definition: vtkVectorNorm.h:75
vtkDataSetAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkDataSetAlgorithm.h:48
VTK_ATTRIBUTE_MODE_DEFAULT
#define VTK_ATTRIBUTE_MODE_DEFAULT
Definition: vtkVectorNorm.h:38
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkDataSetAlgorithm::New
static vtkDataSetAlgorithm * New()
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkDataSetAlgorithm.h
vtkDataSetAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkVectorNorm::~vtkVectorNorm
~vtkVectorNorm() override
Definition: vtkVectorNorm.h:85
vtkVectorNorm
generate scalars from Euclidean norm of vectors
Definition: vtkVectorNorm.h:45
vtkVectorNorm::Normalize
vtkTypeBool Normalize
Definition: vtkVectorNorm.h:89
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69