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 vtkKitwareContourFilter; 00037 class vtkStructuredGrid; 00038 00039 class VTKFILTERSCORE_EXPORT vtkGridSynchronizedTemplates3D : public vtkPolyDataAlgorithm 00040 { 00041 public: 00042 static vtkGridSynchronizedTemplates3D *New(); 00043 vtkTypeMacro(vtkGridSynchronizedTemplates3D,vtkPolyDataAlgorithm); 00044 void PrintSelf(ostream& os, vtkIndent indent); 00045 00047 unsigned long int GetMTime(); 00048 00050 00054 vtkSetMacro(ComputeNormals,int); 00055 vtkGetMacro(ComputeNormals,int); 00056 vtkBooleanMacro(ComputeNormals,int); 00058 00060 00066 vtkSetMacro(ComputeGradients,int); 00067 vtkGetMacro(ComputeGradients,int); 00068 vtkBooleanMacro(ComputeGradients,int); 00070 00072 00073 vtkSetMacro(ComputeScalars,int); 00074 vtkGetMacro(ComputeScalars,int); 00075 vtkBooleanMacro(ComputeScalars,int); 00077 00079 00081 vtkSetMacro(GenerateTriangles,int); 00082 vtkGetMacro(GenerateTriangles,int); 00083 vtkBooleanMacro(GenerateTriangles,int); 00085 00088 void SetValue(int i, double value) {this->ContourValues->SetValue(i,value);} 00089 00091 double GetValue(int i) {return this->ContourValues->GetValue(i);} 00092 00095 double *GetValues() {return this->ContourValues->GetValues();} 00096 00098 00101 void GetValues(double *contourValues) { 00102 this->ContourValues->GetValues(contourValues);} 00104 00106 00109 void SetNumberOfContours(int number) { 00110 this->ContourValues->SetNumberOfContours(number);} 00112 00114 00115 int GetNumberOfContours() { 00116 return this->ContourValues->GetNumberOfContours();} 00118 00120 00122 void GenerateValues(int numContours, double range[2]) { 00123 this->ContourValues->GenerateValues(numContours, range);} 00125 00127 00129 void GenerateValues(int numContours, double rangeStart, double rangeEnd) 00130 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);} 00132 00134 00135 int *GetExecuteExtent() {return this->ExecuteExtent;} 00136 void ThreadedExecute(int *exExt, int threadId, vtkStructuredGrid *input, 00137 vtkInformationVector **inVec, 00138 vtkInformation *outInfo); 00140 00143 void SetInputMemoryLimit(long limit); 00144 00146 00149 vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION); 00150 vtkGetMacro(OutputPointsPrecision, int); 00152 00153 protected: 00154 vtkGridSynchronizedTemplates3D(); 00155 ~vtkGridSynchronizedTemplates3D(); 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 ComputeNormals; 00162 int ComputeGradients; 00163 int ComputeScalars; 00164 int GenerateTriangles; 00165 00166 vtkContourValues *ContourValues; 00167 00168 int MinimumPieceSize[3]; 00169 int ExecuteExtent[6]; 00170 int OutputPointsPrecision; 00171 00172 private: 00173 vtkGridSynchronizedTemplates3D(const vtkGridSynchronizedTemplates3D&); // Not implemented. 00174 void operator=(const vtkGridSynchronizedTemplates3D&); // Not implemented. 00175 }; 00176 00177 00178 #endif