VTK  9.1.0
vtkProgrammableAttributeDataFilter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkProgrammableAttributeDataFilter.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=========================================================================*/
77#ifndef vtkProgrammableAttributeDataFilter_h
78#define vtkProgrammableAttributeDataFilter_h
79
80#include "vtkDataSetAlgorithm.h"
81#include "vtkFiltersProgrammableModule.h" // For export macro
82
84
85class VTKFILTERSPROGRAMMABLE_EXPORT vtkProgrammableAttributeDataFilter : public vtkDataSetAlgorithm
86{
87public:
90 void PrintSelf(ostream& os, vtkIndent indent) override;
91
96
101
105 vtkDataSetCollection* GetInputList() { return this->InputList; }
106
116 typedef void (*ProgrammableMethodCallbackType)(void* arg);
117
122 void SetExecuteMethod(void (*f)(void*), void* arg);
123
127 void SetExecuteMethodArgDelete(void (*f)(void*));
128
129protected:
132
134 vtkDataSetCollection* InputList; // list of datasets to process
135 ProgrammableMethodCallbackType ExecuteMethod; // function to invoke
136 ProgrammableMethodCallbackType ExecuteMethodArgDelete;
138
140
141private:
142 // hide the superclass' AddInput() from the user and the compiler
143 void AddInput(vtkDataObject*)
144 {
145 vtkErrorMacro(<< "AddInput() must be called with a vtkDataSet not a vtkDataObject.");
146 }
147
148private:
150 void operator=(const vtkProgrammableAttributeDataFilter&) = delete;
151};
152
153#endif
general representation of visualization data
Definition: vtkDataObject.h:60
Superclass for algorithms that produce output of the same type as input.
maintain an unordered list of dataset objects
abstract class to specify dataset behavior
Definition: vtkDataSet.h:57
Detect and break reference loops.
a simple class to control print indentation
Definition: vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
manipulate attribute (cell and point) data via a user-specified function
vtkDataSetCollection * GetInputList()
Return the list of inputs.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
void SetExecuteMethodArgDelete(void(*f)(void *))
Set the arg delete method.
void SetExecuteMethod(void(*f)(void *), void *arg)
Specify the function to use to operate on the point attribute data.
void ReportReferences(vtkGarbageCollector *) override
static vtkProgrammableAttributeDataFilter * New()
void RemoveInput(vtkDataSet *in)
Remove a dataset from the list of data to process.
void AddInput(vtkDataSet *in)
Add a dataset to the list of data to process.