VTK  9.7.20260920
vtkTableToCoordinatesInternal Namespace Reference

Functions

bool ComputeUniqueAndSorted (vtkDataArray *input, vtkDataArray *output)
 Fill output array with unique, sorted values from the given input.
void ConstructSpace (vtkFieldData *space, vtkDataSetAttributes *inputPoints)
 Construct a N-dimension space from the list of points.
void MapSpaceToInput (vtkFieldData *space, vtkDataSetAttributes *inputPoints, vtkIdTypeArray *inputToSpaceMap, vtkIdType invalidMapping)
 Map every point index from space to the randomly ordered and sparsed source arrays from inputPoints.
vtkIdType GetPointIdxInSpace (vtkFieldData *space, vtkDataSetAttributes *inputPoints, vtkIdType inputPointId)
 Given a structured N-dimension space, compute the structured coordinates from an inputPoint and return its idx in space.
void GetSurroundingPoints (vtkFieldData *space, const std::vector< double > &point, vtkIdTypeArray *pointIdx, vtkDoubleArray *weights)
 Given a random point, return its surrounding point in space with associated weight.

Function Documentation

◆ ComputeUniqueAndSorted()

bool vtkTableToCoordinatesInternal::ComputeUniqueAndSorted ( vtkDataArray * input,
vtkDataArray * output )

Fill output array with unique, sorted values from the given input.

Return true on success, false on any error.

◆ ConstructSpace()

void vtkTableToCoordinatesInternal::ConstructSpace ( vtkFieldData * space,
vtkDataSetAttributes * inputPoints )

Construct a N-dimension space from the list of points.

  • inputPoints: a list of points in a N-dimension space. Each tuple of inputPoints is a point in N-dimension, N being the number of arrays.
  • space: the output N-dimension space. Each output array in space contains unique and sorted values, extracted from the inputPoints array. In space, each array can have its own number of tuples (i.e. each axis has its own dimension) This can be seen as a N-dimension extension of a vtkRectilinearGrid.

Non numerical input arrays are skipped.

See also
ComputeUniqueAndSorted

◆ MapSpaceToInput()

void vtkTableToCoordinatesInternal::MapSpaceToInput ( vtkFieldData * space,
vtkDataSetAttributes * inputPoints,
vtkIdTypeArray * inputToSpaceMap,
vtkIdType invalidMapping )

Map every point index from space to the randomly ordered and sparsed source arrays from inputPoints.

  • space: an extension to N-dimension of a vtkRectilinearGrid. Thus, arrays in space should have unique and ordered values. But they can have different number of tuples.
  • inputPoints: a list of point in space, without any requirement on order. So each arrays should have the same number of tuples.
  • inputToSpaceMap: the map filled by this method. Some inputPoint may not exists in space. In that case, inputToSpaceMap will point to invalidMapping id.
  • invalidMapping: the value to use in the map for invalid input point.
See also
ConstructSpace to get such space from the inputPoint container.

◆ GetPointIdxInSpace()

vtkIdType vtkTableToCoordinatesInternal::GetPointIdxInSpace ( vtkFieldData * space,
vtkDataSetAttributes * inputPoints,
vtkIdType inputPointId )

Given a structured N-dimension space, compute the structured coordinates from an inputPoint and return its idx in space.

◆ GetSurroundingPoints()

void vtkTableToCoordinatesInternal::GetSurroundingPoints ( vtkFieldData * space,
const std::vector< double > & point,
vtkIdTypeArray * pointIdx,
vtkDoubleArray * weights )

Given a random point, return its surrounding point in space with associated weight.

  • space: as filled by ConstructSpace. Each array has unique, sorted values.
  • point: coordinates of a random point in space.
  • pointIdx: output variable with the list of surrounding point indices. In some way, they represent the structured cell that includes the given point.
  • weights: output variable with the weights of each surrounding point, for linear interpolation purpose.