VTK
|
rotation invariant pattern detetction More...
#include <vtkMomentsHelper.h>
Static Public Member Functions | |
static std::vector< vtkMomentsTensor > | orthonormalizeMoments (int dimension, std::vector< vtkMomentsTensor > moments, double radius) |
The monomial basis is not orthonormal. More... | |
static std::vector< vtkMomentsTensor > | allMoments (int dimension, int order, int fieldRank, double radius, double center[3], vtkImageData *stencil, std::string nameOfPointData) |
This function computes the moments at a given location and radius the moments are the projections of the function to the monomial basis they are evaluated using a numerical integration over uniformly sampled 2D or 3D space. More... | |
static double | getVolume (vtkCell *cell, vtkDataSet *source) |
This function approximates the volume of a cell for unstructured grids. More... | |
static std::vector< vtkMomentsTensor > | allMomentsOrigRes (int dimension, int order, int fieldRank, double radius, double center[3], vtkDataSet *dataset, std::string nameOfPointData) |
This function computes the moments at a given location and radius the moments are the projections of the function to the monomial basis they are evaluated using a numerical integration over the original unstructured dataset. More... | |
static std::vector< vtkMomentsTensor > | allMomentsOrigResImageData (int dimension, int order, int fieldRank, double radius, int ptID, vtkImageData *dataset, std::string nameOfPointData) |
This function computes the moments at a given location and radius the moments are the projections of the function to the monomial basis they are evaluated using a numerical integration over the original dataset if it is structured data. More... | |
static double | translationFactorAnalytic (double radius, int dimension, size_t p, size_t q, size_t r) |
This function computes the factor that needs to be removed for the translational normalization it corresponds to the moment of the function identical to one for the lowest orders, we know the analytic solution. More... | |
static double | translationFactor (double radius, size_t p, size_t q, size_t r, vtkImageData *stencil) |
This function computes the factor that needs to be removed for the translational normalization it corresponds to the moment of the function identical to one if we do not know the analytic solution, we evaluate it numerically. More... | |
static void | BuildStencil (vtkImageData *stencil, double radius, int numberOfIntegrationSteps, int dimension, vtkDataSet *source, std::string nameOfPointData) |
This function generates the stencil, which contains the locations at which the dataset is evaluated for the integration. More... | |
static bool | CenterStencil (double *center, vtkDataSet *source, vtkImageData *stencil, int numberOfIntegrationSteps, std::string nameOfPointData) |
This function moves the stencil to the current location, where the integration is supposed o be performed. More... | |
static std::vector< size_t > | getTensorIndicesFromFieldIndex (size_t index, int dimension, int order, int fieldRank) |
Inverse function to getFieldIndexFromTensorIndices The output contains a vector with the tensor indices that describe the basis function that belongs to the given output array. More... | |
static std::string | getTensorIndicesFromFieldIndexAsString (size_t index, int dimension, int order, int fieldRank) |
The output contains the tensor indices that describe the basis function that belongs to the given output array as string. More... | |
static size_t | getFieldIndexFromTensorIndices (size_t radiusIndex, std::vector< size_t > indices, int dimension, int fieldRank, int numberOfBasisFunctions) |
Inverse function to getTensorIndicesFromFieldIndex given a vector with tensor indices and a radius, this function returns the index in the output of this algorithm that corresponds tothis basis function. More... | |
static bool | isCloseToEdge (int dimension, int ptId, double radius, vtkImageData *field) |
the function returns true if the point lies within radius of the boundary of the dataset More... | |
static bool | isEdge (int dimension, int ptId, vtkImageData *field) |
the function returns true if the point lies on the boundary of the dataset More... | |
static vtkIdType | getArrayIndex (std::vector< int > coord, std::vector< int > dimensions) |
Calculates the index of the coordinate in the 1D array that is treated as dimensions[0] x dimensions[1] x dimensions[2] matrix. More... | |
static std::vector< int > | getCoord (vtkIdType index, std::vector< int > dimensions) |
Calculates the coordinate as if we are in a dimensions[0] x dimensions[1] x dimensions[2] matrix based on the index of the 1D array. More... | |
static vtkImageData * | translateToOrigin (vtkImageData *data) |
Translates the data to the origin (0, 0, 0) More... | |
static vtkImageData * | padField (vtkImageData *field, vtkImageData *kernel, int dimension, std::string nameOfPointData) |
Pad the field to a square where the size is max(field->Dimensions) + max(kernel->Dimensions) More... | |
static vtkImageData * | padKernel (vtkImageData *kernel, vtkImageData *paddedField) |
Pad the kernel to the same size as paddedField The center of the kernel is the origin of the final output and the rest is wrapped accordingly. More... | |
rotation invariant pattern detetction
vtkMomentsHelper is a helper class that contains functions that will be used by more than one algorithm in the moments module the theory and the algorithm is described in Roxana Bujack and Hans Hagen: "Moment Invariants for Multi-Dimensional Data" http://www.informatik.uni-leipzig.de/~bujack/2017TensorDagstuhl.pdf
Definition at line 87 of file vtkMomentsHelper.h.
|
static |
The monomial basis is not orthonormal.
We need this function for the reconstruction of the function from the moments. This function uses Gram Schmidt
dimension | 2D or 3D |
moments | the moments at a point |
radius | the corresponding integration radius |
|
static |
This function computes the moments at a given location and radius the moments are the projections of the function to the monomial basis they are evaluated using a numerical integration over uniformly sampled 2D or 3D space.
dimension | 2D or 3D |
order | the maximal order up to which the moments are computed |
fieldRank | 0 for scalar, 1 for vector and 2 for matrix |
radius | the integration radius at which the moments are computed |
center | location where the moments are computed |
stencil | contains the locations at which the dataset is evaluated for the integration |
nameOfPointData | the name of the array in the point data of which the momens are computed. |
|
static |
This function approximates the volume of a cell for unstructured grids.
cell | the cell |
source | the dataset that contains the cell. |
|
static |
This function computes the moments at a given location and radius the moments are the projections of the function to the monomial basis they are evaluated using a numerical integration over the original unstructured dataset.
dimension | 2D or 3D |
order | the maximal order up to which the moments are computed |
fieldRank | 0 for scalar, 1 for vector and 2 for matrix |
radius | the integration radius at which the moments are computed |
center | location where the moments are computed |
dataset | the dataset of which the moments are computed |
nameOfPointData | the name of the array in the point data of which the momens are computed. |
|
static |
This function computes the moments at a given location and radius the moments are the projections of the function to the monomial basis they are evaluated using a numerical integration over the original dataset if it is structured data.
dimension | 2D or 3D |
order | the maximal order up to which the moments are computed |
fieldRank | 0 for scalar, 1 for vector and 2 for matrix |
radius | the integration radius at which the moments are computed |
ptID | point id of the location where the moments are computed |
dataset | the dataset of which the moments are computed |
nameOfPointData | the name of the array in the point data of which the momens are computed. |
|
static |
This function computes the factor that needs to be removed for the translational normalization it corresponds to the moment of the function identical to one for the lowest orders, we know the analytic solution.
radius | the integration radius at which the moments are computed |
dimension | 2D or 3D |
p | exponent in the basis function x^p*y^q*z^r |
q | exponent in the basis function x^p*y^q*z^r |
r | exponent in the basis function x^p*y^q*z^r |
|
static |
This function computes the factor that needs to be removed for the translational normalization it corresponds to the moment of the function identical to one if we do not know the analytic solution, we evaluate it numerically.
center | location where the moments are computed |
radius | the integration radius at which the moments are computed |
p | exponent in the basis function x^p*y^q*z^r |
q | exponent in the basis function x^p*y^q*z^r |
r | exponent in the basis function x^p*y^q*z^r |
stencil | contains the locations at which the dataset is evaluated for the integration |
|
static |
This function generates the stencil, which contains the locations at which the dataset is evaluated for the integration.
stencil | contains the locations at which the dataset is evaluated for the integration |
radius | the integration radius at which the moments are computed |
numberOfIntegrationSteps | how fine the discrete integration done in each dimension |
dimension | 2D or 3D |
source | the dataset |
nameOfPointData | the name of the array in the point data of which the momens are computed. |
|
static |
This function moves the stencil to the current location, where the integration is supposed o be performed.
center | the location |
source | the dataset |
stencil | contains the locations at which the dataset is evaluated for the integration |
numberOfIntegrationSteps | how fine the discrete integration done in each dimension |
|
static |
Inverse function to getFieldIndexFromTensorIndices The output contains a vector with the tensor indices that describe the basis function that belongs to the given output array.
they are sorted by increasing order and then by the index as returned by vtkMomentsTensor.getIndices(i)
index | the index of this output field pointdata array |
dimension | 2D or 3D |
order | the maximal order up to which the moments are computed |
fieldRank | 0 for scalar, 1 for vector and 2 for matrix |
|
static |
The output contains the tensor indices that describe the basis function that belongs to the given output array as string.
Convenience function. they are sorted by increasing order and then by the index as returned by vtkMomentsTensor.getIndices(i)
index | the index of this output field pointdata array |
dimension | 2D or 3D |
order | the maximal order up to which the moments are computed |
fieldRank | 0 for scalar, 1 for vector and 2 for matrix |
|
static |
Inverse function to getTensorIndicesFromFieldIndex given a vector with tensor indices and a radius, this function returns the index in the output of this algorithm that corresponds tothis basis function.
radiusIndex | index of this radius in the radii vector |
indices | the given tensor indices |
dimension | 2D or 3D |
fieldRank | 0 for scalar, 1 for vector and 2 for matrix |
numberOfBasisFunctions | number of basis functions in the source equals {i=0}^order dimension^o |
|
static |
the function returns true if the point lies within radius of the boundary of the dataset
ptId | ID of the point in question |
field | the field that contains the point |
|
static |
the function returns true if the point lies on the boundary of the dataset
ptId | ID of the point in question |
field | the field that contains the point |
|
static |
Calculates the index of the coordinate in the 1D array that is treated as dimensions[0] x dimensions[1] x dimensions[2] matrix.
|
static |
Calculates the coordinate as if we are in a dimensions[0] x dimensions[1] x dimensions[2] matrix based on the index of the 1D array.
|
static |
Translates the data to the origin (0, 0, 0)
|
static |
Pad the field to a square where the size is max(field->Dimensions) + max(kernel->Dimensions)
|
static |
Pad the kernel to the same size as paddedField The center of the kernel is the origin of the final output and the rest is wrapped accordingly.