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 "vtkPolyDataAlgorithm.h" 00033 #include "vtkContourValues.h" // Because it passes all the calls to it 00034 00035 class vtkKitwareContourFilter; 00036 class vtkStructuredGrid; 00037 00038 class VTK_GRAPHICS_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 00079 void SetValue(int i, double value) {this->ContourValues->SetValue(i,value);} 00080 00082 double GetValue(int i) {return this->ContourValues->GetValue(i);} 00083 00086 double *GetValues() {return this->ContourValues->GetValues();} 00087 00089 00092 void GetValues(double *contourValues) { 00093 this->ContourValues->GetValues(contourValues);} 00095 00097 00100 void SetNumberOfContours(int number) { 00101 this->ContourValues->SetNumberOfContours(number);} 00103 00105 00106 int GetNumberOfContours() { 00107 return this->ContourValues->GetNumberOfContours();} 00109 00111 00113 void GenerateValues(int numContours, double range[2]) { 00114 this->ContourValues->GenerateValues(numContours, range);} 00116 00118 00120 void GenerateValues(int numContours, double rangeStart, double rangeEnd) 00121 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);} 00123 00125 00126 int *GetExecuteExtent() {return this->ExecuteExtent;} 00127 void ThreadedExecute(int *exExt, int threadId, vtkStructuredGrid *input, 00128 vtkInformationVector **inVec, 00129 vtkInformation *outInfo); 00131 00134 void SetInputMemoryLimit(long limit); 00135 00136 protected: 00137 vtkGridSynchronizedTemplates3D(); 00138 ~vtkGridSynchronizedTemplates3D(); 00139 00140 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00141 virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00142 virtual int FillInputPortInformation(int port, vtkInformation *info); 00143 00144 int ComputeNormals; 00145 int ComputeGradients; 00146 int ComputeScalars; 00147 vtkContourValues *ContourValues; 00148 00149 int MinimumPieceSize[3]; 00150 int ExecuteExtent[6]; 00151 00152 private: 00153 vtkGridSynchronizedTemplates3D(const vtkGridSynchronizedTemplates3D&); // Not implemented. 00154 void operator=(const vtkGridSynchronizedTemplates3D&); // Not implemented. 00155 }; 00156 00157 00158 #endif