VTK  9.4.20241209
vtkExtractTensorComponents.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
43#ifndef vtkExtractTensorComponents_h
44#define vtkExtractTensorComponents_h
45
46#include "vtkDataSetAlgorithm.h"
47#include "vtkFiltersExtractionModule.h" // For export macro
48
49#define VTK_EXTRACT_COMPONENT 0
50#define VTK_EXTRACT_EFFECTIVE_STRESS 1
51#define VTK_EXTRACT_DETERMINANT 2
52#define VTK_EXTRACT_NONNEGATIVE_DETERMINANT 3
53#define VTK_EXTRACT_TRACE 4
54
55VTK_ABI_NAMESPACE_BEGIN
56class VTKFILTERSEXTRACTION_EXPORT vtkExtractTensorComponents : public vtkDataSetAlgorithm
57{
58public:
60
64 void PrintSelf(ostream& os, vtkIndent indent) override;
66
72
74
77 vtkSetMacro(PassTensorsToOutput, vtkTypeBool);
78 vtkGetMacro(PassTensorsToOutput, vtkTypeBool);
79 vtkBooleanMacro(PassTensorsToOutput, vtkTypeBool);
81
83
86 vtkSetMacro(ExtractScalars, vtkTypeBool);
87 vtkGetMacro(ExtractScalars, vtkTypeBool);
88 vtkBooleanMacro(ExtractScalars, vtkTypeBool);
90
92
95 vtkSetVector2Macro(ScalarComponents, int);
96 vtkGetVectorMacro(ScalarComponents, int, 2);
98
100
107 vtkSetMacro(ScalarMode, int);
108 vtkGetMacro(ScalarMode, int);
109 void SetScalarModeToComponent() { this->SetScalarMode(VTK_EXTRACT_COMPONENT); }
113 {
114 this->SetScalarMode(VTK_EXTRACT_NONNEGATIVE_DETERMINANT);
115 }
116 void SetScalarModeToTrace() { this->SetScalarMode(VTK_EXTRACT_TRACE); }
117 void ScalarIsComponent() { this->SetScalarMode(VTK_EXTRACT_COMPONENT); }
119 void ScalarIsDeterminant() { this->SetScalarMode(VTK_EXTRACT_DETERMINANT); }
121 {
122 this->SetScalarMode(VTK_EXTRACT_NONNEGATIVE_DETERMINANT);
123 }
124 void ScalarIsTrace() { this->SetScalarMode(VTK_EXTRACT_TRACE); }
126
128
131 vtkSetMacro(ExtractVectors, vtkTypeBool);
132 vtkGetMacro(ExtractVectors, vtkTypeBool);
133 vtkBooleanMacro(ExtractVectors, vtkTypeBool);
135
137
141 vtkSetVector6Macro(VectorComponents, int);
142 vtkGetVectorMacro(VectorComponents, int, 6);
144
146
149 vtkSetMacro(ExtractNormals, vtkTypeBool);
150 vtkGetMacro(ExtractNormals, vtkTypeBool);
151 vtkBooleanMacro(ExtractNormals, vtkTypeBool);
153
155
159 vtkSetMacro(NormalizeNormals, vtkTypeBool);
160 vtkGetMacro(NormalizeNormals, vtkTypeBool);
161 vtkBooleanMacro(NormalizeNormals, vtkTypeBool);
163
165
169 vtkSetVector6Macro(NormalComponents, int);
170 vtkGetVectorMacro(NormalComponents, int, 6);
172
174
177 vtkSetMacro(ExtractTCoords, vtkTypeBool);
178 vtkGetMacro(ExtractTCoords, vtkTypeBool);
179 vtkBooleanMacro(ExtractTCoords, vtkTypeBool);
181
183
186 vtkSetClampMacro(NumberOfTCoords, int, 1, 3);
187 vtkGetMacro(NumberOfTCoords, int);
189
191
196 vtkSetVector6Macro(TCoordComponents, int);
197 vtkGetVectorMacro(TCoordComponents, int, 6);
199
201
209 vtkSetMacro(OutputPrecision, int);
210 vtkGetMacro(OutputPrecision, int);
212
213protected:
215 ~vtkExtractTensorComponents() override = default;
216
218
220
225
227 int ScalarComponents[2];
228
229 int VectorComponents[6];
230
232 int NormalComponents[6];
233
235 int TCoordComponents[6];
236
238
239private:
241 void operator=(const vtkExtractTensorComponents&) = delete;
242};
243
244VTK_ABI_NAMESPACE_END
245#endif
Superclass for algorithms that produce output of the same type as input.
extract parts of tensor and create a scalar, vector, normal, or texture coordinates.
void SetScalarModeToEffectiveStress()
Specify how to extract the scalar.
void SetScalarModeToDeterminant()
Specify how to extract the scalar.
void ScalarIsTrace()
Specify how to extract the scalar.
void ScalarIsNonNegativeDeterminant()
Specify how to extract the scalar.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for obtaining type information, and printing.
void SetScalarModeToNonNegativeDeterminant()
Specify how to extract the scalar.
void ScalarIsComponent()
Specify how to extract the scalar.
static vtkExtractTensorComponents * New()
Construct object to extract nothing and to not pass tensor data through the pipeline.
void ScalarIsDeterminant()
Specify how to extract the scalar.
void ScalarIsEffectiveStress()
Specify how to extract the scalar.
~vtkExtractTensorComponents() override=default
void SetScalarModeToTrace()
Specify how to extract the scalar.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
void SetScalarModeToComponent()
Specify how to extract the scalar.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_EXTRACT_EFFECTIVE_STRESS
#define VTK_EXTRACT_DETERMINANT
#define VTK_EXTRACT_NONNEGATIVE_DETERMINANT
#define VTK_EXTRACT_COMPONENT
#define VTK_EXTRACT_TRACE