VTK
dox/Filters/Core/vtkSynchronizedTemplates3D.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkSynchronizedTemplates3D.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 __vtkSynchronizedTemplates3D_h
00034 #define __vtkSynchronizedTemplates3D_h
00035 
00036 #include "vtkFiltersCoreModule.h" // For export macro
00037 #include "vtkPolyDataAlgorithm.h"
00038 #include "vtkContourValues.h" // Passes calls through
00039 
00040 class vtkImageData;
00041 
00042 class VTKFILTERSCORE_EXPORT vtkSynchronizedTemplates3D : public vtkPolyDataAlgorithm
00043 {
00044 public:
00045   static vtkSynchronizedTemplates3D *New();
00046 
00047   vtkTypeMacro(vtkSynchronizedTemplates3D,vtkPolyDataAlgorithm);
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 
00138 
00139   int *GetExecuteExtent() {return this->ExecuteExtent;}
00140   void ThreadedExecute(vtkImageData *data, vtkInformation *inInfo,
00141                        vtkInformation *outInfo,
00142                        int *exExt, vtkDataArray *inScalars);
00144 
00146 
00149   void SetInputMemoryLimit(unsigned long limit);
00150   unsigned long GetInputMemoryLimit();
00152 
00154 
00156   vtkSetMacro(ArrayComponent, int);
00157   vtkGetMacro(ArrayComponent, int);
00159 
00160 protected:
00161   vtkSynchronizedTemplates3D();
00162   ~vtkSynchronizedTemplates3D();
00163 
00164   int ComputeNormals;
00165   int ComputeGradients;
00166   int ComputeScalars;
00167   vtkContourValues *ContourValues;
00168 
00169   virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00170   virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00171   virtual int FillInputPortInformation(int port, vtkInformation *info);
00172 
00173   int ExecuteExtent[6];
00174 
00175   int ArrayComponent;
00176 
00177   int GenerateTriangles;
00178 private:
00179   vtkSynchronizedTemplates3D(const vtkSynchronizedTemplates3D&);  // Not implemented.
00180   void operator=(const vtkSynchronizedTemplates3D&);  // Not implemented.
00181 };
00182 
00183 
00184 // template table.
00185 //BTX
00186 
00187 extern int VTKFILTERSCORE_EXPORT VTK_SYNCHRONIZED_TEMPLATES_3D_TABLE_1[];
00188 extern int VTKFILTERSCORE_EXPORT VTK_SYNCHRONIZED_TEMPLATES_3D_TABLE_2[];
00189 
00190 //ETX
00191 
00192 #endif
00193