VTK  9.0.1
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:
58 
59  void PrintSelf(ostream& os, vtkIndent indent) override;
60 
66 
67  typedef double PointType[3]; // Arbitrary definition of a point
68 
70 
73  void SetValue(int i, float value);
74  double GetValue(int i);
75  double* GetValues();
76  void GetValues(double* contourValues);
77  void SetNumberOfContours(int number);
79  void GenerateValues(int numContours, double range[2]);
80  void GenerateValues(int numContours, double rangeStart, double rangeEnd);
82 
86  vtkMTimeType GetMTime() override;
87 
89 
95  vtkSetMacro(ComputeNormals, vtkTypeBool);
96  vtkGetMacro(ComputeNormals, vtkTypeBool);
97  vtkBooleanMacro(ComputeNormals, vtkTypeBool);
99 
101 
109  vtkSetMacro(ComputeGradients, vtkTypeBool);
110  vtkGetMacro(ComputeGradients, vtkTypeBool);
111  vtkBooleanMacro(ComputeGradients, vtkTypeBool);
113 
115 
118  vtkSetMacro(ComputeScalars, vtkTypeBool);
119  vtkGetMacro(ComputeScalars, vtkTypeBool);
120  vtkBooleanMacro(ComputeScalars, vtkTypeBool);
122 
124 
129  vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
131 
137 
139 
144  vtkGetStringMacro(InputScalarsSelection);
145  virtual void SelectInputScalars(const char* fieldName);
147 
148 protected:
151 
153 
155 
161 
163  vtkSetStringMacro(InputScalarsSelection);
164 
165  // Used internal by vtkGenericAdaptorCell::Contour()
169 
170 private:
172  void operator=(const vtkGenericContourFilter&) = delete;
173 };
174 #endif
vtkGenericContourFilter
generate isocontours from input dataset
Definition: vtkGenericContourFilter.h:55
vtkGenericContourFilter::ComputeGradients
vtkTypeBool ComputeGradients
Definition: vtkGenericContourFilter.h:158
vtkGenericContourFilter::SetNumberOfContours
void SetNumberOfContours(int number)
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:32
vtkX3D::value
@ value
Definition: vtkX3D.h:226
vtkGenericContourFilter::ContourValues
vtkContourValues * ContourValues
Definition: vtkGenericContourFilter.h:156
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkGenericContourFilter::~vtkGenericContourFilter
~vtkGenericContourFilter() override
vtkGenericContourFilter::GetValue
double GetValue(int i)
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:36
vtkX3D::range
@ range
Definition: vtkX3D.h:244
vtkGenericContourFilter::CreateDefaultLocator
void CreateDefaultLocator()
Create default locator.
vtkGenericContourFilter::vtkGenericContourFilter
vtkGenericContourFilter()
vtkPolyDataAlgorithm.h
vtkGenericContourFilter::GetValues
double * GetValues()
vtkGenericContourFilter::InternalPD
vtkPointData * InternalPD
Definition: vtkGenericContourFilter.h:163
vtkGenericContourFilter::Locator
vtkIncrementalPointLocator * Locator
Definition: vtkGenericContourFilter.h:160
vtkContourValues
helper object to manage setting and generating contour values
Definition: vtkContourValues.h:36
vtkCellData
represent and manipulate cell attribute data
Definition: vtkCellData.h:33
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkGenericContourFilter::SecondaryCD
vtkCellData * SecondaryCD
Definition: vtkGenericContourFilter.h:168
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:52
vtkGenericContourFilter::GetNumberOfContours
vtkIdType GetNumberOfContours()
vtkGenericContourFilter::SetValue
void SetValue(int i, float value)
Methods to set / get contour values.
vtkGenericContourFilter::InputScalarsSelection
char * InputScalarsSelection
Definition: vtkGenericContourFilter.h:162
vtkGenericContourFilter::SetLocator
void SetLocator(vtkIncrementalPointLocator *locator)
Set / get a spatial locator for merging points.
vtkGenericContourFilter::SelectInputScalars
virtual void SelectInputScalars(const char *fieldName)
vtkGenericContourFilter::GenerateValues
void GenerateValues(int numContours, double rangeStart, double rangeEnd)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:65
vtkGenericContourFilter::GetMTime
vtkMTimeType GetMTime() override
Modified GetMTime Because we delegate to vtkContourValues.
vtkGenericContourFilter::New
static vtkGenericContourFilter * New()
Construct object with initial range (0,1) and single contour value of 0.0.
vtkGenericContourFilter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGenericContourFilter::ComputeScalars
vtkTypeBool ComputeScalars
Definition: vtkGenericContourFilter.h:159
vtkGenericContourFilter::GetValues
void GetValues(double *contourValues)
vtkGenericContourFilter::FillInputPortInformation
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
vtkGenericContourFilter::SecondaryPD
vtkPointData * SecondaryPD
Definition: vtkGenericContourFilter.h:167
vtkGenericContourFilter::GenerateValues
void GenerateValues(int numContours, double range[2])
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkGenericContourFilter::ComputeNormals
vtkTypeBool ComputeNormals
Definition: vtkGenericContourFilter.h:157
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
vtkGenericContourFilter::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:42