VTK  9.0.1
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 
85 class VTKFILTERSPROGRAMMABLE_EXPORT vtkProgrammableAttributeDataFilter : public vtkDataSetAlgorithm
86 {
87 public:
90  void PrintSelf(ostream& os, vtkIndent indent) 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:
132 
134  vtkDataSetCollection* InputList; // list of datasets to process
135  ProgrammableMethodCallbackType ExecuteMethod; // function to invoke
136  ProgrammableMethodCallbackType ExecuteMethodArgDelete;
138 
139  void ReportReferences(vtkGarbageCollector*) override;
140 
141 private:
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 
148 private:
150  void operator=(const vtkProgrammableAttributeDataFilter&) = delete;
151 };
152 
153 #endif
vtkProgrammableAttributeDataFilter::ExecuteMethod
ProgrammableMethodCallbackType ExecuteMethod
Definition: vtkProgrammableAttributeDataFilter.h:135
vtkProgrammableAttributeDataFilter::GetInputList
vtkDataSetCollection * GetInputList()
Return the list of inputs.
Definition: vtkProgrammableAttributeDataFilter.h:105
vtkProgrammableAttributeDataFilter::InputList
vtkDataSetCollection * InputList
Definition: vtkProgrammableAttributeDataFilter.h:134
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkDataSetAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
Definition: vtkDataSetAlgorithm.h:176
vtkDataSetAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkDataSetAlgorithm.h:48
vtkProgrammableAttributeDataFilter::ExecuteMethodArgDelete
ProgrammableMethodCallbackType ExecuteMethodArgDelete
Definition: vtkProgrammableAttributeDataFilter.h:136
vtkProgrammableAttributeDataFilter
manipulate attribute (cell and point) data via a user-specified function
Definition: vtkProgrammableAttributeDataFilter.h:85
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkDataSetAlgorithm::New
static vtkDataSetAlgorithm * New()
vtkGarbageCollector
Detect and break reference loops.
Definition: vtkGarbageCollector.h:94
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkAlgorithm::ReportReferences
void ReportReferences(vtkGarbageCollector *) override
vtkDataSetAlgorithm.h
vtkDataSetAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDataSetCollection
maintain an unordered list of dataset objects
Definition: vtkDataSetCollection.h:31
vtkProgrammableAttributeDataFilter::ExecuteMethodArg
void * ExecuteMethodArg
Definition: vtkProgrammableAttributeDataFilter.h:137
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:59