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 "vtkPolyDataAlgorithm.h" 00037 #include "vtkContourValues.h" // Passes calls through 00038 00039 class vtkRectilinearGrid; 00040 class vtkKitwareContourFilter; 00041 class vtkDataArray; 00042 00043 class VTK_GRAPHICS_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 int *GetExecuteExtent() {return this->ExecuteExtent;} 00132 00134 00136 vtkSetMacro(ArrayComponent, int); 00137 vtkGetMacro(ArrayComponent, int); 00139 00141 00144 void ComputeSpacing(vtkRectilinearGrid *data, int i, int j, int k, 00145 int extent[6], double spacing[6]); 00147 00148 protected: 00149 vtkRectilinearSynchronizedTemplates(); 00150 ~vtkRectilinearSynchronizedTemplates(); 00151 00152 int ComputeNormals; 00153 int ComputeGradients; 00154 int ComputeScalars; 00155 vtkContourValues *ContourValues; 00156 00157 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00158 virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00159 virtual int FillInputPortInformation(int port, vtkInformation *info); 00160 00161 int ExecuteExtent[6]; 00162 00163 int ArrayComponent; 00164 00165 void* GetScalarsForExtent(vtkDataArray *array, int extent[6], 00166 vtkRectilinearGrid *input); 00167 00168 private: 00169 vtkRectilinearSynchronizedTemplates(const vtkRectilinearSynchronizedTemplates&); // Not implemented. 00170 void operator=(const vtkRectilinearSynchronizedTemplates&); // Not implemented. 00171 }; 00172 00173 // template table. 00174 //BTX 00175 00176 extern int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_1[]; 00177 extern int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_2[]; 00178 00179 //ETX 00180 00181 #endif