VTK
vtkContour3DLinearGrid.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkContour3DLinearGrid.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 =========================================================================*/
90 #ifndef vtkContour3DLinearGrid_h
91 #define vtkContour3DLinearGrid_h
92 
93 #include "vtkFiltersCoreModule.h" // For export macro
94 #include "vtkPolyDataAlgorithm.h"
95 #include "vtkContourValues.h" // Needed for inline methods
96 
98 
99 
100 class VTKFILTERSCORE_EXPORT vtkContour3DLinearGrid : public vtkPolyDataAlgorithm
101 {
102 public:
104 
107  static vtkContour3DLinearGrid *New();
109  void PrintSelf(ostream& os, vtkIndent indent) override;
111 
113 
116  void SetValue(int i, double value);
117  double GetValue(int i);
118  double *GetValues();
119  void GetValues(double *contourValues);
120  void SetNumberOfContours(int number);
121  int GetNumberOfContours();
122  void GenerateValues(int numContours, double range[2]);
123  void GenerateValues(int numContours, double rangeStart, double rangeEnd);
125 
127 
132  vtkSetMacro(MergePoints,vtkTypeBool);
133  vtkGetMacro(MergePoints,vtkTypeBool);
134  vtkBooleanMacro(MergePoints,vtkTypeBool);
136 
138 
142  vtkSetMacro(InterpolateAttributes,vtkTypeBool);
143  vtkGetMacro(InterpolateAttributes,vtkTypeBool);
144  vtkBooleanMacro(InterpolateAttributes,vtkTypeBool);
146 
148 
153  vtkSetMacro(ComputeNormals,vtkTypeBool);
154  vtkGetMacro(ComputeNormals,vtkTypeBool);
155  vtkBooleanMacro(ComputeNormals,vtkTypeBool);
157 
159 
164  void SetOutputPointsPrecision(int precision);
165  int GetOutputPointsPrecision() const;
167 
172  vtkMTimeType GetMTime() override;
173 
175 
183  vtkSetMacro(SequentialProcessing,vtkTypeBool)
184  vtkGetMacro(SequentialProcessing,vtkTypeBool);
185  vtkBooleanMacro(SequentialProcessing,vtkTypeBool);
187 
192  int GetNumberOfThreadsUsed()
193  {return this->NumberOfThreadsUsed;}
194 
203  bool GetLargeIds()
204  {return this->LargeIds;}
205 
206 protected:
208  ~vtkContour3DLinearGrid() override;
209 
217  bool LargeIds; //indicate whether integral ids are large(==true) or not
218 
219  int RequestData(vtkInformation* request,
220  vtkInformationVector** inputVector,
221  vtkInformationVector* outputVector) override;
222  int FillInputPortInformation(int port, vtkInformation *info) override;
223 
224 private:
226  void operator=(const vtkContour3DLinearGrid&) = delete;
227 };
228 
233 inline void vtkContour3DLinearGrid::SetValue(int i, double value)
234 {this->ContourValues->SetValue(i,value);}
235 
240 {return this->ContourValues->GetValue(i);}
241 
247 {return this->ContourValues->GetValues();}
248 
254 inline void vtkContour3DLinearGrid::GetValues(double *contourValues)
255 {this->ContourValues->GetValues(contourValues);}
256 
263 {this->ContourValues->SetNumberOfContours(number);}
264 
269 {return this->ContourValues->GetNumberOfContours();}
270 
275 inline void vtkContour3DLinearGrid::GenerateValues(int numContours, double range[2])
276 {this->ContourValues->GenerateValues(numContours, range);}
277 
282 inline void vtkContour3DLinearGrid::GenerateValues(int numContours, double
283  rangeStart, double rangeEnd)
284 {this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd);}
285 
286 
287 #endif
helper object to manage setting and generating contour values
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
int GetNumberOfContours()
Get the number of contours in the list of contour values.
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:69
fast generation of isosurface from 3D linear cells
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:39
dataset represents arbitrary combinations of all possible cell types
void SetValue(int i, double value)
Methods to set / get contour values.
virtual vtkMTimeType GetMTime()
Return this object's modified time.
double GetValue(int i)
Get the ith contour value.
void SetNumberOfContours(int number)
Set the number of contours to place into the list.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
bool GetLargeIds()
Inform the user as to whether large ids were used during filter execution.
double * GetValues()
Get a pointer to an array of contour values.
vtkContourValues * ContourValues
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.