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

Patented/vtkGridSynchronizedTemplates3D.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkGridSynchronizedTemplates3D.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 =========================================================================*/
00041 #ifndef __vtkGridSynchronizedTemplates3D_h
00042 #define __vtkGridSynchronizedTemplates3D_h
00043 
00044 #include "vtkStructuredGridToPolyDataFilter.h"
00045 #include "vtkContourValues.h" // Because it passes all the calls to it
00046 
00047 class vtkKitwareContourFilter;
00048 class vtkMultiThreader;
00049 
00050 class VTK_PATENTED_EXPORT vtkGridSynchronizedTemplates3D : public vtkStructuredGridToPolyDataFilter
00051 {
00052 public:
00053   static vtkGridSynchronizedTemplates3D *New();
00054   vtkTypeRevisionMacro(vtkGridSynchronizedTemplates3D,vtkStructuredGridToPolyDataFilter);
00055   void PrintSelf(ostream& os, vtkIndent indent);
00056 
00058   unsigned long int GetMTime();
00059 
00061 
00065   vtkSetMacro(ComputeNormals,int);
00066   vtkGetMacro(ComputeNormals,int);
00067   vtkBooleanMacro(ComputeNormals,int);
00069 
00071 
00077   vtkSetMacro(ComputeGradients,int);
00078   vtkGetMacro(ComputeGradients,int);
00079   vtkBooleanMacro(ComputeGradients,int);
00081 
00083 
00084   vtkSetMacro(ComputeScalars,int);
00085   vtkGetMacro(ComputeScalars,int);
00086   vtkBooleanMacro(ComputeScalars,int);
00088 
00091   void SetValue(int i, double value) {this->ContourValues->SetValue(i,value);}
00092 
00094   double GetValue(int i) {return this->ContourValues->GetValue(i);}
00095 
00098   double *GetValues() {return this->ContourValues->GetValues();}
00099 
00101 
00104   void GetValues(double *contourValues) {
00105     this->ContourValues->GetValues(contourValues);}
00107 
00109 
00112   void SetNumberOfContours(int number) {
00113     this->ContourValues->SetNumberOfContours(number);}
00115 
00117 
00118   int GetNumberOfContours() {
00119     return this->ContourValues->GetNumberOfContours();}
00121 
00123 
00125   void GenerateValues(int numContours, double range[2]) {
00126     this->ContourValues->GenerateValues(numContours, range);}
00128 
00130 
00132   void GenerateValues(int numContours, double rangeStart, double rangeEnd)
00133     {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00135 
00137 
00138   int *GetExecuteExtent() {return this->ExecuteExtent;}
00139   void ThreadedExecute(int *exExt, int threadId);
00141 
00143 
00144   vtkSetClampMacro( NumberOfThreads, int, 1, VTK_MAX_THREADS );
00145   vtkGetMacro( NumberOfThreads, int );
00147 
00150   void SetInputMemoryLimit(long limit);
00151 
00153 
00156   vtkGetStringMacro(InputScalarsSelection);
00157   void SelectInputScalars(const char *fieldName) 
00158     {this->SetInputScalarsSelection(fieldName);}
00160   
00161 protected:
00162   vtkGridSynchronizedTemplates3D();
00163   ~vtkGridSynchronizedTemplates3D();
00164 
00165   void Execute();
00166   void ExecuteInformation();
00167 
00168   void ComputeInputUpdateExtents( vtkDataObject *output );
00169 
00170   int ComputeNormals;
00171   int ComputeGradients;
00172   int ComputeScalars;
00173   vtkContourValues *ContourValues;
00174 
00175   int NumberOfThreads;
00176   vtkMultiThreader *Threader;
00177   int MinimumPieceSize[3];
00178   int ExecuteExtent[6];
00179 
00180   vtkPolyData *Threads[VTK_MAX_THREADS];
00181 
00182   char *InputScalarsSelection;
00183   vtkSetStringMacro(InputScalarsSelection);
00184 
00185 private:
00186   //BTX
00187   friend class VTK_PATENTED_EXPORT vtkKitwareContourFilter;
00188   //ETX
00189 private:
00190   vtkGridSynchronizedTemplates3D(const vtkGridSynchronizedTemplates3D&);  // Not implemented.
00191   void operator=(const vtkGridSynchronizedTemplates3D&);  // Not implemented.
00192 };
00193 
00194 
00195 #endif