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

Patented/vtkSynchronizedTemplates2D.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkSynchronizedTemplates2D.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 __vtkSynchronizedTemplates2D_h
00042 #define __vtkSynchronizedTemplates2D_h
00043 
00044 #include "vtkPolyDataSource.h"
00045 
00046 #include "vtkContourValues.h" // Needed for direct access to ContourValues
00047 
00048 class vtkImageData;
00049 class vtkKitwareContourFilter;
00050 
00051 class VTK_PATENTED_EXPORT vtkSynchronizedTemplates2D : public vtkPolyDataSource
00052 {
00053 public:
00054   static vtkSynchronizedTemplates2D *New();
00055   vtkTypeRevisionMacro(vtkSynchronizedTemplates2D,vtkPolyDataSource);
00056   void PrintSelf(ostream& os, vtkIndent indent);
00057 
00059 
00060   void SetInput(vtkImageData *input);
00061   vtkImageData *GetInput();
00063   
00065   unsigned long int GetMTime();
00066 
00069   void SetValue(int i, double value) {this->ContourValues->SetValue(i,value);}
00070 
00072   double GetValue(int i) {return this->ContourValues->GetValue(i);}
00073 
00076   double *GetValues() {return this->ContourValues->GetValues();}
00077 
00079 
00082   void GetValues(double *contourValues) {
00083     this->ContourValues->GetValues(contourValues);}
00085 
00087 
00090   void SetNumberOfContours(int number) {
00091     this->ContourValues->SetNumberOfContours(number);}
00093 
00095 
00096   int GetNumberOfContours() {
00097     return this->ContourValues->GetNumberOfContours();}
00099 
00101 
00103   void GenerateValues(int numContours, double range[2]) {
00104     this->ContourValues->GenerateValues(numContours, range);}
00106 
00108 
00110   void GenerateValues(int numContours, double rangeStart, double rangeEnd)
00111     {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00113 
00115 
00117   vtkSetMacro(ComputeScalars,int);
00118   vtkGetMacro(ComputeScalars,int);
00119   vtkBooleanMacro(ComputeScalars,int);
00121 
00123 
00126   vtkGetStringMacro(InputScalarsSelection);
00127   void SelectInputScalars(const char *fieldName) 
00128     {this->SetInputScalarsSelection(fieldName);}
00130   
00132 
00134   vtkSetMacro(ArrayComponent, int);
00135   vtkGetMacro(ArrayComponent, int);
00137   
00138 protected:
00139   vtkSynchronizedTemplates2D();
00140   ~vtkSynchronizedTemplates2D();
00141 
00142   void Execute();
00143   vtkContourValues *ContourValues;
00144 
00145   int ComputeScalars;
00146   int ArrayComponent;
00147   
00148   char *InputScalarsSelection;
00149   vtkSetStringMacro(InputScalarsSelection);
00150 
00151 private:
00152   //BTX
00153   friend class VTK_PATENTED_EXPORT vtkKitwareContourFilter;
00154   //ETX
00155 private:
00156   vtkSynchronizedTemplates2D(const vtkSynchronizedTemplates2D&);  // Not implemented.
00157   void operator=(const vtkSynchronizedTemplates2D&);  // Not implemented.
00158 };
00159 
00160 
00161 #endif
00162