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 
67 class VTKFILTERSEXTRACTION_EXPORT vtkExtractTensorComponents : public vtkDataSetAlgorithm
68 {
69 public:
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); }
122  void SetScalarModeToDeterminant() { this->SetScalarMode(VTK_EXTRACT_DETERMINANT); }
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); }
129  void ScalarIsEffectiveStress() { this->SetScalarMode(VTK_EXTRACT_EFFECTIVE_STRESS); }
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 
224 protected:
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 
250 private:
252  void operator=(const vtkExtractTensorComponents&) = delete;
253 };
254 
255 #endif
void SetScalarModeToTrace()
Specify how to extract the scalar.
void SetScalarModeToDeterminant()
Specify how to extract the scalar.
Store vtkAlgorithm input/output information.
void ScalarIsNonNegativeDeterminant()
Specify how to extract the scalar.
#define VTK_EXTRACT_TRACE
int vtkTypeBool
Definition: vtkABI.h:69
void ScalarIsTrace()
Specify how to extract the scalar.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ScalarIsEffectiveStress()
Specify how to extract the scalar.
void SetScalarModeToComponent()
Specify how to extract the scalar.
#define VTK_EXTRACT_DETERMINANT
a simple class to control print indentation
Definition: vtkIndent.h:39
extract parts of tensor and create a scalar, vector, normal, or texture coordinates.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
void SetScalarModeToEffectiveStress()
Specify how to extract the scalar.
#define VTK_EXTRACT_COMPONENT
void ScalarIsComponent()
Specify how to extract the scalar.
void ScalarIsDeterminant()
Specify how to extract the scalar.
Store zero or more vtkInformation instances.
Superclass for algorithms that produce output of the same type as input.
#define VTK_EXTRACT_NONNEGATIVE_DETERMINANT
void SetScalarModeToNonNegativeDeterminant()
Specify how to extract the scalar.
static vtkDataSetAlgorithm * New()
#define VTK_EXTRACT_EFFECTIVE_STRESS