VTK  9.6.1
vtkVectorNorm.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
25
26#ifndef vtkVectorNorm_h
27#define vtkVectorNorm_h
28
29#define VTK_ATTRIBUTE_MODE_DEFAULT 0
30#define VTK_ATTRIBUTE_MODE_USE_POINT_DATA 1
31#define VTK_ATTRIBUTE_MODE_USE_CELL_DATA 2
32
33#include "vtkDataSetAlgorithm.h"
34#include "vtkFiltersCoreModule.h" // For export macro
35#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
36
37VTK_ABI_NAMESPACE_BEGIN
38class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkVectorNorm : public vtkDataSetAlgorithm
39{
40public:
42 void PrintSelf(ostream& os, vtkIndent indent) override;
43
47 static vtkVectorNorm* New();
48
49 // Specify whether to normalize scalar values. If the data is normalized,
50 // then it will fall in the range [0,1].
51 vtkSetMacro(Normalize, vtkTypeBool);
52 vtkGetMacro(Normalize, vtkTypeBool);
53 vtkBooleanMacro(Normalize, vtkTypeBool);
54
56
65 vtkSetMacro(AttributeMode, int);
66 vtkGetMacro(AttributeMode, int);
75
76protected:
78 ~vtkVectorNorm() override = default;
79
81
82 vtkTypeBool Normalize; // normalize 0<=n<=1 if true.
83 int AttributeMode; // control whether to use point or cell data, or both
84
85private:
86 vtkVectorNorm(const vtkVectorNorm&) = delete;
87 void operator=(const vtkVectorNorm&) = delete;
88};
89
90VTK_ABI_NAMESPACE_END
91#endif
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
vtkTypeBool Normalize
void SetAttributeModeToUsePointData()
Control how the filter works to generate scalar data from the input vector data.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
const char * GetAttributeModeAsString()
Control how the filter works to generate scalar data from the input vector data.
virtual void SetAttributeMode(int)
Control how the filter works to generate scalar data from the input vector data.
void SetAttributeModeToUseCellData()
Control how the filter works to generate scalar data from the input vector data.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetAttributeModeToDefault()
Control how the filter works to generate scalar data from the input vector data.
static vtkVectorNorm * New()
Construct with normalize flag off.
~vtkVectorNorm() override=default
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_ATTRIBUTE_MODE_USE_POINT_DATA
#define VTK_ATTRIBUTE_MODE_DEFAULT
#define VTK_ATTRIBUTE_MODE_USE_CELL_DATA
#define VTK_MARSHALAUTO