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

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          28 Corporate Drive Suite 204,
00022          Clifton Park, NY 12065
00023          Phone:1-518-371-3971 
00024      for more information.
00025 
00026 =========================================================================*/
00056 #ifndef __vtkRectilinearSynchronizedTemplates_h
00057 #define __vtkRectilinearSynchronizedTemplates_h
00058 
00059 #include "vtkPolyDataSource.h"
00060 #include "vtkContourValues.h" // Passes calls through
00061 
00062 class vtkRectilinearGrid;
00063 class vtkKitwareContourFilter;
00064 class vtkDataArray;
00065 
00066 class VTK_PATENTED_EXPORT vtkRectilinearSynchronizedTemplates : public vtkPolyDataSource
00067 {
00068 public:
00069   static vtkRectilinearSynchronizedTemplates *New();
00070 
00071   vtkTypeRevisionMacro(vtkRectilinearSynchronizedTemplates,vtkPolyDataSource);
00072   void PrintSelf(ostream& os, vtkIndent indent);
00073   
00075 
00076   void SetInput(vtkRectilinearGrid *input);
00077   vtkRectilinearGrid *GetInput();
00079   
00081   unsigned long int GetMTime();
00082 
00084 
00088   vtkSetMacro(ComputeNormals,int);
00089   vtkGetMacro(ComputeNormals,int);
00090   vtkBooleanMacro(ComputeNormals,int);
00092 
00094 
00100   vtkSetMacro(ComputeGradients,int);
00101   vtkGetMacro(ComputeGradients,int);
00102   vtkBooleanMacro(ComputeGradients,int);
00104 
00106 
00107   vtkSetMacro(ComputeScalars,int);
00108   vtkGetMacro(ComputeScalars,int);
00109   vtkBooleanMacro(ComputeScalars,int);
00111 
00114   void SetValue(int i, double value) {this->ContourValues->SetValue(i,value);}
00115 
00117   double GetValue(int i) {return this->ContourValues->GetValue(i);}
00118 
00121   double *GetValues() {return this->ContourValues->GetValues();}
00122 
00124 
00127   void GetValues(double *contourValues) {
00128     this->ContourValues->GetValues(contourValues);}
00130 
00132 
00135   void SetNumberOfContours(int number) {
00136     this->ContourValues->SetNumberOfContours(number);}
00138 
00140 
00141   int GetNumberOfContours() {
00142     return this->ContourValues->GetNumberOfContours();}
00144 
00146 
00148   void GenerateValues(int numContours, double range[2]) {
00149     this->ContourValues->GenerateValues(numContours, range);}
00151 
00153 
00155   void GenerateValues(int numContours, double rangeStart, double rangeEnd)
00156     {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00158 
00160   int *GetExecuteExtent() {return this->ExecuteExtent;}
00161 
00163 
00166   vtkGetStringMacro(InputScalarsSelection);
00167   void SelectInputScalars(const char *fieldName) 
00168     {this->SetInputScalarsSelection(fieldName);}
00170 
00172 
00174   vtkSetMacro(ArrayComponent, int);
00175   vtkGetMacro(ArrayComponent, int);
00177 
00179 
00182   void ComputeSpacing(vtkRectilinearGrid *data, int i, int j, int k,
00183                       int extent[6], double spacing[6]);
00185   
00186 protected:
00187   vtkRectilinearSynchronizedTemplates();
00188   ~vtkRectilinearSynchronizedTemplates();
00189 
00190   int ComputeNormals;
00191   int ComputeGradients;
00192   int ComputeScalars;
00193   vtkContourValues *ContourValues;
00194 
00195   void Execute();
00196   void ExecuteInformation();
00197 
00198   void ComputeInputUpdateExtents(vtkDataObject *output);
00199   
00200   int ExecuteExtent[6];
00201 
00202   char *InputScalarsSelection;
00203   vtkSetStringMacro(InputScalarsSelection);
00204 
00205   int ArrayComponent;
00206 
00207   void* GetScalarsForExtent(vtkDataArray *array, int extent[6]);
00208 
00209   virtual int FillInputPortInformation(int, vtkInformation*);
00210 private:
00211   //BTX
00212   friend class VTK_PATENTED_EXPORT vtkKitwareContourFilter;
00213   //ETX
00214   
00215 private:
00216   vtkRectilinearSynchronizedTemplates(const vtkRectilinearSynchronizedTemplates&);  // Not implemented.
00217   void operator=(const vtkRectilinearSynchronizedTemplates&);  // Not implemented.
00218 };
00219 
00220 
00221 
00222 
00223 
00224 
00225 
00226 // template table.
00227 //BTX
00228 
00229 extern int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_1[];
00230 extern int VTK_RECTILINEAR_SYNCHONIZED_TEMPLATES_TABLE_2[];
00231 
00232 //ETX
00233 
00234 #endif
00235