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
00054 #ifndef __vtkGridSynchronizedTemplates3D_h
00055 #define __vtkGridSynchronizedTemplates3D_h
00056
00057 #include "vtkStructuredGridToPolyDataFilter.h"
00058 #include "vtkContourValues.h"
00059
00060 class vtkKitwareContourFilter;
00061 class vtkMultiThreader;
00062
00063 class VTK_PATENTED_EXPORT vtkGridSynchronizedTemplates3D : public vtkStructuredGridToPolyDataFilter
00064 {
00065 public:
00066 static vtkGridSynchronizedTemplates3D *New();
00067 vtkTypeRevisionMacro(vtkGridSynchronizedTemplates3D,vtkStructuredGridToPolyDataFilter);
00068 void PrintSelf(ostream& os, vtkIndent indent);
00069
00071 unsigned long int GetMTime();
00072
00074
00078 vtkSetMacro(ComputeNormals,int);
00079 vtkGetMacro(ComputeNormals,int);
00080 vtkBooleanMacro(ComputeNormals,int);
00082
00084
00090 vtkSetMacro(ComputeGradients,int);
00091 vtkGetMacro(ComputeGradients,int);
00092 vtkBooleanMacro(ComputeGradients,int);
00094
00096
00097 vtkSetMacro(ComputeScalars,int);
00098 vtkGetMacro(ComputeScalars,int);
00099 vtkBooleanMacro(ComputeScalars,int);
00101
00104 void SetValue(int i, double value) {this->ContourValues->SetValue(i,value);}
00105
00107 double GetValue(int i) {return this->ContourValues->GetValue(i);}
00108
00111 double *GetValues() {return this->ContourValues->GetValues();}
00112
00114
00117 void GetValues(double *contourValues) {
00118 this->ContourValues->GetValues(contourValues);}
00120
00122
00125 void SetNumberOfContours(int number) {
00126 this->ContourValues->SetNumberOfContours(number);}
00128
00130
00131 int GetNumberOfContours() {
00132 return this->ContourValues->GetNumberOfContours();}
00134
00136
00138 void GenerateValues(int numContours, double range[2]) {
00139 this->ContourValues->GenerateValues(numContours, range);}
00141
00143
00145 void GenerateValues(int numContours, double rangeStart, double rangeEnd)
00146 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00148
00150
00151 int *GetExecuteExtent() {return this->ExecuteExtent;}
00152 void ThreadedExecute(int *exExt, int threadId);
00154
00156
00157 vtkSetClampMacro( NumberOfThreads, int, 1, VTK_MAX_THREADS );
00158 vtkGetMacro( NumberOfThreads, int );
00160
00163 void SetInputMemoryLimit(long limit);
00164
00166
00169 vtkGetStringMacro(InputScalarsSelection);
00170 void SelectInputScalars(const char *fieldName)
00171 {this->SetInputScalarsSelection(fieldName);}
00173
00174 protected:
00175 vtkGridSynchronizedTemplates3D();
00176 ~vtkGridSynchronizedTemplates3D();
00177
00178 void Execute();
00179 void ExecuteInformation();
00180
00181 void ComputeInputUpdateExtents( vtkDataObject *output );
00182
00183 int ComputeNormals;
00184 int ComputeGradients;
00185 int ComputeScalars;
00186 vtkContourValues *ContourValues;
00187
00188 int NumberOfThreads;
00189 vtkMultiThreader *Threader;
00190 int MinimumPieceSize[3];
00191 int ExecuteExtent[6];
00192
00193 vtkPolyData *Threads[VTK_MAX_THREADS];
00194
00195 char *InputScalarsSelection;
00196 vtkSetStringMacro(InputScalarsSelection);
00197
00198 private:
00199
00200 friend class VTK_PATENTED_EXPORT vtkKitwareContourFilter;
00201
00202 private:
00203 vtkGridSynchronizedTemplates3D(const vtkGridSynchronizedTemplates3D&);
00204 void operator=(const vtkGridSynchronizedTemplates3D&);
00205 };
00206
00207
00208 #endif