Patented/vtkGridSynchronizedTemplates3D.h Source File

Main Page Class Hierarchy Alphabetical List Compound List File List Compound 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   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    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 =========================================================================*/
    00056 #ifndef __vtkGridSynchronizedTemplates3D_h
    00057 #define __vtkGridSynchronizedTemplates3D_h
    00058
    00059 #include "vtkStructuredGridToPolyDataFilter.h"
    00060 #include "vtkContourValues.h" // Because it passes all the calls to it
    00061
    00062 class vtkKitwareContourFilter;
    00063 class vtkMultiThreader;
    00064
    00065 class VTK_PATENTED_EXPORT vtkGridSynchronizedTemplates3D : public vtkStructuredGridToPolyDataFilter
    00066 {
    00067 public:
    00068   static vtkGridSynchronizedTemplates3D *New();
    00069   vtkTypeRevisionMacro(vtkGridSynchronizedTemplates3D,vtkStructuredGridToPolyDataFilter);
    00070   void PrintSelf(ostream& os, vtkIndent indent);
    00071
    00073   unsigned long int GetMTime();
    00074
    00076
    00080   vtkSetMacro(ComputeNormals,int);
    00081   vtkGetMacro(ComputeNormals,int);
    00082   vtkBooleanMacro(ComputeNormals,int);
    00084
    00086
    00092   vtkSetMacro(ComputeGradients,int);
    00093   vtkGetMacro(ComputeGradients,int);
    00094   vtkBooleanMacro(ComputeGradients,int);
    00096
    00098
    00099   vtkSetMacro(ComputeScalars,int);
    00100   vtkGetMacro(ComputeScalars,int);
    00101   vtkBooleanMacro(ComputeScalars,int);
    00103
    00106   void SetValue(int i, float value) {this->ContourValues->SetValue(i,value);}
    00107
    00109   float GetValue(int i) {return this->ContourValues->GetValue(i);}
    00110
    00113   float *GetValues() {return this->ContourValues->GetValues();}
    00114
    00116
    00119   void GetValues(float *contourValues) {
    00120     this->ContourValues->GetValues(contourValues);}
    00122
    00124
    00127   void SetNumberOfContours(int number) {
    00128     this->ContourValues->SetNumberOfContours(number);}
    00130
    00132
    00133   int GetNumberOfContours() {
    00134     return this->ContourValues->GetNumberOfContours();}
    00136
    00138
    00140   void GenerateValues(int numContours, float range[2]) {
    00141     this->ContourValues->GenerateValues(numContours, range);}
    00143
    00145
    00147   void GenerateValues(int numContours, float rangeStart, float rangeEnd)
    00148     {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
    00150
    00152
    00153   int *GetExecuteExtent() {return this->ExecuteExtent;}
    00154   void ThreadedExecute(int *exExt, int threadId);
    00156
    00158
    00159   vtkSetClampMacro( NumberOfThreads, int, 1, VTK_MAX_THREADS );
    00160   vtkGetMacro( NumberOfThreads, int );
    00162
    00165   void SetInputMemoryLimit(long limit);
    00166
    00167 protected:
    00168   vtkGridSynchronizedTemplates3D();
    00169   ~vtkGridSynchronizedTemplates3D();
    00170
    00172
    00175   vtkGetStringMacro(InputScalarsSelection);
    00176   void SelectInputScalars(const char *fieldName)
    00177     {this->SetInputScalarsSelection(fieldName);}
    00179
    00180   void Execute();
    00181   void ExecuteInformation();
    00182
    00183   void ComputeInputUpdateExtents( vtkDataObject *output );
    00184
    00185   int ComputeNormals;
    00186   int ComputeGradients;
    00187   int ComputeScalars;
    00188   vtkContourValues *ContourValues;
    00189
    00190   int NumberOfThreads;
    00191   vtkMultiThreader *Threader;
    00192   int MinimumPieceSize[3];
    00193   int ExecuteExtent[6];
    00194
    00195   vtkPolyData *Threads[VTK_MAX_THREADS];
    00196
    00197   char *InputScalarsSelection;
    00198   vtkSetStringMacro(InputScalarsSelection);
    00199
    00200 private:
    00201   //BTX
    00202   friend class VTK_PATENTED_EXPORT vtkKitwareContourFilter;
    00203   //ETX
    00204 private:
    00205   vtkGridSynchronizedTemplates3D(const vtkGridSynchronizedTemplates3D&);  // Not implemented.
    00206   void operator=(const vtkGridSynchronizedTemplates3D&);  // Not implemented.
    00207 };
    00208
    00209
    00210 #endif