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 "vtkPolyDataAlgorithm.h" 00033 00034 #include "vtkContourValues.h" // Needed for direct access to ContourValues 00035 00036 class vtkImageData; 00037 00038 class VTK_GRAPHICS_EXPORT vtkSynchronizedTemplates2D : public vtkPolyDataAlgorithm 00039 { 00040 public: 00041 static vtkSynchronizedTemplates2D *New(); 00042 vtkTypeMacro(vtkSynchronizedTemplates2D,vtkPolyDataAlgorithm); 00043 void PrintSelf(ostream& os, vtkIndent indent); 00044 00046 unsigned long int GetMTime(); 00047 00050 void SetValue(int i, double value) {this->ContourValues->SetValue(i,value);} 00051 00053 double GetValue(int i) {return this->ContourValues->GetValue(i);} 00054 00057 double *GetValues() {return this->ContourValues->GetValues();} 00058 00060 00063 void GetValues(double *contourValues) { 00064 this->ContourValues->GetValues(contourValues);} 00066 00068 00071 void SetNumberOfContours(int number) { 00072 this->ContourValues->SetNumberOfContours(number);} 00074 00076 00077 int GetNumberOfContours() { 00078 return this->ContourValues->GetNumberOfContours();} 00080 00082 00084 void GenerateValues(int numContours, double range[2]) { 00085 this->ContourValues->GenerateValues(numContours, range);} 00087 00089 00091 void GenerateValues(int numContours, double rangeStart, double rangeEnd) 00092 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);} 00094 00096 00098 vtkSetMacro(ComputeScalars,int); 00099 vtkGetMacro(ComputeScalars,int); 00100 vtkBooleanMacro(ComputeScalars,int); 00102 00104 00106 vtkSetMacro(ArrayComponent, int); 00107 vtkGetMacro(ArrayComponent, int); 00109 00110 protected: 00111 vtkSynchronizedTemplates2D(); 00112 ~vtkSynchronizedTemplates2D(); 00113 00114 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00115 virtual int FillInputPortInformation(int port, vtkInformation *info); 00116 vtkContourValues *ContourValues; 00117 00118 int ComputeScalars; 00119 int ArrayComponent; 00120 00121 private: 00122 vtkSynchronizedTemplates2D(const vtkSynchronizedTemplates2D&); // Not implemented. 00123 void operator=(const vtkSynchronizedTemplates2D&); // Not implemented. 00124 }; 00125 00126 00127 #endif 00128