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 =========================================================================*/
46 #ifndef vtkGenericContourFilter_h
47 #define vtkGenericContourFilter_h
48 
49 #include "vtkFiltersGenericModule.h" // For export macro
50 #include "vtkPolyDataAlgorithm.h"
51 
52 class vtkContourValues;
54 class vtkPointData;
55 class vtkCellData;
56 
57 class VTKFILTERSGENERIC_EXPORT vtkGenericContourFilter : public vtkPolyDataAlgorithm
58 {
59 public:
60  vtkTypeMacro(vtkGenericContourFilter,
62 
63  void PrintSelf(ostream& os, vtkIndent indent) override;
64 
69  static vtkGenericContourFilter *New();
70 
71  typedef double PointType[3]; // Arbitrary definition of a point
72 
74 
77  void SetValue(int i, float value);
78  double GetValue(int i);
79  double *GetValues();
80  void GetValues(double *contourValues);
81  void SetNumberOfContours(int number);
82  int GetNumberOfContours();
83  void GenerateValues(int numContours, double range[2]);
84  void GenerateValues(int numContours, double rangeStart, double rangeEnd);
86 
90  vtkMTimeType GetMTime() override;
91 
93 
99  vtkSetMacro(ComputeNormals,vtkTypeBool);
100  vtkGetMacro(ComputeNormals,vtkTypeBool);
101  vtkBooleanMacro(ComputeNormals,vtkTypeBool);
103 
105 
113  vtkSetMacro(ComputeGradients,vtkTypeBool);
114  vtkGetMacro(ComputeGradients,vtkTypeBool);
115  vtkBooleanMacro(ComputeGradients,vtkTypeBool);
117 
119 
122  vtkSetMacro(ComputeScalars,vtkTypeBool);
123  vtkGetMacro(ComputeScalars,vtkTypeBool);
124  vtkBooleanMacro(ComputeScalars,vtkTypeBool);
126 
128 
132  void SetLocator(vtkIncrementalPointLocator *locator);
133  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
135 
140  void CreateDefaultLocator();
141 
143 
148  vtkGetStringMacro(InputScalarsSelection);
149  virtual void SelectInputScalars(const char *fieldName);
151 
152 protected:
154  ~vtkGenericContourFilter() override;
155 
157 
158  int FillInputPortInformation(int, vtkInformation*) override;
159 
165 
167  vtkSetStringMacro(InputScalarsSelection);
168 
169  // Used internal by vtkGenericAdaptorCell::Contour()
173 
174 private:
176  void operator=(const vtkGenericContourFilter&) = delete;
177 };
178 #endif
vtkGenericContourFilter
generate isocontours from input dataset
Definition: vtkGenericContourFilter.h:57
vtkGenericContourFilter::ComputeGradients
vtkTypeBool ComputeGradients
Definition: vtkGenericContourFilter.h:162
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:37
vtkX3D::value
Definition: vtkX3D.h:220
vtkGenericContourFilter::ContourValues
vtkContourValues * ContourValues
Definition: vtkGenericContourFilter.h:160
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkX3D::range
Definition: vtkX3D.h:238
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyDataAlgorithm.h
vtkGenericContourFilter::InternalPD
vtkPointData * InternalPD
Definition: vtkGenericContourFilter.h:167
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkGenericContourFilter::Locator
vtkIncrementalPointLocator * Locator
Definition: vtkGenericContourFilter.h:164
vtkContourValues
helper object to manage setting and generating contour values
Definition: vtkContourValues.h:35
vtkCellData
represent and manipulate cell attribute data
Definition: vtkCellData.h:38
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkGenericContourFilter::SecondaryCD
vtkCellData * SecondaryCD
Definition: vtkGenericContourFilter.h:172
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:51
vtkPolyDataAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkGenericContourFilter::InputScalarsSelection
char * InputScalarsSelection
Definition: vtkGenericContourFilter.h:166
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkGenericContourFilter::ComputeScalars
vtkTypeBool ComputeScalars
Definition: vtkGenericContourFilter.h:163
vtkGenericContourFilter::SecondaryPD
vtkPointData * SecondaryPD
Definition: vtkGenericContourFilter.h:171
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkGenericContourFilter::ComputeNormals
vtkTypeBool ComputeNormals
Definition: vtkGenericContourFilter.h:161
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:44