57 std::vector<double> values;
60 Replacement(
const std::vector<double> &values_,
const bool &isInt_)
61 : values(values_), isInt(isInt_) {
64 std::string toString()
const {
65 std::string result =
"";
66 if(this->values.size() == 0) {
70 if(this->values.size() > 1) {
74 result +=
"vec" + std::to_string(this->values.size()) +
"(";
78 result += std::to_string((
int)this->values[0]);
80 result += std::to_string(this->values[0]);
82 for(
size_t i = 1; i < this->values.size(); i++)
84 result +=
"," + std::to_string((
int)this->values[i]);
86 result +=
"," + std::to_string(this->values[i]);
88 if(this->values.size() > 1)
95 std::unordered_map<std::string, Replacement> Replacements;
115 std::string PerformReplacements(
const std::string &input);
119 int AddReplacement(
const std::string &name,
120 const std::vector<double> &values,
121 const bool &isInt =
false);
123 int CreateFullScreenQuad();
124 int CreateRenderer();
128 int InitRenderer(vtkImageData *outputImage);
133 int AddTexture(vtkImageData *image,
int arrayIdx,
int textureIdx);
135 virtual std::string GetVertexShaderCode();
136 virtual std::string GetFragmentShaderCode();
140 virtual int Render(vtkImageData *image,
const std::string &name);