VTK
dox/Filters/Core/vtkGridSynchronizedTemplates3D.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkGridSynchronizedTemplates3D.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 =========================================================================*/
00029 #ifndef __vtkGridSynchronizedTemplates3D_h
00030 #define __vtkGridSynchronizedTemplates3D_h
00031 
00032 #include "vtkFiltersCoreModule.h" // For export macro
00033 #include "vtkPolyDataAlgorithm.h"
00034 #include "vtkContourValues.h" // Because it passes all the calls to it
00035 
00036 class vtkStructuredGrid;
00037 
00038 class VTKFILTERSCORE_EXPORT vtkGridSynchronizedTemplates3D : public vtkPolyDataAlgorithm
00039 {
00040 public:
00041   static vtkGridSynchronizedTemplates3D *New();
00042   vtkTypeMacro(vtkGridSynchronizedTemplates3D,vtkPolyDataAlgorithm);
00043   void PrintSelf(ostream& os, vtkIndent indent);
00044 
00046   unsigned long int GetMTime();
00047 
00049 
00053   vtkSetMacro(ComputeNormals,int);
00054   vtkGetMacro(ComputeNormals,int);
00055   vtkBooleanMacro(ComputeNormals,int);
00057 
00059 
00065   vtkSetMacro(ComputeGradients,int);
00066   vtkGetMacro(ComputeGradients,int);
00067   vtkBooleanMacro(ComputeGradients,int);
00069 
00071 
00072   vtkSetMacro(ComputeScalars,int);
00073   vtkGetMacro(ComputeScalars,int);
00074   vtkBooleanMacro(ComputeScalars,int);
00076 
00078 
00080   vtkSetMacro(GenerateTriangles,int);
00081   vtkGetMacro(GenerateTriangles,int);
00082   vtkBooleanMacro(GenerateTriangles,int);
00084 
00087   void SetValue(int i, double value) {this->ContourValues->SetValue(i,value);}
00088 
00090   double GetValue(int i) {return this->ContourValues->GetValue(i);}
00091 
00094   double *GetValues() {return this->ContourValues->GetValues();}
00095 
00097 
00100   void GetValues(double *contourValues) {
00101     this->ContourValues->GetValues(contourValues);}
00103 
00105 
00108   void SetNumberOfContours(int number) {
00109     this->ContourValues->SetNumberOfContours(number);}
00111 
00113 
00114   int GetNumberOfContours() {
00115     return this->ContourValues->GetNumberOfContours();}
00117 
00119 
00121   void GenerateValues(int numContours, double range[2]) {
00122     this->ContourValues->GenerateValues(numContours, range);}
00124 
00126 
00128   void GenerateValues(int numContours, double rangeStart, double rangeEnd)
00129     {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00131 
00133 
00134   int *GetExecuteExtent() {return this->ExecuteExtent;}
00135   void ThreadedExecute(int *exExt, int threadId, vtkStructuredGrid *input,
00136                        vtkInformationVector **inVec,
00137                        vtkInformation *outInfo);
00139 
00142   void SetInputMemoryLimit(long limit);
00143 
00145 
00148   vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
00149   vtkGetMacro(OutputPointsPrecision, int);
00151 
00152 protected:
00153   vtkGridSynchronizedTemplates3D();
00154   ~vtkGridSynchronizedTemplates3D();
00155 
00156   virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00157   virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00158   virtual int FillInputPortInformation(int port, vtkInformation *info);
00159 
00160   int ComputeNormals;
00161   int ComputeGradients;
00162   int ComputeScalars;
00163   int GenerateTriangles;
00164 
00165   vtkContourValues *ContourValues;
00166 
00167   int MinimumPieceSize[3];
00168   int ExecuteExtent[6];
00169   int OutputPointsPrecision;
00170 
00171 private:
00172   vtkGridSynchronizedTemplates3D(const vtkGridSynchronizedTemplates3D&);  // Not implemented.
00173   void operator=(const vtkGridSynchronizedTemplates3D&);  // Not implemented.
00174 };
00175 
00176 
00177 #endif