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 =========================================================================*/
44 #ifndef vtkProgrammableSource_h
45 #define vtkProgrammableSource_h
46 
47 #include "vtkFiltersSourcesModule.h" // For export macro
48 #include "vtkDataObjectAlgorithm.h"
49 
50 class vtkGraph;
51 class vtkMolecule;
52 class vtkPolyData;
53 class vtkRectilinearGrid;
54 class vtkStructuredGrid;
56 class vtkTable;
58 
59 class VTKFILTERSSOURCES_EXPORT vtkProgrammableSource : public vtkDataObjectAlgorithm
60 {
61 public:
62  static vtkProgrammableSource *New();
64 
74  typedef void (*ProgrammableMethodCallbackType)(void *arg);
75 
80  void SetExecuteMethod(void (*f)(void *), void *arg);
81 
85  void SetExecuteMethodArgDelete(void (*f)(void *));
86 
90  void SetRequestInformationMethod(void (*f)(void *));
91 
93 
99  vtkPolyData *GetPolyDataOutput();
100  vtkStructuredPoints *GetStructuredPointsOutput();
101  vtkStructuredGrid *GetStructuredGridOutput();
102  vtkUnstructuredGrid *GetUnstructuredGridOutput();
103  vtkRectilinearGrid *GetRectilinearGridOutput();
104  vtkGraph *GetGraphOutput();
105  vtkMolecule *GetMoleculeOutput();
106  vtkTable *GetTableOutput();
108 
109 protected:
111  ~vtkProgrammableSource() override;
112 
116 
117  ProgrammableMethodCallbackType ExecuteMethod; //function to invoke
118  ProgrammableMethodCallbackType ExecuteMethodArgDelete;
120  ProgrammableMethodCallbackType RequestInformationMethod; // function to invoke
121 
124 
125 private:
127  void operator=(const vtkProgrammableSource&) = delete;
128 };
129 
130 #endif
131 
132 // VTK-HeaderTest-Exclude: vtkProgrammableSource.h
vtkStructuredPoints
A subclass of ImageData.
Definition: vtkStructuredPoints.h:39
vtkProgrammableSource::ExecuteMethodArg
void * ExecuteMethodArg
Definition: vtkProgrammableSource.h:119
vtkProgrammableSource::ExecuteMethodArgDelete
ProgrammableMethodCallbackType ExecuteMethodArgDelete
Definition: vtkProgrammableSource.h:118
vtkRectilinearGrid
a dataset that is topologically regular with variable spacing in the three coordinate directions
Definition: vtkRectilinearGrid.h:56
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:35
vtkDataObjectAlgorithm
Superclass for algorithms that produce only data object as output.
Definition: vtkDataObjectAlgorithm.h:43
vtkProgrammableSource::RequestedDataType
int RequestedDataType
Definition: vtkProgrammableSource.h:123
vtkStructuredGrid
topologically regular array of data
Definition: vtkStructuredGrid.h:63
vtkProgrammableSource::ExecuteMethod
ProgrammableMethodCallbackType ExecuteMethod
Definition: vtkProgrammableSource.h:117
vtkProgrammableSource::ExecuteTime
vtkTimeStamp ExecuteTime
Definition: vtkProgrammableSource.h:122
vtkProgrammableSource::RequestInformationMethod
ProgrammableMethodCallbackType RequestInformationMethod
Definition: vtkProgrammableSource.h:120
vtkProgrammableSource
generate source dataset via a user-specified function
Definition: vtkProgrammableSource.h:59
vtkMolecule
class describing a molecule
Definition: vtkMolecule.h:94
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
vtkDataObjectAlgorithm::New
static vtkDataObjectAlgorithm * New()
vtkDataObjectAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Definition: vtkDataObjectAlgorithm.h:122
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:87
vtkDataObjectAlgorithm.h
vtkGraph
Base class for graph data types.
Definition: vtkGraph.h:287
vtkDataObjectAlgorithm::RequestDataObject
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Definition: vtkDataObjectAlgorithm.h:104
vtkDataObjectAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)