VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkExtractTensorComponents.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00045 #ifndef __vtkExtractTensorComponents_h 00046 #define __vtkExtractTensorComponents_h 00047 00048 #include "vtkFiltersExtractionModule.h" // For export macro 00049 #include "vtkDataSetAlgorithm.h" 00050 00051 #define VTK_EXTRACT_COMPONENT 0 00052 #define VTK_EXTRACT_EFFECTIVE_STRESS 1 00053 #define VTK_EXTRACT_DETERMINANT 2 00054 00055 class VTKFILTERSEXTRACTION_EXPORT vtkExtractTensorComponents : public vtkDataSetAlgorithm 00056 { 00057 public: 00058 vtkTypeMacro(vtkExtractTensorComponents,vtkDataSetAlgorithm); 00059 void PrintSelf(ostream& os, vtkIndent indent); 00060 00063 static vtkExtractTensorComponents *New(); 00064 00066 00067 vtkSetMacro(PassTensorsToOutput,int); 00068 vtkGetMacro(PassTensorsToOutput,int); 00069 vtkBooleanMacro(PassTensorsToOutput,int); 00071 00073 00074 vtkSetMacro(ExtractScalars,int); 00075 vtkGetMacro(ExtractScalars,int); 00076 vtkBooleanMacro(ExtractScalars,int); 00078 00080 00081 vtkSetVector2Macro(ScalarComponents,int); 00082 vtkGetVectorMacro(ScalarComponents,int,2); 00084 00086 00090 vtkSetMacro(ScalarMode,int); 00091 vtkGetMacro(ScalarMode,int); 00092 void SetScalarModeToComponent() 00093 {this->SetScalarMode(VTK_EXTRACT_COMPONENT);}; 00094 void SetScalarModeToEffectiveStress() 00095 {this->SetScalarMode(VTK_EXTRACT_EFFECTIVE_STRESS);}; 00096 void SetScalarModeToDeterminant() 00097 {this->SetScalarMode(VTK_EXTRACT_DETERMINANT);}; 00098 void ScalarIsComponent() 00099 {this->SetScalarMode(VTK_EXTRACT_COMPONENT);}; 00100 void ScalarIsEffectiveStress() 00101 {this->SetScalarMode(VTK_EXTRACT_EFFECTIVE_STRESS);}; 00102 void ScalarIsDeterminant() 00103 {this->SetScalarMode(VTK_EXTRACT_DETERMINANT);}; 00105 00107 00108 vtkSetMacro(ExtractVectors,int); 00109 vtkGetMacro(ExtractVectors,int); 00110 vtkBooleanMacro(ExtractVectors,int); 00112 00114 00116 vtkSetVector6Macro(VectorComponents,int); 00117 vtkGetVectorMacro(VectorComponents,int,6); 00119 00120 00122 00123 vtkSetMacro(ExtractNormals,int); 00124 vtkGetMacro(ExtractNormals,int); 00125 vtkBooleanMacro(ExtractNormals,int); 00127 00129 00131 vtkSetMacro(NormalizeNormals,int); 00132 vtkGetMacro(NormalizeNormals,int); 00133 vtkBooleanMacro(NormalizeNormals,int); 00135 00137 00139 vtkSetVector6Macro(NormalComponents,int); 00140 vtkGetVectorMacro(NormalComponents,int,6); 00142 00144 00146 vtkSetMacro(ExtractTCoords,int); 00147 vtkGetMacro(ExtractTCoords,int); 00148 vtkBooleanMacro(ExtractTCoords,int); 00150 00152 00153 vtkSetClampMacro(NumberOfTCoords,int,1,3); 00154 vtkGetMacro(NumberOfTCoords,int); 00156 00158 00161 vtkSetVector6Macro(TCoordComponents,int); 00162 vtkGetVectorMacro(TCoordComponents,int,6); 00164 00165 protected: 00166 vtkExtractTensorComponents(); 00167 ~vtkExtractTensorComponents() {} 00168 00169 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00170 00171 int PassTensorsToOutput; 00172 00173 int ExtractScalars; 00174 int ExtractVectors; 00175 int ExtractNormals; 00176 int ExtractTCoords; 00177 00178 int ScalarMode; 00179 int ScalarComponents[2]; 00180 00181 int VectorComponents[6]; 00182 00183 int NormalizeNormals; 00184 int NormalComponents[6]; 00185 00186 int NumberOfTCoords; 00187 int TCoordComponents[6]; 00188 00189 private: 00190 vtkExtractTensorComponents(const vtkExtractTensorComponents&); // Not implemented. 00191 void operator=(const vtkExtractTensorComponents&); // Not implemented. 00192 }; 00193 00194 #endif 00195