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 vtkKitwareContourFilter; 00042 class vtkDataArray; 00043 00044 class VTKFILTERSCORE_EXPORT vtkRectilinearSynchronizedTemplates : public vtkPolyDataAlgorithm 00045 { 00046 public: 00047 static vtkRectilinearSynchronizedTemplates *New(); 00048 00049 vtkTypeMacro(vtkRectilinearSynchronizedTemplates,vtkPolyDataAlgorithm); 00050 void PrintSelf(ostream& os, vtkIndent indent); 00051 00053 unsigned long int GetMTime(); 00054 00056 00060 vtkSetMacro(ComputeNormals,int); 00061 vtkGetMacro(ComputeNormals,int); 00062 vtkBooleanMacro(ComputeNormals,int); 00064 00066 00072 vtkSetMacro(ComputeGradients,int); 00073 vtkGetMacro(ComputeGradients,int); 00074 vtkBooleanMacro(ComputeGradients,int); 00076 00078 00079 vtkSetMacro(ComputeScalars,int); 00080 vtkGetMacro(ComputeScalars,int); 00081 vtkBooleanMacro(ComputeScalars,int); 00083 00086 void SetValue(int i, double value) {this->ContourValues->SetValue(i,value);} 00087 00089 double GetValue(int i) {return this->ContourValues->GetValue(i);} 00090 00093 double *GetValues() {return this->ContourValues->GetValues();} 00094 00096 00099 void GetValues(double *contourValues) { 00100 this->ContourValues->GetValues(contourValues);} 00102 00104 00107 void SetNumberOfContours(int number) { 00108 this->ContourValues->SetNumberOfContours(number);} 00110 00112 00113 int GetNumberOfContours() { 00114 return this->ContourValues->GetNumberOfContours();} 00116 00118 00120 void GenerateValues(int numContours, double range[2]) { 00121 this->ContourValues->GenerateValues(numContours, range);} 00123 00125 00127 void GenerateValues(int numContours, double rangeStart, double rangeEnd) 00128 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);} 00130 00132 int *GetExecuteExtent() {return this->ExecuteExtent;} 00133 00135 00137 vtkSetMacro(ArrayComponent, int); 00138 vtkGetMacro(ArrayComponent, int); 00140 00142 00144 vtkSetMacro(GenerateTriangles,int); 00145 vtkGetMacro(GenerateTriangles,int); 00146 vtkBooleanMacro(GenerateTriangles,int); 00148 00150 00153 void ComputeSpacing(vtkRectilinearGrid *data, int i, int j, int k, 00154 int extent[6], double spacing[6]); 00156 00157 protected: 00158 vtkRectilinearSynchronizedTemplates(); 00159 ~vtkRectilinearSynchronizedTemplates(); 00160 00161 int ComputeNormals; 00162 int ComputeGradients; 00163 int ComputeScalars; 00164 int GenerateTriangles; 00165 00166 vtkContourValues *ContourValues; 00167 00168 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00169 virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00170 virtual int FillInputPortInformation(int port, vtkInformation *info); 00171 00172 int ExecuteExtent[6]; 00173 00174 int ArrayComponent; 00175 00176 void* GetScalarsForExtent(vtkDataArray *array, int extent[6], 00177 vtkRectilinearGrid *input); 00178 00179 private: 00180 vtkRectilinearSynchronizedTemplates(const vtkRectilinearSynchronizedTemplates&); // Not implemented. 00181 void operator=(const vtkRectilinearSynchronizedTemplates&); // Not implemented. 00182 }; 00183 00184 // template table. 00185 //BTX 00186 00187 extern int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_1[]; 00188 extern int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_2[]; 00189 00190 //ETX 00191 00192 #endif