VTK  9.2.6
vtkExtractTensorComponents.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkExtractTensorComponents.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=========================================================================*/
55#ifndef vtkExtractTensorComponents_h
56#define vtkExtractTensorComponents_h
57
58#include "vtkDataSetAlgorithm.h"
59#include "vtkFiltersExtractionModule.h" // For export macro
60
61#define VTK_EXTRACT_COMPONENT 0
62#define VTK_EXTRACT_EFFECTIVE_STRESS 1
63#define VTK_EXTRACT_DETERMINANT 2
64#define VTK_EXTRACT_NONNEGATIVE_DETERMINANT 3
65#define VTK_EXTRACT_TRACE 4
66
67class VTKFILTERSEXTRACTION_EXPORT vtkExtractTensorComponents : public vtkDataSetAlgorithm
68{
69public:
71
75 void PrintSelf(ostream& os, vtkIndent indent) override;
77
83
85
88 vtkSetMacro(PassTensorsToOutput, vtkTypeBool);
89 vtkGetMacro(PassTensorsToOutput, vtkTypeBool);
90 vtkBooleanMacro(PassTensorsToOutput, vtkTypeBool);
92
94
97 vtkSetMacro(ExtractScalars, vtkTypeBool);
98 vtkGetMacro(ExtractScalars, vtkTypeBool);
99 vtkBooleanMacro(ExtractScalars, vtkTypeBool);
101
103
106 vtkSetVector2Macro(ScalarComponents, int);
107 vtkGetVectorMacro(ScalarComponents, int, 2);
109
111
118 vtkSetMacro(ScalarMode, int);
119 vtkGetMacro(ScalarMode, int);
120 void SetScalarModeToComponent() { this->SetScalarMode(VTK_EXTRACT_COMPONENT); }
124 {
125 this->SetScalarMode(VTK_EXTRACT_NONNEGATIVE_DETERMINANT);
126 }
127 void SetScalarModeToTrace() { this->SetScalarMode(VTK_EXTRACT_TRACE); }
128 void ScalarIsComponent() { this->SetScalarMode(VTK_EXTRACT_COMPONENT); }
130 void ScalarIsDeterminant() { this->SetScalarMode(VTK_EXTRACT_DETERMINANT); }
132 {
133 this->SetScalarMode(VTK_EXTRACT_NONNEGATIVE_DETERMINANT);
134 }
135 void ScalarIsTrace() { this->SetScalarMode(VTK_EXTRACT_TRACE); }
137
139
142 vtkSetMacro(ExtractVectors, vtkTypeBool);
143 vtkGetMacro(ExtractVectors, vtkTypeBool);
144 vtkBooleanMacro(ExtractVectors, vtkTypeBool);
146
148
152 vtkSetVector6Macro(VectorComponents, int);
153 vtkGetVectorMacro(VectorComponents, int, 6);
155
157
160 vtkSetMacro(ExtractNormals, vtkTypeBool);
161 vtkGetMacro(ExtractNormals, vtkTypeBool);
162 vtkBooleanMacro(ExtractNormals, vtkTypeBool);
164
166
170 vtkSetMacro(NormalizeNormals, vtkTypeBool);
171 vtkGetMacro(NormalizeNormals, vtkTypeBool);
172 vtkBooleanMacro(NormalizeNormals, vtkTypeBool);
174
176
180 vtkSetVector6Macro(NormalComponents, int);
181 vtkGetVectorMacro(NormalComponents, int, 6);
183
185
188 vtkSetMacro(ExtractTCoords, vtkTypeBool);
189 vtkGetMacro(ExtractTCoords, vtkTypeBool);
190 vtkBooleanMacro(ExtractTCoords, vtkTypeBool);
192
194
197 vtkSetClampMacro(NumberOfTCoords, int, 1, 3);
198 vtkGetMacro(NumberOfTCoords, int);
200
202
207 vtkSetVector6Macro(TCoordComponents, int);
208 vtkGetVectorMacro(TCoordComponents, int, 6);
210
212
220 vtkSetMacro(OutputPrecision, int);
221 vtkGetMacro(OutputPrecision, int);
223
224protected:
226 ~vtkExtractTensorComponents() override = default;
227
229
231
236
238 int ScalarComponents[2];
239
240 int VectorComponents[6];
241
243 int NormalComponents[6];
244
246 int TCoordComponents[6];
247
249
250private:
252 void operator=(const vtkExtractTensorComponents&) = delete;
253};
254
255#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:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int vtkTypeBool
Definition vtkABI.h:69
#define VTK_EXTRACT_EFFECTIVE_STRESS
#define VTK_EXTRACT_DETERMINANT
#define VTK_EXTRACT_NONNEGATIVE_DETERMINANT
#define VTK_EXTRACT_COMPONENT
#define VTK_EXTRACT_TRACE