VTK  9.2.6
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 =========================================================================*/
38 #ifndef vtkVectorNorm_h
39 #define vtkVectorNorm_h
40 
41 #define VTK_ATTRIBUTE_MODE_DEFAULT 0
42 #define VTK_ATTRIBUTE_MODE_USE_POINT_DATA 1
43 #define VTK_ATTRIBUTE_MODE_USE_CELL_DATA 2
44 
45 #include "vtkDataSetAlgorithm.h"
46 #include "vtkFiltersCoreModule.h" // For export macro
47 
48 class VTKFILTERSCORE_EXPORT vtkVectorNorm : public vtkDataSetAlgorithm
49 {
50 public:
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
57  static vtkVectorNorm* New();
58 
59  // Specify whether to normalize scalar values. If the data is normalized,
60  // then it will fall in the range [0,1].
61  vtkSetMacro(Normalize, vtkTypeBool);
62  vtkGetMacro(Normalize, vtkTypeBool);
63  vtkBooleanMacro(Normalize, vtkTypeBool);
64 
66 
75  vtkSetMacro(AttributeMode, int);
76  vtkGetMacro(AttributeMode, int);
77  void SetAttributeModeToDefault() { this->SetAttributeMode(VTK_ATTRIBUTE_MODE_DEFAULT); }
79  {
80  this->SetAttributeMode(VTK_ATTRIBUTE_MODE_USE_POINT_DATA);
81  }
83  const char* GetAttributeModeAsString();
85 
86 protected:
87  vtkVectorNorm();
88  ~vtkVectorNorm() override = default;
89 
91 
92  vtkTypeBool Normalize; // normalize 0<=n<=1 if true.
93  int AttributeMode; // control whether to use point or cell data, or both
94 
95 private:
96  vtkVectorNorm(const vtkVectorNorm&) = delete;
97  void operator=(const vtkVectorNorm&) = delete;
98 };
99 
100 #endif
void SetAttributeModeToUsePointData()
Control how the filter works to generate scalar data from the input vector data.
Definition: vtkVectorNorm.h:78
void SetAttributeModeToUseCellData()
Control how the filter works to generate scalar data from the input vector data.
Definition: vtkVectorNorm.h:82
Store vtkAlgorithm input/output information.
#define VTK_ATTRIBUTE_MODE_USE_CELL_DATA
Definition: vtkVectorNorm.h:43
#define VTK_ATTRIBUTE_MODE_USE_POINT_DATA
Definition: vtkVectorNorm.h:42
generate scalars from Euclidean norm of vectors
Definition: vtkVectorNorm.h:48
#define VTK_ATTRIBUTE_MODE_DEFAULT
Definition: vtkVectorNorm.h:41
int vtkTypeBool
Definition: vtkABI.h:69
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
Store zero or more vtkInformation instances.
vtkTypeBool Normalize
Definition: vtkVectorNorm.h:92
Superclass for algorithms that produce output of the same type as input.
static vtkDataSetAlgorithm * New()
void SetAttributeModeToDefault()
Control how the filter works to generate scalar data from the input vector data.
Definition: vtkVectorNorm.h:77