23#ifndef vtkONNXInference_h 
   24#define vtkONNXInference_h 
   26#include "vtkFiltersONNXModule.h"  
   34VTK_ABI_NAMESPACE_BEGIN
 
   38class AllocatorWithDefaultOptions;
 
   55  vtkGetMacro(ModelFile, std::string);
 
   94  vtkSetMacro(TimeStepIndex, 
int);
 
  100  vtkGetMacro(TimeStepIndex, 
int);
 
  132  vtkGetMacro(InputSize, 
int);
 
  145  vtkSetMacro(OutputDimension, 
int);
 
  146  vtkGetMacro(OutputDimension, 
int);
 
  154  vtkSetMacro(ArrayAssociation, 
int);
 
  155  vtkGetMacro(ArrayAssociation, 
int);
 
  183  void InitializeSession();
 
  190  bool ShouldGenerateTimeSteps();
 
  196  std::vector<Ort::Value> RunModel(Ort::Value& inputTensor);
 
  199  std::string ModelFile;
 
  200  int64_t InputSize = 0;
 
  201  std::vector<float> InputParameters;
 
  202  std::vector<double> TimeStepValues;
 
  203  int TimeStepIndex = -1;
 
  206  int OutputDimension = 1;
 
  210  bool Initialized = 
false;
 
  211  std::unique_ptr<vtkONNXInferenceInternals> Internals;
 
general representation of visualization data
 
a simple class to control print indentation
 
void ClearInputParameters()
Clear the input parameters vector.
 
void ClearTimeStepValues()
Clear the time step values vector.
 
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is required to inform the pipeline of the time steps.
 
~vtkONNXInference() override=default
 
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
 
void SetInputParameters(const std::vector< float > ¶ms)
Input Parameters.
 
void SetInputParameter(vtkIdType idx, float InputParameter)
Set an input parameter at a given index.
 
static vtkONNXInference * New()
 
void SetTimeStepValues(const std::vector< double > ×)
Time Steps.
 
void SetTimeStepValue(vtkIdType idx, double timeStepValue)
Set a time value at a given index.
 
void SetModelFile(const std::string &file)
Get/Set the path to the ONNX model and load it.
 
void SetNumberOfInputParameters(vtkIdType nb)
Set the number of input parameters.
 
int ExecuteData(vtkDataObject *input, vtkDataObject *output, double timevalue)
Execute the inference and add the resulting array on the given data object.
 
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
 
void SetNumberOfTimeStepValues(vtkIdType nb)
Set the number of time step values.
 
VTK internal class for hiding ONNX members.