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

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          28 Corporate Drive Suite 204,
00022          Clifton Park, NY 12065
00023          Phone:1-518-371-3971 
00024      for more information.
00025 
00026 =========================================================================*/
00053 #ifndef __vtkSynchronizedTemplates2D_h
00054 #define __vtkSynchronizedTemplates2D_h
00055 
00056 #include "vtkPolyDataSource.h"
00057 
00058 #include "vtkContourValues.h" // Needed for direct access to ContourValues
00059 
00060 class vtkImageData;
00061 class vtkKitwareContourFilter;
00062 
00063 class VTK_PATENTED_EXPORT vtkSynchronizedTemplates2D : public vtkPolyDataSource
00064 {
00065 public:
00066   static vtkSynchronizedTemplates2D *New();
00067   vtkTypeRevisionMacro(vtkSynchronizedTemplates2D,vtkPolyDataSource);
00068   void PrintSelf(ostream& os, vtkIndent indent);
00069 
00071 
00072   void SetInput(vtkImageData *input);
00073   vtkImageData *GetInput();
00075   
00077   unsigned long int GetMTime();
00078 
00081   void SetValue(int i, double value) {this->ContourValues->SetValue(i,value);}
00082 
00084   double GetValue(int i) {return this->ContourValues->GetValue(i);}
00085 
00088   double *GetValues() {return this->ContourValues->GetValues();}
00089 
00091 
00094   void GetValues(double *contourValues) {
00095     this->ContourValues->GetValues(contourValues);}
00097 
00099 
00102   void SetNumberOfContours(int number) {
00103     this->ContourValues->SetNumberOfContours(number);}
00105 
00107 
00108   int GetNumberOfContours() {
00109     return this->ContourValues->GetNumberOfContours();}
00111 
00113 
00115   void GenerateValues(int numContours, double range[2]) {
00116     this->ContourValues->GenerateValues(numContours, range);}
00118 
00120 
00122   void GenerateValues(int numContours, double rangeStart, double rangeEnd)
00123     {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
00125 
00127 
00129   vtkSetMacro(ComputeScalars,int);
00130   vtkGetMacro(ComputeScalars,int);
00131   vtkBooleanMacro(ComputeScalars,int);
00133 
00135 
00138   vtkGetStringMacro(InputScalarsSelection);
00139   void SelectInputScalars(const char *fieldName) 
00140     {this->SetInputScalarsSelection(fieldName);}
00142   
00144 
00146   vtkSetMacro(ArrayComponent, int);
00147   vtkGetMacro(ArrayComponent, int);
00149   
00150 protected:
00151   vtkSynchronizedTemplates2D();
00152   ~vtkSynchronizedTemplates2D();
00153 
00154   void Execute();
00155   vtkContourValues *ContourValues;
00156 
00157   int ComputeScalars;
00158   int ArrayComponent;
00159 
00160   virtual int FillInputPortInformation(int, vtkInformation*);
00161   
00162   char *InputScalarsSelection;
00163   vtkSetStringMacro(InputScalarsSelection);
00164 
00165 private:
00166   //BTX
00167   friend class VTK_PATENTED_EXPORT vtkKitwareContourFilter;
00168   //ETX
00169 private:
00170   vtkSynchronizedTemplates2D(const vtkSynchronizedTemplates2D&);  // Not implemented.
00171   void operator=(const vtkSynchronizedTemplates2D&);  // Not implemented.
00172 };
00173 
00174 
00175 #endif
00176