VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Filters/SMP/vtkThreadedSynchronizedTemplates3D.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkThreadedSynchronizedTemplates3D.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 =========================================================================*/
00033 #ifndef __vtkThreadedSynchronizedTemplates3D_h
00034 #define __vtkThreadedSynchronizedTemplates3D_h
00035 
00036 #include "vtkFiltersSMPModule.h" // For export macro
00037 #include "vtkMultiBlockDataSetAlgorithm.h"
00038 #include "vtkContourValues.h" // Passes calls through
00039 
00040 class vtkImageData;
00041 
00042 class VTKFILTERSSMP_EXPORT vtkThreadedSynchronizedTemplates3D : public vtkMultiBlockDataSetAlgorithm
00043 {
00044 public:
00045   static vtkThreadedSynchronizedTemplates3D *New();
00046 
00047   vtkTypeMacro(vtkThreadedSynchronizedTemplates3D,vtkMultiBlockDataSetAlgorithm);
00048   void PrintSelf(ostream& os, vtkIndent indent);
00049 
00051   unsigned long int GetMTime();
00052 
00054 
00058   vtkSetMacro(ComputeNormals,int);
00059   vtkGetMacro(ComputeNormals,int);
00060   vtkBooleanMacro(ComputeNormals,int);
00062 
00064 
00070   vtkSetMacro(ComputeGradients,int);
00071   vtkGetMacro(ComputeGradients,int);
00072   vtkBooleanMacro(ComputeGradients,int);
00074 
00076 
00077   vtkSetMacro(ComputeScalars,int);
00078   vtkGetMacro(ComputeScalars,int);
00079   vtkBooleanMacro(ComputeScalars,int);
00081 
00083 
00085   vtkSetMacro(GenerateTriangles,int);
00086   vtkGetMacro(GenerateTriangles,int);
00087   vtkBooleanMacro(GenerateTriangles,int);
00089 
00092   void SetValue(int i, double value) {this->ContourValues->SetValue(i,value);}
00093 
00095   double GetValue(int i) {return this->ContourValues->GetValue(i);}
00096 
00099   double *GetValues() {return this->ContourValues->GetValues();}
00100 
00102 
00105   void GetValues(double *contourValues) {
00106     this->ContourValues->GetValues(contourValues);}
00108 
00110 
00113   void SetNumberOfContours(int number) {
00114     this->ContourValues->SetNumberOfContours(number);}
00116 
00118 
00119   int GetNumberOfContours() {
00120     return this->ContourValues->GetNumberOfContours();}
00122 
00124 
00126   void GenerateValues(int numContours, double range[2]) {
00127     this->ContourValues->GenerateValues(numContours, range);}
00129 
00131 
00133   void GenerateValues(int numContours, double rangeStart, double rangeEnd)
00134     {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00136 
00137   void ThreadedExecute(vtkImageData *data,
00138                        vtkInformation *inInfo,
00139                        vtkInformation *outInfo,
00140                        vtkDataArray *inScalars);
00141 
00143 
00146   void SetInputMemoryLimit(unsigned long limit);
00147   unsigned long GetInputMemoryLimit();
00149 
00151 
00153   vtkSetMacro(ArrayComponent, int);
00154   vtkGetMacro(ArrayComponent, int);
00156 
00157 protected:
00158   vtkThreadedSynchronizedTemplates3D();
00159   ~vtkThreadedSynchronizedTemplates3D();
00160 
00161   int ComputeNormals;
00162   int ComputeGradients;
00163   int ComputeScalars;
00164   vtkContourValues *ContourValues;
00165 
00166   virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00167   virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00168   virtual int FillInputPortInformation(int port, vtkInformation *info);
00169 
00170   int ArrayComponent;
00171 
00172   int GenerateTriangles;
00173 
00174 private:
00175   vtkThreadedSynchronizedTemplates3D(const vtkThreadedSynchronizedTemplates3D&);  // Not implemented.
00176   void operator=(const vtkThreadedSynchronizedTemplates3D&);  // Not implemented.
00177 };
00178 
00179 
00180 // template table.
00181 //BTX
00182 
00183 extern int VTKFILTERSSMP_EXPORT VTK_TSYNCHRONIZED_TEMPLATES_3D_TABLE_1[];
00184 extern int VTKFILTERSSMP_EXPORT VTK_TSYNCHRONIZED_TEMPLATES_3D_TABLE_2[];
00185 
00186 //ETX
00187 
00188 #endif