VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkGenericContourFilter.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 =========================================================================*/ 00045 #ifndef __vtkGenericContourFilter_h 00046 #define __vtkGenericContourFilter_h 00047 00048 #include "vtkPolyDataAlgorithm.h" 00049 00050 class vtkContourValues; 00051 class vtkIncrementalPointLocator; 00052 class vtkPointData; 00053 class vtkCellData; 00054 00055 class VTK_GENERIC_FILTERING_EXPORT vtkGenericContourFilter : public vtkPolyDataAlgorithm 00056 { 00057 public: 00058 vtkTypeMacro(vtkGenericContourFilter, 00059 vtkPolyDataAlgorithm); 00060 00061 void PrintSelf(ostream& os, vtkIndent indent); 00062 00065 static vtkGenericContourFilter *New(); 00066 00067 //BTX 00068 typedef double PointType[3]; // Arbitrary definition of a point 00069 //ETX 00070 00072 00073 void SetValue(int i, float value); 00074 double GetValue(int i); 00075 double *GetValues(); 00076 void GetValues(double *contourValues); 00077 void SetNumberOfContours(int number); 00078 int GetNumberOfContours(); 00079 void GenerateValues(int numContours, double range[2]); 00080 void GenerateValues(int numContours, double rangeStart, double rangeEnd); 00082 00084 unsigned long GetMTime(); 00085 00087 00091 vtkSetMacro(ComputeNormals,int); 00092 vtkGetMacro(ComputeNormals,int); 00093 vtkBooleanMacro(ComputeNormals,int); 00095 00097 00103 vtkSetMacro(ComputeGradients,int); 00104 vtkGetMacro(ComputeGradients,int); 00105 vtkBooleanMacro(ComputeGradients,int); 00107 00109 00110 vtkSetMacro(ComputeScalars,int); 00111 vtkGetMacro(ComputeScalars,int); 00112 vtkBooleanMacro(ComputeScalars,int); 00114 00116 00118 void SetLocator(vtkIncrementalPointLocator *locator); 00119 vtkGetObjectMacro(Locator,vtkIncrementalPointLocator); 00121 00124 void CreateDefaultLocator(); 00125 00127 00130 vtkGetStringMacro(InputScalarsSelection); 00131 virtual void SelectInputScalars(const char *fieldName); 00133 00134 protected: 00135 vtkGenericContourFilter(); 00136 ~vtkGenericContourFilter(); 00137 00138 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00139 00140 int FillInputPortInformation(int, vtkInformation*); 00141 00142 vtkContourValues *ContourValues; 00143 int ComputeNormals; 00144 int ComputeGradients; 00145 int ComputeScalars; 00146 vtkIncrementalPointLocator *Locator; 00147 00148 char *InputScalarsSelection; 00149 vtkSetStringMacro(InputScalarsSelection); 00150 00151 // Used internal by vtkGenericAdaptorCell::Contour() 00152 vtkPointData *InternalPD; 00153 vtkPointData *SecondaryPD; 00154 vtkCellData *SecondaryCD; 00155 00156 private: 00157 vtkGenericContourFilter(const vtkGenericContourFilter&); // Not implemented. 00158 void operator=(const vtkGenericContourFilter&); // Not implemented. 00159 }; 00160 #endif