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 "vtkDataSetAlgorithm.h"
49 
50 class vtkPolyData;
52 class vtkStructuredGrid;
54 class vtkRectilinearGrid;
55 
56 class VTKFILTERSSOURCES_EXPORT vtkProgrammableSource : public vtkDataSetAlgorithm
57 {
58 public:
59  static vtkProgrammableSource *New();
61 
71  typedef void (*ProgrammableMethodCallbackType)(void *arg);
72 
77  void SetExecuteMethod(void (*f)(void *), void *arg);
78 
82  void SetExecuteMethodArgDelete(void (*f)(void *));
83 
87  void SetRequestInformationMethod(void (*f)(void *));
88 
96 
101 
106 
111 
116 
117 protected:
119  ~vtkProgrammableSource() VTK_OVERRIDE;
120 
121  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
122  int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
123  int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
124 
125  ProgrammableMethodCallbackType ExecuteMethod; //function to invoke
126  ProgrammableMethodCallbackType ExecuteMethodArgDelete;
127  void *ExecuteMethodArg;
128  ProgrammableMethodCallbackType RequestInformationMethod; // function to invoke
129 
130  vtkTimeStamp ExecuteTime;
131  int RequestedDataType;
132 
133 private:
134  vtkProgrammableSource(const vtkProgrammableSource&) VTK_DELETE_FUNCTION;
135  void operator=(const vtkProgrammableSource&) VTK_DELETE_FUNCTION;
136 };
137 
138 #endif
139 
140 // VTK-HeaderTest-Exclude: vtkProgrammableSource.h
vtkStructuredGrid * GetStructuredGridOutput()
Get the output as vtkStructuredGrid.
a dataset that is topologically regular with variable spacing in the three coordinate directions ...
Store vtkAlgorithm input/output information.
vtkRectilinearGrid * GetRectilinearGridOutput()
Get the output as vtkRectilinearGrid.
record modification and/or execution time
Definition: vtkTimeStamp.h:35
vtkUnstructuredGrid * GetUnstructuredGridOutput()
Get the output as vtkUnstructuredGrid.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
dataset represents arbitrary combinations of all possible cell types
generate source dataset via a user-specified function
vtkStructuredPoints * GetStructuredPointsOutput()
Get the output as vtkStructuredPoints.
A subclass of ImageData.
topologically regular array of data
Store zero or more vtkInformation instances.
Superclass for algorithms that produce output of the same type as input.
static vtkDataSetAlgorithm * New()
vtkPolyData * GetPolyDataOutput()
Get the output as vtkPolyData.