VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkSynchronizedTemplates3D.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 =========================================================================*/ 00033 #ifndef __vtkSynchronizedTemplates3D_h 00034 #define __vtkSynchronizedTemplates3D_h 00035 00036 #include "vtkFiltersCoreModule.h" // For export macro 00037 #include "vtkPolyDataAlgorithm.h" 00038 #include "vtkContourValues.h" // Passes calls through 00039 00040 class vtkImageData; 00041 00042 class VTKFILTERSCORE_EXPORT vtkSynchronizedTemplates3D : public vtkPolyDataAlgorithm 00043 { 00044 public: 00045 static vtkSynchronizedTemplates3D *New(); 00046 00047 vtkTypeMacro(vtkSynchronizedTemplates3D,vtkPolyDataAlgorithm); 00048 void PrintSelf(ostream& os, vtkIndent indent); 00049 00051 unsigned long int GetMTime(); 00052 00054 00058 vtkSetMacro(ComputeNormals,int); 00059 vtkGetMacro(ComputeNormals,int); 00060 vtkBooleanMacro(ComputeNormals,int); 00062 00064 00070 vtkSetMacro(ComputeGradients,int); 00071 vtkGetMacro(ComputeGradients,int); 00072 vtkBooleanMacro(ComputeGradients,int); 00074 00076 00077 vtkSetMacro(ComputeScalars,int); 00078 vtkGetMacro(ComputeScalars,int); 00079 vtkBooleanMacro(ComputeScalars,int); 00081 00083 00085 vtkSetMacro(GenerateTriangles,int); 00086 vtkGetMacro(GenerateTriangles,int); 00087 vtkBooleanMacro(GenerateTriangles,int); 00089 00092 void SetValue(int i, double value) {this->ContourValues->SetValue(i,value);} 00093 00095 double GetValue(int i) {return this->ContourValues->GetValue(i);} 00096 00099 double *GetValues() {return this->ContourValues->GetValues();} 00100 00102 00105 void GetValues(double *contourValues) { 00106 this->ContourValues->GetValues(contourValues);} 00108 00110 00113 void SetNumberOfContours(int number) { 00114 this->ContourValues->SetNumberOfContours(number);} 00116 00118 00119 int GetNumberOfContours() { 00120 return this->ContourValues->GetNumberOfContours();} 00122 00124 00126 void GenerateValues(int numContours, double range[2]) { 00127 this->ContourValues->GenerateValues(numContours, range);} 00129 00131 00133 void GenerateValues(int numContours, double rangeStart, double rangeEnd) 00134 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);} 00136 00137 void ThreadedExecute(vtkImageData *data, vtkInformation *inInfo, 00138 vtkInformation *outInfo, 00139 vtkDataArray *inScalars); 00140 00142 00145 void SetInputMemoryLimit(unsigned long limit); 00146 unsigned long GetInputMemoryLimit(); 00148 00150 00152 vtkSetMacro(ArrayComponent, int); 00153 vtkGetMacro(ArrayComponent, int); 00155 00156 protected: 00157 vtkSynchronizedTemplates3D(); 00158 ~vtkSynchronizedTemplates3D(); 00159 00160 int ComputeNormals; 00161 int ComputeGradients; 00162 int ComputeScalars; 00163 vtkContourValues *ContourValues; 00164 00165 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00166 virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00167 virtual int FillInputPortInformation(int port, vtkInformation *info); 00168 00169 int ArrayComponent; 00170 00171 int GenerateTriangles; 00172 00173 static vtkInformationIntegerVectorKey* EXECUTE_EXTENT(); 00174 00175 private: 00176 vtkSynchronizedTemplates3D(const vtkSynchronizedTemplates3D&); // Not implemented. 00177 void operator=(const vtkSynchronizedTemplates3D&); // Not implemented. 00178 }; 00179 00180 00181 // template table. 00182 //BTX 00183 00184 extern int VTKFILTERSCORE_EXPORT VTK_SYNCHRONIZED_TEMPLATES_3D_TABLE_1[]; 00185 extern int VTKFILTERSCORE_EXPORT VTK_SYNCHRONIZED_TEMPLATES_3D_TABLE_2[]; 00186 00187 //ETX 00188 00189 #endif 00190