VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkSynchronizedTemplates2D.h 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 =========================================================================*/ 00029 #ifndef vtkSynchronizedTemplates2D_h 00030 #define vtkSynchronizedTemplates2D_h 00031 00032 #include "vtkFiltersCoreModule.h" // For export macro 00033 #include "vtkPolyDataAlgorithm.h" 00034 00035 #include "vtkContourValues.h" // Needed for direct access to ContourValues 00036 00037 class vtkImageData; 00038 00039 class VTKFILTERSCORE_EXPORT vtkSynchronizedTemplates2D : public vtkPolyDataAlgorithm 00040 { 00041 public: 00042 static vtkSynchronizedTemplates2D *New(); 00043 vtkTypeMacro(vtkSynchronizedTemplates2D,vtkPolyDataAlgorithm); 00044 void PrintSelf(ostream& os, vtkIndent indent); 00045 00047 unsigned long int GetMTime(); 00048 00051 void SetValue(int i, double value) {this->ContourValues->SetValue(i,value);} 00052 00054 double GetValue(int i) {return this->ContourValues->GetValue(i);} 00055 00058 double *GetValues() {return this->ContourValues->GetValues();} 00059 00061 00064 void GetValues(double *contourValues) { 00065 this->ContourValues->GetValues(contourValues);} 00067 00069 00072 void SetNumberOfContours(int number) { 00073 this->ContourValues->SetNumberOfContours(number);} 00075 00077 00078 int GetNumberOfContours() { 00079 return this->ContourValues->GetNumberOfContours();} 00081 00083 00085 void GenerateValues(int numContours, double range[2]) { 00086 this->ContourValues->GenerateValues(numContours, range);} 00088 00090 00092 void GenerateValues(int numContours, double rangeStart, double rangeEnd) 00093 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);} 00095 00097 00099 vtkSetMacro(ComputeScalars,int); 00100 vtkGetMacro(ComputeScalars,int); 00101 vtkBooleanMacro(ComputeScalars,int); 00103 00105 00107 vtkSetMacro(ArrayComponent, int); 00108 vtkGetMacro(ArrayComponent, int); 00110 00111 protected: 00112 vtkSynchronizedTemplates2D(); 00113 ~vtkSynchronizedTemplates2D(); 00114 00115 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00116 virtual int FillInputPortInformation(int port, vtkInformation *info); 00117 vtkContourValues *ContourValues; 00118 00119 int ComputeScalars; 00120 int ArrayComponent; 00121 00122 private: 00123 vtkSynchronizedTemplates2D(const vtkSynchronizedTemplates2D&); // Not implemented. 00124 void operator=(const vtkSynchronizedTemplates2D&); // Not implemented. 00125 }; 00126 00127 00128 #endif 00129