VTK  9.1.0
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=========================================================================*/
52#ifndef vtkExtractTensorComponents_h
53#define vtkExtractTensorComponents_h
54
55#include "vtkDataSetAlgorithm.h"
56#include "vtkFiltersExtractionModule.h" // For export macro
57
58#define VTK_EXTRACT_COMPONENT 0
59#define VTK_EXTRACT_EFFECTIVE_STRESS 1
60#define VTK_EXTRACT_DETERMINANT 2
61#define VTK_EXTRACT_NONNEGATIVE_DETERMINANT 3
62#define VTK_EXTRACT_TRACE 4
63
64class VTKFILTERSEXTRACTION_EXPORT vtkExtractTensorComponents : public vtkDataSetAlgorithm
65{
66public:
68
72 void PrintSelf(ostream& os, vtkIndent indent) override;
74
80
82
85 vtkSetMacro(PassTensorsToOutput, vtkTypeBool);
86 vtkGetMacro(PassTensorsToOutput, vtkTypeBool);
87 vtkBooleanMacro(PassTensorsToOutput, vtkTypeBool);
89
91
94 vtkSetMacro(ExtractScalars, vtkTypeBool);
95 vtkGetMacro(ExtractScalars, vtkTypeBool);
96 vtkBooleanMacro(ExtractScalars, vtkTypeBool);
98
100
103 vtkSetVector2Macro(ScalarComponents, int);
104 vtkGetVectorMacro(ScalarComponents, int, 2);
106
108
115 vtkSetMacro(ScalarMode, int);
116 vtkGetMacro(ScalarMode, int);
117 void SetScalarModeToComponent() { this->SetScalarMode(VTK_EXTRACT_COMPONENT); }
121 {
122 this->SetScalarMode(VTK_EXTRACT_NONNEGATIVE_DETERMINANT);
123 }
124 void SetScalarModeToTrace() { this->SetScalarMode(VTK_EXTRACT_TRACE); }
125 void ScalarIsComponent() { this->SetScalarMode(VTK_EXTRACT_COMPONENT); }
127 void ScalarIsDeterminant() { this->SetScalarMode(VTK_EXTRACT_DETERMINANT); }
129 {
130 this->SetScalarMode(VTK_EXTRACT_NONNEGATIVE_DETERMINANT);
131 }
132 void ScalarIsTrace() { this->SetScalarMode(VTK_EXTRACT_TRACE); }
134
136
139 vtkSetMacro(ExtractVectors, vtkTypeBool);
140 vtkGetMacro(ExtractVectors, vtkTypeBool);
141 vtkBooleanMacro(ExtractVectors, vtkTypeBool);
143
145
149 vtkSetVector6Macro(VectorComponents, int);
150 vtkGetVectorMacro(VectorComponents, int, 6);
152
154
157 vtkSetMacro(ExtractNormals, vtkTypeBool);
158 vtkGetMacro(ExtractNormals, vtkTypeBool);
159 vtkBooleanMacro(ExtractNormals, vtkTypeBool);
161
163
167 vtkSetMacro(NormalizeNormals, vtkTypeBool);
168 vtkGetMacro(NormalizeNormals, vtkTypeBool);
169 vtkBooleanMacro(NormalizeNormals, vtkTypeBool);
171
173
177 vtkSetVector6Macro(NormalComponents, int);
178 vtkGetVectorMacro(NormalComponents, int, 6);
180
182
185 vtkSetMacro(ExtractTCoords, vtkTypeBool);
186 vtkGetMacro(ExtractTCoords, vtkTypeBool);
187 vtkBooleanMacro(ExtractTCoords, vtkTypeBool);
189
191
194 vtkSetClampMacro(NumberOfTCoords, int, 1, 3);
195 vtkGetMacro(NumberOfTCoords, int);
197
199
204 vtkSetVector6Macro(TCoordComponents, int);
205 vtkGetVectorMacro(TCoordComponents, int, 6);
207
209
217 vtkSetMacro(OutputPrecision, int);
218 vtkGetMacro(OutputPrecision, int);
220
221protected:
223 ~vtkExtractTensorComponents() override = default;
224
226
228
233
235 int ScalarComponents[2];
236
237 int VectorComponents[6];
238
240 int NormalComponents[6];
241
243 int TCoordComponents[6];
244
246
247private:
249 void operator=(const vtkExtractTensorComponents&) = delete;
250};
251
252#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:113
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