VTK
vtkGenericContourFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGenericContourFilter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
43 #ifndef vtkGenericContourFilter_h
44 #define vtkGenericContourFilter_h
45 
46 #include "vtkFiltersGenericModule.h" // For export macro
47 #include "vtkPolyDataAlgorithm.h"
48 
49 class vtkContourValues;
51 class vtkPointData;
52 class vtkCellData;
53 
54 class VTKFILTERSGENERIC_EXPORT vtkGenericContourFilter : public vtkPolyDataAlgorithm
55 {
56 public:
57  vtkTypeMacro(vtkGenericContourFilter,
59 
60  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
61 
66  static vtkGenericContourFilter *New();
67 
68  typedef double PointType[3]; // Arbitrary definition of a point
69 
71 
74  void SetValue(int i, float value);
75  double GetValue(int i);
76  double *GetValues();
77  void GetValues(double *contourValues);
78  void SetNumberOfContours(int number);
79  int GetNumberOfContours();
80  void GenerateValues(int numContours, double range[2]);
81  void GenerateValues(int numContours, double rangeStart, double rangeEnd);
83 
87  vtkMTimeType GetMTime() VTK_OVERRIDE;
88 
90 
96  vtkSetMacro(ComputeNormals,int);
97  vtkGetMacro(ComputeNormals,int);
98  vtkBooleanMacro(ComputeNormals,int);
100 
102 
110  vtkSetMacro(ComputeGradients,int);
111  vtkGetMacro(ComputeGradients,int);
112  vtkBooleanMacro(ComputeGradients,int);
114 
116 
119  vtkSetMacro(ComputeScalars,int);
120  vtkGetMacro(ComputeScalars,int);
121  vtkBooleanMacro(ComputeScalars,int);
123 
125 
129  void SetLocator(vtkIncrementalPointLocator *locator);
130  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
132 
137  void CreateDefaultLocator();
138 
140 
145  vtkGetStringMacro(InputScalarsSelection);
146  virtual void SelectInputScalars(const char *fieldName);
148 
149 protected:
151  ~vtkGenericContourFilter() VTK_OVERRIDE;
152 
153  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
154 
155  int FillInputPortInformation(int, vtkInformation*) VTK_OVERRIDE;
156 
157  vtkContourValues *ContourValues;
158  int ComputeNormals;
159  int ComputeGradients;
160  int ComputeScalars;
162 
163  char *InputScalarsSelection;
164  vtkSetStringMacro(InputScalarsSelection);
165 
166  // Used internal by vtkGenericAdaptorCell::Contour()
167  vtkPointData *InternalPD;
168  vtkPointData *SecondaryPD;
169  vtkCellData *SecondaryCD;
170 
171 private:
172  vtkGenericContourFilter(const vtkGenericContourFilter&) VTK_DELETE_FUNCTION;
173  void operator=(const vtkGenericContourFilter&) VTK_DELETE_FUNCTION;
174 };
175 #endif
helper object to manage setting and generating contour values
represent and manipulate point attribute data
Definition: vtkPointData.h:31
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
represent and manipulate cell attribute data
Definition: vtkCellData.h:32
Abstract class in support of both point location and point insertion.
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:33
generate isocontours from input dataset
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.