VTK  9.0.1
vtkGenericCutter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGenericCutter.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 vtkGenericCutter_h
47 #define vtkGenericCutter_h
48 
49 #include "vtkFiltersGenericModule.h" // For export macro
50 #include "vtkPolyDataAlgorithm.h"
51 
52 class vtkContourValues;
53 
56 class vtkPointData;
57 class vtkCellData;
58 
59 class VTKFILTERSGENERIC_EXPORT vtkGenericCutter : public vtkPolyDataAlgorithm
60 {
61 public:
63  void PrintSelf(ostream& os, vtkIndent indent) override;
64 
69  static vtkGenericCutter* New();
70 
75  void SetValue(int i, double value);
76 
80  double GetValue(int i);
81 
86  double* GetValues();
87 
93  void GetValues(double* contourValues);
94 
100  void SetNumberOfContours(int number);
101 
106 
111  void GenerateValues(int numContours, double range[2]);
112 
117  void GenerateValues(int numContours, double rangeStart, double rangeEnd);
118 
123  vtkMTimeType GetMTime() override;
124 
126 
130  vtkGetObjectMacro(CutFunction, vtkImplicitFunction);
132 
134 
139  vtkSetMacro(GenerateCutScalars, vtkTypeBool);
140  vtkGetMacro(GenerateCutScalars, vtkTypeBool);
141  vtkBooleanMacro(GenerateCutScalars, vtkTypeBool);
143 
145 
150  vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
152 
158 
159 protected:
161  ~vtkGenericCutter() override;
162 
164 
170 
175 
176  // Used internal by vtkGenericAdaptorCell::Contour()
180 
181 private:
182  vtkGenericCutter(const vtkGenericCutter&) = delete;
183  void operator=(const vtkGenericCutter&) = delete;
184 };
185 
186 #endif
vtkGenericCutter::SetNumberOfContours
void SetNumberOfContours(int number)
Set the number of contours to place into the list.
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:32
vtkGenericCutter::GenerateValues
void GenerateValues(int numContours, double rangeStart, double rangeEnd)
Generate numContours equally spaced contour values between specified range.
vtkX3D::value
@ value
Definition: vtkX3D.h:226
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkGenericCutter::GetValues
void GetValues(double *contourValues)
Fill a supplied list with contour values.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:36
vtkGenericCutter
cut a vtkGenericDataSet with an implicit function or scalar data
Definition: vtkGenericCutter.h:60
vtkX3D::range
@ range
Definition: vtkX3D.h:244
vtkGenericCutter::SetLocator
void SetLocator(vtkIncrementalPointLocator *locator)
Specify a spatial locator for merging points.
vtkPolyDataAlgorithm.h
vtkImplicitFunction
abstract interface for implicit functions
Definition: vtkImplicitFunction.h:61
vtkGenericCutter::CutFunction
vtkImplicitFunction * CutFunction
Definition: vtkGenericCutter.h:171
vtkContourValues
helper object to manage setting and generating contour values
Definition: vtkContourValues.h:36
vtkGenericCutter::SetValue
void SetValue(int i, double value)
Set a particular contour value at contour number i.
vtkCellData
represent and manipulate cell attribute data
Definition: vtkCellData.h:33
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkGenericCutter::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Actual implementation of the cutter operation.
vtkGenericCutter::SecondaryPD
vtkPointData * SecondaryPD
Definition: vtkGenericCutter.h:178
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:52
vtkGenericCutter::Locator
vtkIncrementalPointLocator * Locator
Definition: vtkGenericCutter.h:172
vtkGenericCutter::FillInputPortInformation
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
vtkGenericCutter::~vtkGenericCutter
~vtkGenericCutter() override
vtkGenericCutter::GenerateCutScalars
vtkTypeBool GenerateCutScalars
Definition: vtkGenericCutter.h:174
vtkGenericCutter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:65
vtkGenericCutter::GenerateValues
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
vtkGenericCutter::GetValue
double GetValue(int i)
Get the ith contour value.
vtkGenericCutter::SecondaryCD
vtkCellData * SecondaryCD
Definition: vtkGenericCutter.h:179
vtkGenericCutter::vtkGenericCutter
vtkGenericCutter(vtkImplicitFunction *cf=nullptr)
vtkGenericCutter::GetMTime
vtkMTimeType GetMTime() override
Override GetMTime because we delegate to vtkContourValues and refer to vtkImplicitFunction.
vtkGenericCutter::GetValues
double * GetValues()
Get a pointer to an array of contour values.
vtkGenericCutter::InternalPD
vtkPointData * InternalPD
Definition: vtkGenericCutter.h:177
vtkGenericCutter::GetNumberOfContours
vtkIdType GetNumberOfContours()
Get the number of contours in the list of contour values.
vtkGenericCutter::SetCutFunction
virtual void SetCutFunction(vtkImplicitFunction *)
Specify the implicit function to perform the cutting.
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkGenericCutter::New
static vtkGenericCutter * New()
Construct with user-specified implicit function; initial value of 0.0; and generating cut scalars tur...
vtkGenericCutter::CreateDefaultLocator
void CreateDefaultLocator()
Create default locator.
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
vtkGenericCutter::ContourValues
vtkContourValues * ContourValues
Definition: vtkGenericCutter.h:173
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:42