VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkRectilinearSynchronizedTemplates.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 vtkRectilinearSynchronizedTemplates_h 00034 #define vtkRectilinearSynchronizedTemplates_h 00035 00036 #include "vtkFiltersCoreModule.h" // For export macro 00037 #include "vtkPolyDataAlgorithm.h" 00038 #include "vtkContourValues.h" // Passes calls through 00039 00040 class vtkRectilinearGrid; 00041 class vtkDataArray; 00042 00043 class VTKFILTERSCORE_EXPORT vtkRectilinearSynchronizedTemplates : public vtkPolyDataAlgorithm 00044 { 00045 public: 00046 static vtkRectilinearSynchronizedTemplates *New(); 00047 00048 vtkTypeMacro(vtkRectilinearSynchronizedTemplates,vtkPolyDataAlgorithm); 00049 void PrintSelf(ostream& os, vtkIndent indent); 00050 00052 unsigned long int GetMTime(); 00053 00055 00059 vtkSetMacro(ComputeNormals,int); 00060 vtkGetMacro(ComputeNormals,int); 00061 vtkBooleanMacro(ComputeNormals,int); 00063 00065 00071 vtkSetMacro(ComputeGradients,int); 00072 vtkGetMacro(ComputeGradients,int); 00073 vtkBooleanMacro(ComputeGradients,int); 00075 00077 00078 vtkSetMacro(ComputeScalars,int); 00079 vtkGetMacro(ComputeScalars,int); 00080 vtkBooleanMacro(ComputeScalars,int); 00082 00085 void SetValue(int i, double value) {this->ContourValues->SetValue(i,value);} 00086 00088 double GetValue(int i) {return this->ContourValues->GetValue(i);} 00089 00092 double *GetValues() {return this->ContourValues->GetValues();} 00093 00095 00098 void GetValues(double *contourValues) { 00099 this->ContourValues->GetValues(contourValues);} 00101 00103 00106 void SetNumberOfContours(int number) { 00107 this->ContourValues->SetNumberOfContours(number);} 00109 00111 00112 int GetNumberOfContours() { 00113 return this->ContourValues->GetNumberOfContours();} 00115 00117 00119 void GenerateValues(int numContours, double range[2]) { 00120 this->ContourValues->GenerateValues(numContours, range);} 00122 00124 00126 void GenerateValues(int numContours, double rangeStart, double rangeEnd) 00127 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);} 00129 00131 00133 vtkSetMacro(ArrayComponent, int); 00134 vtkGetMacro(ArrayComponent, int); 00136 00138 00140 vtkSetMacro(GenerateTriangles,int); 00141 vtkGetMacro(GenerateTriangles,int); 00142 vtkBooleanMacro(GenerateTriangles,int); 00144 00146 00149 void ComputeSpacing(vtkRectilinearGrid *data, int i, int j, int k, 00150 int extent[6], double spacing[6]); 00152 00153 protected: 00154 vtkRectilinearSynchronizedTemplates(); 00155 ~vtkRectilinearSynchronizedTemplates(); 00156 00157 int ComputeNormals; 00158 int ComputeGradients; 00159 int ComputeScalars; 00160 int GenerateTriangles; 00161 00162 vtkContourValues *ContourValues; 00163 00164 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00165 virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00166 virtual int FillInputPortInformation(int port, vtkInformation *info); 00167 00168 int ArrayComponent; 00169 00170 void* GetScalarsForExtent(vtkDataArray *array, int extent[6], 00171 vtkRectilinearGrid *input); 00172 00173 private: 00174 vtkRectilinearSynchronizedTemplates(const vtkRectilinearSynchronizedTemplates&); // Not implemented. 00175 void operator=(const vtkRectilinearSynchronizedTemplates&); // Not implemented. 00176 }; 00177 00178 // template table. 00179 //BTX 00180 00181 extern int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_1[]; 00182 extern int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_2[]; 00183 00184 //ETX 00185 00186 #endif