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 "vtkDataSetAlgorithm.h"
43 
44 class vtkPolyData;
46 class vtkStructuredGrid;
48 class vtkRectilinearGrid;
49 
50 class VTKFILTERSSOURCES_EXPORT vtkProgrammableSource : public vtkDataSetAlgorithm
51 {
52 public:
53  static vtkProgrammableSource *New();
55 
65  typedef void (*ProgrammableMethodCallbackType)(void *arg);
66 
71  void SetExecuteMethod(void (*f)(void *), void *arg);
72 
76  void SetExecuteMethodArgDelete(void (*f)(void *));
77 
81  void SetRequestInformationMethod(void (*f)(void *));
82 
90 
95 
100 
105 
110 
111 protected:
113  ~vtkProgrammableSource() VTK_OVERRIDE;
114 
115  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
116  int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
117  int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
118 
119  ProgrammableMethodCallbackType ExecuteMethod; //function to invoke
120  ProgrammableMethodCallbackType ExecuteMethodArgDelete;
121  void *ExecuteMethodArg;
122  ProgrammableMethodCallbackType RequestInformationMethod; // function to invoke
123 
124  vtkTimeStamp ExecuteTime;
125  int RequestedDataType;
126 
127 private:
128  vtkProgrammableSource(const vtkProgrammableSource&) VTK_DELETE_FUNCTION;
129  void operator=(const vtkProgrammableSource&) VTK_DELETE_FUNCTION;
130 };
131 
132 #endif
133 
134 // 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:32
vtkUnstructuredGrid * GetUnstructuredGridOutput()
Get the output as vtkUnstructuredGrid.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
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.