vtkSynchronizedTemplates3D.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
00057 #ifndef __vtkSynchronizedTemplates3D_h
00058 #define __vtkSynchronizedTemplates3D_h
00059
00060 #include "vtkPolyDataSource.h"
00061 #include "vtkContourValues.h"
00062
00063 class vtkImageData;
00064 class vtkKitwareContourFilter;
00065 class vtkMultiThreader;
00066
00067 class VTK_PATENTED_EXPORT vtkSynchronizedTemplates3D : public vtkPolyDataSource
00068 {
00069 public:
00070 static vtkSynchronizedTemplates3D *New();
00071
00072 vtkTypeRevisionMacro(vtkSynchronizedTemplates3D,vtkPolyDataSource);
00073 void PrintSelf(ostream& os, vtkIndent indent);
00074
00076
00077 void SetInput(vtkImageData *input);
00078 vtkImageData *GetInput();
00080
00082 unsigned long int GetMTime();
00083
00085
00089 vtkSetMacro(ComputeNormals,int);
00090 vtkGetMacro(ComputeNormals,int);
00091 vtkBooleanMacro(ComputeNormals,int);
00093
00095
00101 vtkSetMacro(ComputeGradients,int);
00102 vtkGetMacro(ComputeGradients,int);
00103 vtkBooleanMacro(ComputeGradients,int);
00105
00107
00108 vtkSetMacro(ComputeScalars,int);
00109 vtkGetMacro(ComputeScalars,int);
00110 vtkBooleanMacro(ComputeScalars,int);
00112
00115 void SetValue(int i, double value) {this->ContourValues->SetValue(i,value);}
00116
00118 double GetValue(int i) {return this->ContourValues->GetValue(i);}
00119
00122 double *GetValues() {return this->ContourValues->GetValues();}
00123
00125
00128 void GetValues(double *contourValues) {
00129 this->ContourValues->GetValues(contourValues);}
00131
00133
00136 void SetNumberOfContours(int number) {
00137 this->ContourValues->SetNumberOfContours(number);}
00139
00141
00142 int GetNumberOfContours() {
00143 return this->ContourValues->GetNumberOfContours();}
00145
00147
00149 void GenerateValues(int numContours, double range[2]) {
00150 this->ContourValues->GenerateValues(numContours, range);}
00152
00154
00156 void GenerateValues(int numContours, double rangeStart, double rangeEnd)
00157 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00159
00161
00162 int *GetExecuteExtent() {return this->ExecuteExtent;}
00163 void ThreadedExecute(vtkImageData *data, int *exExt, int threadId);
00165
00167
00168 vtkSetClampMacro( NumberOfThreads, int, 1, VTK_MAX_THREADS );
00169 vtkGetMacro( NumberOfThreads, int );
00171
00173
00176 void SetInputMemoryLimit(unsigned long limit);
00177 unsigned long GetInputMemoryLimit();
00179
00181
00184 vtkGetStringMacro(InputScalarsSelection);
00185 void SelectInputScalars(const char *fieldName)
00186 {this->SetInputScalarsSelection(fieldName);}
00188
00190
00192 vtkSetMacro(ArrayComponent, int);
00193 vtkGetMacro(ArrayComponent, int);
00195
00196 protected:
00197 vtkSynchronizedTemplates3D();
00198 ~vtkSynchronizedTemplates3D();
00199
00200 int ComputeNormals;
00201 int ComputeGradients;
00202 int ComputeScalars;
00203 vtkContourValues *ContourValues;
00204
00205 void Execute();
00206 void ExecuteInformation();
00207
00208 void ComputeInputUpdateExtents(vtkDataObject *output);
00209
00210 int ExecuteExtent[6];
00211
00212 int NumberOfThreads;
00213 vtkMultiThreader *Threader;
00214
00215 vtkPolyData *Threads[VTK_MAX_THREADS];
00216
00217 char *InputScalarsSelection;
00218 vtkSetStringMacro(InputScalarsSelection);
00219
00220 int ArrayComponent;
00221
00222 virtual int FillInputPortInformation(int, vtkInformation*);
00223 private:
00224
00225 friend class VTK_PATENTED_EXPORT vtkKitwareContourFilter;
00226
00227
00228 private:
00229 vtkSynchronizedTemplates3D(const vtkSynchronizedTemplates3D&);
00230 void operator=(const vtkSynchronizedTemplates3D&);
00231 };
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242 extern int VTK_SYNCHONIZED_TEMPLATES_3D_TABLE_1[];
00243 extern int VTK_SYNCHONIZED_TEMPLATES_3D_TABLE_2[];
00244
00245
00246
00247 #endif
00248