VTK: Filters/Extraction/vtkExtractTensorComponents.h Source File

| VTK 9.3.1

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
55 VTK_ABI_NAMESPACE_BEGIN
56 class VTKFILTERSEXTRACTION_EXPORT vtkExtractTensorComponents : public vtkDataSetAlgorithm
57 {
58 public:
60
63 vtkTypeMacro(vtkExtractTensorComponents, vtkDataSetAlgorithm);
64 void PrintSelf(ostream& os, vtkIndent indent) override;
66
71 static vtkExtractTensorComponents* New();
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); }
110 void SetScalarModeToEffectiveStress() { this->SetScalarMode(VTK_EXTRACT_EFFECTIVE_STRESS); }
111 void SetScalarModeToDeterminant() { this->SetScalarMode(VTK_EXTRACT_DETERMINANT); }
112 void SetScalarModeToNonNegativeDeterminant()
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); }
118 void ScalarIsEffectiveStress() { this->SetScalarMode(VTK_EXTRACT_EFFECTIVE_STRESS); }
119 void ScalarIsDeterminant() { this->SetScalarMode(VTK_EXTRACT_DETERMINANT); }
120 void ScalarIsNonNegativeDeterminant()
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
213 protected:
214 vtkExtractTensorComponents();
215 ~vtkExtractTensorComponents() override = default;
216
217 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
218
219 vtkTypeBool PassTensorsToOutput;
220
221 vtkTypeBool ExtractScalars;
222 vtkTypeBool ExtractVectors;
223 vtkTypeBool ExtractNormals;
224 vtkTypeBool ExtractTCoords;
225
226 int ScalarMode;
227 int ScalarComponents[2];
228
229 int VectorComponents[6];
230
231 vtkTypeBool NormalizeNormals;
232 int NormalComponents[6];
233
234 int NumberOfTCoords;
235 int TCoordComponents[6];
236
237 int OutputPrecision;
238
239 private:
240 vtkExtractTensorComponents(const vtkExtractTensorComponents&) = delete;
241 void operator=(const vtkExtractTensorComponents&) = delete;
242 };
243
244 VTK_ABI_NAMESPACE_END
245 #endif
vtkDataSetAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkDataSetAlgorithm.h:38
vtkExtractTensorComponents
extract parts of tensor and create a scalar, vector, normal, or texture coordinates.
Definition: vtkExtractTensorComponents.h:57
vtkExtractTensorComponents::SetScalarModeToEffectiveStress
void SetScalarModeToEffectiveStress()
Specify how to extract the scalar.
Definition: vtkExtractTensorComponents.h:110
vtkExtractTensorComponents::SetScalarModeToDeterminant
void SetScalarModeToDeterminant()
Specify how to extract the scalar.
Definition: vtkExtractTensorComponents.h:111
vtkExtractTensorComponents::ScalarIsTrace
void ScalarIsTrace()
Specify how to extract the scalar.
Definition: vtkExtractTensorComponents.h:124
vtkExtractTensorComponents::vtkExtractTensorComponents
vtkExtractTensorComponents()
vtkExtractTensorComponents::ScalarIsNonNegativeDeterminant
void ScalarIsNonNegativeDeterminant()
Specify how to extract the scalar.
Definition: vtkExtractTensorComponents.h:120
vtkExtractTensorComponents::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for obtaining type information, and printing.
vtkExtractTensorComponents::NumberOfTCoords
int NumberOfTCoords
Definition: vtkExtractTensorComponents.h:234
vtkExtractTensorComponents::New
static vtkExtractTensorComponents * New()
Construct object to extract nothing and to not pass tensor data through the pipeline.
vtkExtractTensorComponents::SetScalarModeToNonNegativeDeterminant
void SetScalarModeToNonNegativeDeterminant()
Specify how to extract the scalar.
Definition: vtkExtractTensorComponents.h:112
vtkExtractTensorComponents::ExtractTCoords
vtkTypeBool ExtractTCoords
Definition: vtkExtractTensorComponents.h:224
vtkExtractTensorComponents::ScalarIsComponent
void ScalarIsComponent()
Specify how to extract the scalar.
Definition: vtkExtractTensorComponents.h:117
vtkExtractTensorComponents::ExtractVectors
vtkTypeBool ExtractVectors
Definition: vtkExtractTensorComponents.h:222
vtkExtractTensorComponents::ExtractNormals
vtkTypeBool ExtractNormals
Definition: vtkExtractTensorComponents.h:223
vtkExtractTensorComponents::ScalarIsDeterminant
void ScalarIsDeterminant()
Specify how to extract the scalar.
Definition: vtkExtractTensorComponents.h:119
vtkExtractTensorComponents::ScalarIsEffectiveStress
void ScalarIsEffectiveStress()
Specify how to extract the scalar.
Definition: vtkExtractTensorComponents.h:118
vtkExtractTensorComponents::OutputPrecision
int OutputPrecision
Definition: vtkExtractTensorComponents.h:237
vtkExtractTensorComponents::ScalarMode
int ScalarMode
Definition: vtkExtractTensorComponents.h:226
vtkExtractTensorComponents::NormalizeNormals
vtkTypeBool NormalizeNormals
Definition: vtkExtractTensorComponents.h:231
vtkExtractTensorComponents::~vtkExtractTensorComponents
~vtkExtractTensorComponents() override=default
vtkExtractTensorComponents::ExtractScalars
vtkTypeBool ExtractScalars
Definition: vtkExtractTensorComponents.h:221
vtkExtractTensorComponents::SetScalarModeToTrace
void SetScalarModeToTrace()
Specify how to extract the scalar.
Definition: vtkExtractTensorComponents.h:116
vtkExtractTensorComponents::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
vtkExtractTensorComponents::SetScalarModeToComponent
void SetScalarModeToComponent()
Specify how to extract the scalar.
Definition: vtkExtractTensorComponents.h:109
vtkExtractTensorComponents::PassTensorsToOutput
vtkTypeBool PassTensorsToOutput
Definition: vtkExtractTensorComponents.h:219
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkDataSetAlgorithm.h
VTK_EXTRACT_EFFECTIVE_STRESS
#define VTK_EXTRACT_EFFECTIVE_STRESS
Definition: vtkExtractTensorComponents.h:50
VTK_EXTRACT_DETERMINANT
#define VTK_EXTRACT_DETERMINANT
Definition: vtkExtractTensorComponents.h:51
VTK_EXTRACT_NONNEGATIVE_DETERMINANT
#define VTK_EXTRACT_NONNEGATIVE_DETERMINANT
Definition: vtkExtractTensorComponents.h:52
VTK_EXTRACT_COMPONENT
#define VTK_EXTRACT_COMPONENT
Definition: vtkExtractTensorComponents.h:49
VTK_EXTRACT_TRACE
#define VTK_EXTRACT_TRACE
Definition: vtkExtractTensorComponents.h:53