VTK  9.1.0
vtkPointInterpolator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPointInterpolator.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 =========================================================================*/
94 #ifndef vtkPointInterpolator_h
95 #define vtkPointInterpolator_h
96 
97 #include "vtkDataSetAlgorithm.h"
98 #include "vtkFiltersPointsModule.h" // For export macro
99 #include "vtkStdString.h" // For vtkStdString ivars
100 #include <vector> //For STL vector
101 
103 class vtkIdList;
104 class vtkDoubleArray;
106 class vtkCharArray;
107 
108 class VTKFILTERSPOINTS_EXPORT vtkPointInterpolator : public vtkDataSetAlgorithm
109 {
110 public:
112 
118  void PrintSelf(ostream& os, vtkIndent indent) override;
120 
122 
132 
140 
142 
148  vtkGetObjectMacro(Locator, vtkAbstractPointLocator);
150 
152 
158  vtkGetObjectMacro(Kernel, vtkInterpolationKernel);
160 
161  enum Strategy
162  {
163  MASK_POINTS = 0,
164  NULL_VALUE = 1,
165  CLOSEST_POINT = 2
166  };
167 
169 
180  vtkSetMacro(NullPointsStrategy, int);
181  vtkGetMacro(NullPointsStrategy, int);
182  void SetNullPointsStrategyToMaskPoints() { this->SetNullPointsStrategy(MASK_POINTS); }
183  void SetNullPointsStrategyToNullValue() { this->SetNullPointsStrategy(NULL_VALUE); }
184  void SetNullPointsStrategyToClosestPoint() { this->SetNullPointsStrategy(CLOSEST_POINT); }
186 
188 
194  vtkSetMacro(ValidPointsMaskArrayName, vtkStdString);
195  vtkGetMacro(ValidPointsMaskArrayName, vtkStdString);
197 
199 
204  vtkSetMacro(NullValue, double);
205  vtkGetMacro(NullValue, double);
207 
209 
213  void AddExcludedArray(const vtkStdString& excludedArray)
214  {
215  this->ExcludedArrays.push_back(excludedArray);
216  this->Modified();
217  }
219 
221 
225  {
226  this->ExcludedArrays.clear();
227  this->Modified();
228  }
230 
234  int GetNumberOfExcludedArrays() { return static_cast<int>(this->ExcludedArrays.size()); }
235 
237 
240  const char* GetExcludedArray(int i)
241  {
242  if (i < 0 || i >= static_cast<int>(this->ExcludedArrays.size()))
243  {
244  return nullptr;
245  }
246  return this->ExcludedArrays[i].c_str();
247  }
249 
251 
257  vtkSetMacro(PromoteOutputArrays, bool);
258  vtkBooleanMacro(PromoteOutputArrays, bool);
259  vtkGetMacro(PromoteOutputArrays, bool);
261 
263 
267  vtkSetMacro(PassPointArrays, bool);
268  vtkBooleanMacro(PassPointArrays, bool);
269  vtkGetMacro(PassPointArrays, bool);
271 
273 
277  vtkSetMacro(PassCellArrays, bool);
278  vtkBooleanMacro(PassCellArrays, bool);
279  vtkGetMacro(PassCellArrays, bool);
281 
283 
287  vtkSetMacro(PassFieldArrays, bool);
288  vtkBooleanMacro(PassFieldArrays, bool);
289  vtkGetMacro(PassFieldArrays, bool);
291 
295  vtkMTimeType GetMTime() override;
296 
297 protected:
300 
303 
305  double NullValue;
308 
309  std::vector<vtkStdString> ExcludedArrays;
310 
312 
316 
320 
324  virtual void Probe(vtkDataSet* input, vtkDataSet* source, vtkDataSet* output);
325 
330  virtual void PassAttributeData(vtkDataSet* input, vtkDataObject* source, vtkDataSet* output);
331 
336  vtkImageData* input, int dims[3], double origin[3], double spacing[3]);
337 
338 private:
340  void operator=(const vtkPointInterpolator&) = delete;
341 };
342 
343 #endif
vtkPointInterpolator::PassPointArrays
bool PassPointArrays
Definition: vtkPointInterpolator.h:314
vtkStdString.h
vtkPointInterpolator::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiating, obtaining type information, and printing.
vtkPointInterpolator::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
vtkPointInterpolator::SetNullPointsStrategyToClosestPoint
void SetNullPointsStrategyToClosestPoint()
Specify a strategy to use when encountering a "null" point during the interpolation process.
Definition: vtkPointInterpolator.h:184
vtkPointInterpolator::SetNullPointsStrategyToMaskPoints
void SetNullPointsStrategyToMaskPoints()
Specify a strategy to use when encountering a "null" point during the interpolation process.
Definition: vtkPointInterpolator.h:182
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkPointInterpolator::PromoteOutputArrays
bool PromoteOutputArrays
Definition: vtkPointInterpolator.h:311
vtkObject::Modified
virtual void Modified()
Update the modification time for this object.
vtkPointInterpolator::Kernel
vtkInterpolationKernel * Kernel
Definition: vtkPointInterpolator.h:302
vtkPointInterpolator::~vtkPointInterpolator
~vtkPointInterpolator() override
vtkPointInterpolator::ExtractImageDescription
void ExtractImageDescription(vtkImageData *input, int dims[3], double origin[3], double spacing[3])
Internal method to extract image metadata.
vtkDataSetAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkDataSetAlgorithm.h:49
vtkPointInterpolator::SetKernel
void SetKernel(vtkInterpolationKernel *kernel)
Specify an interpolation kernel.
vtkPointInterpolator::vtkPointInterpolator
vtkPointInterpolator()
vtkCharArray
dynamic, self-adjusting array of char
Definition: vtkCharArray.h:68
vtkPointInterpolator::PassFieldArrays
bool PassFieldArrays
Definition: vtkPointInterpolator.h:315
vtkPointInterpolator::NullPointsStrategy
int NullPointsStrategy
Definition: vtkPointInterpolator.h:304
vtkPointInterpolator::PassCellArrays
bool PassCellArrays
Definition: vtkPointInterpolator.h:313
vtkPointInterpolator::PassAttributeData
virtual void PassAttributeData(vtkDataSet *input, vtkDataObject *source, vtkDataSet *output)
Call at end of RequestData() to pass attribute data respecting the PassCellArrays,...
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:157
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkPointInterpolator::GetSource
vtkDataObject * GetSource()
Specify the dataset Pc that will be probed by the input points P.
vtkPointInterpolator::Locator
vtkAbstractPointLocator * Locator
Definition: vtkPointInterpolator.h:301
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:140
vtkPointInterpolator::SetSourceData
void SetSourceData(vtkDataObject *source)
Specify the dataset Pc that will be probed by the input points P.
vtkPointInterpolator::ValidPointsMaskArrayName
vtkStdString ValidPointsMaskArrayName
Definition: vtkPointInterpolator.h:306
vtkX3D::spacing
@ spacing
Definition: vtkX3D.h:487
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkPointInterpolator::SetNullPointsStrategyToNullValue
void SetNullPointsStrategyToNullValue()
Specify a strategy to use when encountering a "null" point during the interpolation process.
Definition: vtkPointInterpolator.h:183
vtkDataSetAlgorithm.h
vtkPointInterpolator::ValidPointsMask
vtkCharArray * ValidPointsMask
Definition: vtkPointInterpolator.h:307
vtkPointInterpolator::SetSourceConnection
void SetSourceConnection(vtkAlgorithmOutput *algOutput)
Specify the dataset Pc that will be probed by the input points P.
vtkPointInterpolator::NullValue
double NullValue
Definition: vtkPointInterpolator.h:305
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:66
vtkAbstractPointLocator
abstract class to quickly locate points in 3-space
Definition: vtkAbstractPointLocator.h:39
vtkPointInterpolator::Probe
virtual void Probe(vtkDataSet *input, vtkDataSet *source, vtkDataSet *output)
Virtual for specialized subclass(es)
vtkPointInterpolator
interpolate over point cloud using various kernels
Definition: vtkPointInterpolator.h:109
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:145
vtkPointInterpolator::ClearExcludedArrays
void ClearExcludedArrays()
Clears the contents of excluded array list.
Definition: vtkPointInterpolator.h:224
source
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:998
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:105
vtkPointInterpolator::RequestInformation
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks for Information.
vtkPointInterpolator::RequestUpdateExtent
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when each filter in the pipeline decides what portion of its inp...
vtkPointInterpolator::GetExcludedArray
const char * GetExcludedArray(int i)
Return the name of the ith excluded array.
Definition: vtkPointInterpolator.h:240
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:169
vtkPointInterpolator::New
static vtkPointInterpolator * New()
Standard methods for instantiating, obtaining type information, and printing.
vtkPointInterpolator::Strategy
Strategy
Definition: vtkPointInterpolator.h:162
vtkPointInterpolator::SetLocator
void SetLocator(vtkAbstractPointLocator *locator)
Specify a point locator.
vtkPointInterpolator::AddExcludedArray
void AddExcludedArray(const vtkStdString &excludedArray)
Adds an array to the list of arrays which are to be excluded from the interpolation process.
Definition: vtkPointInterpolator.h:213
vtkPointInterpolator::GetNumberOfExcludedArrays
int GetNumberOfExcludedArrays()
Return the number of excluded arrays.
Definition: vtkPointInterpolator.h:234
vtkInterpolationKernel
base class for interpolation kernels
Definition: vtkInterpolationKernel.h:64
vtkPointInterpolator::ExcludedArrays
std::vector< vtkStdString > ExcludedArrays
Definition: vtkPointInterpolator.h:309
vtkPointInterpolator::GetMTime
vtkMTimeType GetMTime() override
Get the MTime of this object also considering the locator and kernel.
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287