VTK
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 "vtkFiltersProgrammableModule.h" // For export macro
81 #include "vtkDataSetAlgorithm.h"
82 
84 
85 class VTKFILTERSPROGRAMMABLE_EXPORT vtkProgrammableAttributeDataFilter : public vtkDataSetAlgorithm
86 {
87 public:
90  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
91 
95  void AddInput(vtkDataSet *in);
96 
100  void RemoveInput(vtkDataSet *in);
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 
129 protected:
131  ~vtkProgrammableAttributeDataFilter() VTK_OVERRIDE;
132 
133  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
134  vtkDataSetCollection *InputList; //list of datasets to process
135  ProgrammableMethodCallbackType ExecuteMethod; //function to invoke
136  ProgrammableMethodCallbackType ExecuteMethodArgDelete;
137  void *ExecuteMethodArg;
138 
139  void ReportReferences(vtkGarbageCollector*) VTK_OVERRIDE;
140 
141 private:
142  // hide the superclass' AddInput() from the user and the compiler
143  void AddInput(vtkDataObject *)
144  { vtkErrorMacro( << "AddInput() must be called with a vtkDataSet not a vtkDataObject."); };
145 
146 private:
148  void operator=(const vtkProgrammableAttributeDataFilter&) VTK_DELETE_FUNCTION;
149 };
150 
151 #endif
152 
153 
maintain an unordered list of dataset objects
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
Detect and break reference loops.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkDataSetCollection * GetInputList()
Return the list of inputs.
manipulate attribute (cell and point) data via a user-specified function
Store zero or more vtkInformation instances.
Superclass for algorithms that produce output of the same type as input.
general representation of visualization data
Definition: vtkDataObject.h:58
static vtkDataSetAlgorithm * New()