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 
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
vtkContourValues::GetValues
double * GetValues()
Return a pointer to a list of contour values.
vtkContour3DLinearGrid::GetNumberOfContours
int GetNumberOfContours()
Get the number of contours in the list of contour values.
Definition: vtkContour3DLinearGrid.h:268
vtkContourValues::GetNumberOfContours
int GetNumberOfContours()
Return the number of contours in the.
vtkContour3DLinearGrid::MergePoints
vtkTypeBool MergePoints
Definition: vtkContour3DLinearGrid.h:212
vtkContour3DLinearGrid::NumberOfThreadsUsed
int NumberOfThreadsUsed
Definition: vtkContour3DLinearGrid.h:216
vtkX3D::value
Definition: vtkX3D.h:220
vtkContour3DLinearGrid::GetValues
double * GetValues()
Get a pointer to an array of contour values.
Definition: vtkContour3DLinearGrid.h:246
vtkContour3DLinearGrid::SetNumberOfContours
void SetNumberOfContours(int number)
Set the number of contours to place into the list.
Definition: vtkContour3DLinearGrid.h:262
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkContour3DLinearGrid::InterpolateAttributes
vtkTypeBool InterpolateAttributes
Definition: vtkContour3DLinearGrid.h:213
vtkX3D::range
Definition: vtkX3D.h:238
vtkContour3DLinearGrid::SetValue
void SetValue(int i, double value)
Methods to set / get contour values.
Definition: vtkContour3DLinearGrid.h:233
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyDataAlgorithm.h
vtkX3D::port
Definition: vtkX3D.h:447
vtkContour3DLinearGrid::LargeIds
bool LargeIds
Definition: vtkContour3DLinearGrid.h:217
vtkContour3DLinearGrid::GetNumberOfThreadsUsed
int GetNumberOfThreadsUsed()
Return the number of threads actually used during execution.
Definition: vtkContour3DLinearGrid.h:192
vtkContour3DLinearGrid::GetLargeIds
bool GetLargeIds()
Inform the user as to whether large ids were used during filter execution.
Definition: vtkContour3DLinearGrid.h:203
vtkContour3DLinearGrid::GetValue
double GetValue(int i)
Get the ith contour value.
Definition: vtkContour3DLinearGrid.h:239
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.
vtkContourValues
helper object to manage setting and generating contour values
Definition: vtkContourValues.h:35
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkContourValues::GenerateValues
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
vtkContourValues::GetValue
double GetValue(int i)
Get the ith contour value.
vtkContourValues::SetValue
void SetValue(int i, double value)
Set the ith contour value.
vtkContour3DLinearGrid
fast generation of isosurface from 3D linear cells
Definition: vtkContour3DLinearGrid.h:100
vtkContour3DLinearGrid::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkContour3DLinearGrid.h:211
vtkPolyDataAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkContourValues.h
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkX3D::info
Definition: vtkX3D.h:376
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:87
vtkContour3DLinearGrid::ContourValues
vtkContourValues * ContourValues
Definition: vtkContour3DLinearGrid.h:210
vtkContour3DLinearGrid::ComputeNormals
vtkTypeBool ComputeNormals
Definition: vtkContour3DLinearGrid.h:214
vtkContour3DLinearGrid::SequentialProcessing
vtkTypeBool SequentialProcessing
Definition: vtkContour3DLinearGrid.h:215
vtkContourValues::SetNumberOfContours
void SetNumberOfContours(const int number)
Set the number of contours to place into the list.
vtkContour3DLinearGrid::GenerateValues
void GenerateValues(int numContours, double range[2])
Generate numContours equally spaced contour values between specified range.
Definition: vtkContour3DLinearGrid.h:275
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:44