VTK
dox/Filters/Core/vtkRectilinearSynchronizedTemplates.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkRectilinearSynchronizedTemplates.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 __vtkRectilinearSynchronizedTemplates_h
00034 #define __vtkRectilinearSynchronizedTemplates_h
00035 
00036 #include "vtkFiltersCoreModule.h" // For export macro
00037 #include "vtkPolyDataAlgorithm.h"
00038 #include "vtkContourValues.h" // Passes calls through
00039 
00040 class vtkRectilinearGrid;
00041 class vtkDataArray;
00042 
00043 class VTKFILTERSCORE_EXPORT vtkRectilinearSynchronizedTemplates : public vtkPolyDataAlgorithm
00044 {
00045 public:
00046   static vtkRectilinearSynchronizedTemplates *New();
00047 
00048   vtkTypeMacro(vtkRectilinearSynchronizedTemplates,vtkPolyDataAlgorithm);
00049   void PrintSelf(ostream& os, vtkIndent indent);
00050 
00052   unsigned long int GetMTime();
00053 
00055 
00059   vtkSetMacro(ComputeNormals,int);
00060   vtkGetMacro(ComputeNormals,int);
00061   vtkBooleanMacro(ComputeNormals,int);
00063 
00065 
00071   vtkSetMacro(ComputeGradients,int);
00072   vtkGetMacro(ComputeGradients,int);
00073   vtkBooleanMacro(ComputeGradients,int);
00075 
00077 
00078   vtkSetMacro(ComputeScalars,int);
00079   vtkGetMacro(ComputeScalars,int);
00080   vtkBooleanMacro(ComputeScalars,int);
00082 
00085   void SetValue(int i, double value) {this->ContourValues->SetValue(i,value);}
00086 
00088   double GetValue(int i) {return this->ContourValues->GetValue(i);}
00089 
00092   double *GetValues() {return this->ContourValues->GetValues();}
00093 
00095 
00098   void GetValues(double *contourValues) {
00099     this->ContourValues->GetValues(contourValues);}
00101 
00103 
00106   void SetNumberOfContours(int number) {
00107     this->ContourValues->SetNumberOfContours(number);}
00109 
00111 
00112   int GetNumberOfContours() {
00113     return this->ContourValues->GetNumberOfContours();}
00115 
00117 
00119   void GenerateValues(int numContours, double range[2]) {
00120     this->ContourValues->GenerateValues(numContours, range);}
00122 
00124 
00126   void GenerateValues(int numContours, double rangeStart, double rangeEnd)
00127     {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00129 
00131   int *GetExecuteExtent() {return this->ExecuteExtent;}
00132 
00134 
00136   vtkSetMacro(ArrayComponent, int);
00137   vtkGetMacro(ArrayComponent, int);
00139 
00141 
00143   vtkSetMacro(GenerateTriangles,int);
00144   vtkGetMacro(GenerateTriangles,int);
00145   vtkBooleanMacro(GenerateTriangles,int);
00147 
00149 
00152   void ComputeSpacing(vtkRectilinearGrid *data, int i, int j, int k,
00153                       int extent[6], double spacing[6]);
00155 
00156 protected:
00157   vtkRectilinearSynchronizedTemplates();
00158   ~vtkRectilinearSynchronizedTemplates();
00159 
00160   int ComputeNormals;
00161   int ComputeGradients;
00162   int ComputeScalars;
00163   int GenerateTriangles;
00164 
00165   vtkContourValues *ContourValues;
00166 
00167   virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00168   virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00169   virtual int FillInputPortInformation(int port, vtkInformation *info);
00170 
00171   int ExecuteExtent[6];
00172 
00173   int ArrayComponent;
00174 
00175   void* GetScalarsForExtent(vtkDataArray *array, int extent[6],
00176                             vtkRectilinearGrid *input);
00177 
00178 private:
00179   vtkRectilinearSynchronizedTemplates(const vtkRectilinearSynchronizedTemplates&);  // Not implemented.
00180   void operator=(const vtkRectilinearSynchronizedTemplates&);  // Not implemented.
00181 };
00182 
00183 // template table.
00184 //BTX
00185 
00186 extern int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_1[];
00187 extern int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_2[];
00188 
00189 //ETX
00190 
00191 #endif