VTK
vtkProgrammableSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkProgrammableSource.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 =========================================================================*/
38 #ifndef vtkProgrammableSource_h
39 #define vtkProgrammableSource_h
40 
41 #include "vtkFiltersSourcesModule.h" // For export macro
42 #include "vtkDataObjectAlgorithm.h"
43 
44 class vtkGraph;
45 class vtkMolecule;
46 class vtkPolyData;
47 class vtkRectilinearGrid;
48 class vtkStructuredGrid;
50 class vtkTable;
52 
53 class VTKFILTERSSOURCES_EXPORT vtkProgrammableSource : public vtkDataObjectAlgorithm
54 {
55 public:
56  static vtkProgrammableSource *New();
58 
68  typedef void (*ProgrammableMethodCallbackType)(void *arg);
69 
74  void SetExecuteMethod(void (*f)(void *), void *arg);
75 
79  void SetExecuteMethodArgDelete(void (*f)(void *));
80 
84  void SetRequestInformationMethod(void (*f)(void *));
85 
87 
93  vtkPolyData *GetPolyDataOutput();
94  vtkStructuredPoints *GetStructuredPointsOutput();
95  vtkStructuredGrid *GetStructuredGridOutput();
96  vtkUnstructuredGrid *GetUnstructuredGridOutput();
97  vtkRectilinearGrid *GetRectilinearGridOutput();
98  vtkGraph *GetGraphOutput();
99  vtkMolecule *GetMoleculeOutput();
100  vtkTable *GetTableOutput();
102 
103 protected:
105  ~vtkProgrammableSource() override;
106 
110 
111  ProgrammableMethodCallbackType ExecuteMethod; //function to invoke
112  ProgrammableMethodCallbackType ExecuteMethodArgDelete;
114  ProgrammableMethodCallbackType RequestInformationMethod; // function to invoke
115 
118 
119 private:
121  void operator=(const vtkProgrammableSource&) = delete;
122 };
123 
124 #endif
125 
126 // VTK-HeaderTest-Exclude: vtkProgrammableSource.h
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
ProgrammableMethodCallbackType ExecuteMethodArgDelete
a dataset that is topologically regular with variable spacing in the three coordinate directions ...
Store vtkAlgorithm input/output information.
class describing a molecule
Definition: vtkMolecule.h:87
static vtkDataObjectAlgorithm * New()
ProgrammableMethodCallbackType ExecuteMethod
record modification and/or execution time
Definition: vtkTimeStamp.h:32
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
ProgrammableMethodCallbackType RequestInformationMethod
Base class for graph data types.
Definition: vtkGraph.h:281
dataset represents arbitrary combinations of all possible cell types
generate source dataset via a user-specified function
Superclass for algorithms that produce only data object as output.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:62
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
A subclass of ImageData.
topologically regular array of data
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Store zero or more vtkInformation instances.