VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkGridSynchronizedTemplates3D.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 =========================================================================*/ 00029 #ifndef vtkGridSynchronizedTemplates3D_h 00030 #define vtkGridSynchronizedTemplates3D_h 00031 00032 #include "vtkFiltersCoreModule.h" // For export macro 00033 #include "vtkPolyDataAlgorithm.h" 00034 #include "vtkContourValues.h" // Because it passes all the calls to it 00035 00036 class vtkStructuredGrid; 00037 00038 class VTKFILTERSCORE_EXPORT vtkGridSynchronizedTemplates3D : public vtkPolyDataAlgorithm 00039 { 00040 public: 00041 static vtkGridSynchronizedTemplates3D *New(); 00042 vtkTypeMacro(vtkGridSynchronizedTemplates3D,vtkPolyDataAlgorithm); 00043 void PrintSelf(ostream& os, vtkIndent indent); 00044 00046 unsigned long int GetMTime(); 00047 00049 00053 vtkSetMacro(ComputeNormals,int); 00054 vtkGetMacro(ComputeNormals,int); 00055 vtkBooleanMacro(ComputeNormals,int); 00057 00059 00065 vtkSetMacro(ComputeGradients,int); 00066 vtkGetMacro(ComputeGradients,int); 00067 vtkBooleanMacro(ComputeGradients,int); 00069 00071 00072 vtkSetMacro(ComputeScalars,int); 00073 vtkGetMacro(ComputeScalars,int); 00074 vtkBooleanMacro(ComputeScalars,int); 00076 00078 00080 vtkSetMacro(GenerateTriangles,int); 00081 vtkGetMacro(GenerateTriangles,int); 00082 vtkBooleanMacro(GenerateTriangles,int); 00084 00087 void SetValue(int i, double value) {this->ContourValues->SetValue(i,value);} 00088 00090 double GetValue(int i) {return this->ContourValues->GetValue(i);} 00091 00094 double *GetValues() {return this->ContourValues->GetValues();} 00095 00097 00100 void GetValues(double *contourValues) { 00101 this->ContourValues->GetValues(contourValues);} 00103 00105 00108 void SetNumberOfContours(int number) { 00109 this->ContourValues->SetNumberOfContours(number);} 00111 00113 00114 int GetNumberOfContours() { 00115 return this->ContourValues->GetNumberOfContours();} 00117 00119 00121 void GenerateValues(int numContours, double range[2]) { 00122 this->ContourValues->GenerateValues(numContours, range);} 00124 00126 00128 void GenerateValues(int numContours, double rangeStart, double rangeEnd) 00129 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);} 00131 00133 00134 void ThreadedExecute(vtkStructuredGrid *input, 00135 vtkInformationVector **inVec, 00136 vtkInformation *outInfo); 00138 00141 void SetInputMemoryLimit(long limit); 00142 00144 00147 vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION); 00148 vtkGetMacro(OutputPointsPrecision, int); 00150 00151 protected: 00152 vtkGridSynchronizedTemplates3D(); 00153 ~vtkGridSynchronizedTemplates3D(); 00154 00155 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00156 virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00157 virtual int FillInputPortInformation(int port, vtkInformation *info); 00158 00159 int ComputeNormals; 00160 int ComputeGradients; 00161 int ComputeScalars; 00162 int GenerateTriangles; 00163 00164 vtkContourValues *ContourValues; 00165 00166 int MinimumPieceSize[3]; 00167 int OutputPointsPrecision; 00168 00169 private: 00170 vtkGridSynchronizedTemplates3D(const vtkGridSynchronizedTemplates3D&); // Not implemented. 00171 void operator=(const vtkGridSynchronizedTemplates3D&); // Not implemented. 00172 }; 00173 00174 00175 #endif