Patented/vtkGridSynchronizedTemplates3D.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00041 #ifndef __vtkGridSynchronizedTemplates3D_h
00042 #define __vtkGridSynchronizedTemplates3D_h
00043
00044 #include "vtkStructuredGridToPolyDataFilter.h"
00045 #include "vtkContourValues.h"
00046
00047 class vtkKitwareContourFilter;
00048 class vtkMultiThreader;
00049
00050 class VTK_PATENTED_EXPORT vtkGridSynchronizedTemplates3D : public vtkStructuredGridToPolyDataFilter
00051 {
00052 public:
00053 static vtkGridSynchronizedTemplates3D *New();
00054 vtkTypeRevisionMacro(vtkGridSynchronizedTemplates3D,vtkStructuredGridToPolyDataFilter);
00055 void PrintSelf(ostream& os, vtkIndent indent);
00056
00058 unsigned long int GetMTime();
00059
00061
00065 vtkSetMacro(ComputeNormals,int);
00066 vtkGetMacro(ComputeNormals,int);
00067 vtkBooleanMacro(ComputeNormals,int);
00069
00071
00077 vtkSetMacro(ComputeGradients,int);
00078 vtkGetMacro(ComputeGradients,int);
00079 vtkBooleanMacro(ComputeGradients,int);
00081
00083
00084 vtkSetMacro(ComputeScalars,int);
00085 vtkGetMacro(ComputeScalars,int);
00086 vtkBooleanMacro(ComputeScalars,int);
00088
00091 void SetValue(int i, double value) {this->ContourValues->SetValue(i,value);}
00092
00094 double GetValue(int i) {return this->ContourValues->GetValue(i);}
00095
00098 double *GetValues() {return this->ContourValues->GetValues();}
00099
00101
00104 void GetValues(double *contourValues) {
00105 this->ContourValues->GetValues(contourValues);}
00107
00109
00112 void SetNumberOfContours(int number) {
00113 this->ContourValues->SetNumberOfContours(number);}
00115
00117
00118 int GetNumberOfContours() {
00119 return this->ContourValues->GetNumberOfContours();}
00121
00123
00125 void GenerateValues(int numContours, double range[2]) {
00126 this->ContourValues->GenerateValues(numContours, range);}
00128
00130
00132 void GenerateValues(int numContours, double rangeStart, double rangeEnd)
00133 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00135
00137
00138 int *GetExecuteExtent() {return this->ExecuteExtent;}
00139 void ThreadedExecute(int *exExt, int threadId);
00141
00143
00144 vtkSetClampMacro( NumberOfThreads, int, 1, VTK_MAX_THREADS );
00145 vtkGetMacro( NumberOfThreads, int );
00147
00150 void SetInputMemoryLimit(long limit);
00151
00153
00156 vtkGetStringMacro(InputScalarsSelection);
00157 void SelectInputScalars(const char *fieldName)
00158 {this->SetInputScalarsSelection(fieldName);}
00160
00161 protected:
00162 vtkGridSynchronizedTemplates3D();
00163 ~vtkGridSynchronizedTemplates3D();
00164
00165 void Execute();
00166 void ExecuteInformation();
00167
00168 void ComputeInputUpdateExtents( vtkDataObject *output );
00169
00170 int ComputeNormals;
00171 int ComputeGradients;
00172 int ComputeScalars;
00173 vtkContourValues *ContourValues;
00174
00175 int NumberOfThreads;
00176 vtkMultiThreader *Threader;
00177 int MinimumPieceSize[3];
00178 int ExecuteExtent[6];
00179
00180 vtkPolyData *Threads[VTK_MAX_THREADS];
00181
00182 char *InputScalarsSelection;
00183 vtkSetStringMacro(InputScalarsSelection);
00184
00185 private:
00186
00187 friend class VTK_PATENTED_EXPORT vtkKitwareContourFilter;
00188
00189 private:
00190 vtkGridSynchronizedTemplates3D(const vtkGridSynchronizedTemplates3D&);
00191 void operator=(const vtkGridSynchronizedTemplates3D&);
00192 };
00193
00194
00195 #endif