Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

Patented/vtkRectilinearSynchronizedTemplates.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkRectilinearSynchronizedTemplates.h,v $
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 
00015      THIS CLASS IS PATENT PENDING.
00016 
00017      Application of this software for commercial purposes requires 
00018      a license grant from Kitware. Contact:
00019          Ken Martin
00020          Kitware
00021          469 Clifton Corporate Parkway,
00022          Clifton Park, NY 12065
00023          Phone:1-518-371-3971 
00024      for more information.
00025 
00026 =========================================================================*/
00046 #ifndef __vtkRectilinearSynchronizedTemplates_h
00047 #define __vtkRectilinearSynchronizedTemplates_h
00048 
00049 #include "vtkPolyDataSource.h"
00050 #include "vtkContourValues.h" // Passes calls through
00051 
00052 class vtkRectilinearGrid;
00053 class vtkKitwareContourFilter;
00054 class vtkDataArray;
00055 
00056 class VTK_PATENTED_EXPORT vtkRectilinearSynchronizedTemplates : public vtkPolyDataSource
00057 {
00058 public:
00059   static vtkRectilinearSynchronizedTemplates *New();
00060 
00061   vtkTypeRevisionMacro(vtkRectilinearSynchronizedTemplates,vtkPolyDataSource);
00062   void PrintSelf(ostream& os, vtkIndent indent);
00063   
00065 
00066   void SetInput(vtkRectilinearGrid *input);
00067   vtkRectilinearGrid *GetInput();
00069   
00071   unsigned long int GetMTime();
00072 
00074 
00078   vtkSetMacro(ComputeNormals,int);
00079   vtkGetMacro(ComputeNormals,int);
00080   vtkBooleanMacro(ComputeNormals,int);
00082 
00084 
00090   vtkSetMacro(ComputeGradients,int);
00091   vtkGetMacro(ComputeGradients,int);
00092   vtkBooleanMacro(ComputeGradients,int);
00094 
00096 
00097   vtkSetMacro(ComputeScalars,int);
00098   vtkGetMacro(ComputeScalars,int);
00099   vtkBooleanMacro(ComputeScalars,int);
00101 
00104   void SetValue(int i, double value) {this->ContourValues->SetValue(i,value);}
00105 
00107   double GetValue(int i) {return this->ContourValues->GetValue(i);}
00108 
00111   double *GetValues() {return this->ContourValues->GetValues();}
00112 
00114 
00117   void GetValues(double *contourValues) {
00118     this->ContourValues->GetValues(contourValues);}
00120 
00122 
00125   void SetNumberOfContours(int number) {
00126     this->ContourValues->SetNumberOfContours(number);}
00128 
00130 
00131   int GetNumberOfContours() {
00132     return this->ContourValues->GetNumberOfContours();}
00134 
00136 
00138   void GenerateValues(int numContours, double range[2]) {
00139     this->ContourValues->GenerateValues(numContours, range);}
00141 
00143 
00145   void GenerateValues(int numContours, double rangeStart, double rangeEnd)
00146     {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00148 
00150   int *GetExecuteExtent() {return this->ExecuteExtent;}
00151 
00153 
00156   vtkGetStringMacro(InputScalarsSelection);
00157   void SelectInputScalars(const char *fieldName) 
00158     {this->SetInputScalarsSelection(fieldName);}
00160 
00162 
00164   vtkSetMacro(ArrayComponent, int);
00165   vtkGetMacro(ArrayComponent, int);
00167 
00169 
00172   void ComputeSpacing(vtkRectilinearGrid *data, int i, int j, int k,
00173                       int extent[6], double spacing[6]);
00175   
00176 protected:
00177   vtkRectilinearSynchronizedTemplates();
00178   ~vtkRectilinearSynchronizedTemplates();
00179 
00180   int ComputeNormals;
00181   int ComputeGradients;
00182   int ComputeScalars;
00183   vtkContourValues *ContourValues;
00184 
00185   void Execute();
00186   void ExecuteInformation();
00187 
00188   void ComputeInputUpdateExtents(vtkDataObject *output);
00189   
00190   int ExecuteExtent[6];
00191 
00192   char *InputScalarsSelection;
00193   vtkSetStringMacro(InputScalarsSelection);
00194 
00195   int ArrayComponent;
00196 
00197   void* GetScalarsForExtent(vtkDataArray *array, int extent[6]);
00198   
00199 private:
00200   //BTX
00201   friend class VTK_PATENTED_EXPORT vtkKitwareContourFilter;
00202   //ETX
00203   
00204 private:
00205   vtkRectilinearSynchronizedTemplates(const vtkRectilinearSynchronizedTemplates&);  // Not implemented.
00206   void operator=(const vtkRectilinearSynchronizedTemplates&);  // Not implemented.
00207 };
00208 
00209 
00210 
00211 
00212 
00213 
00214 
00215 // template table.
00216 //BTX
00217 
00218 extern int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_1[];
00219 extern int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_2[];
00220 
00221 //ETX
00222 
00223 #endif
00224