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
vtkStructuredPoints
A subclass of ImageData.
Definition: vtkStructuredPoints.h:39
vtkDataSetAlgorithm::GetRectilinearGridOutput
vtkRectilinearGrid * GetRectilinearGridOutput()
Get the output as vtkRectilinearGrid.
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
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:35
vtkDataSetAlgorithm::GetStructuredPointsOutput
vtkStructuredPoints * GetStructuredPointsOutput()
Get the output as vtkStructuredPoints.
vtkStructuredGrid
topologically regular array of data
Definition: vtkStructuredGrid.h:63
vtkDataSetAlgorithm::GetStructuredGridOutput
vtkStructuredGrid * GetStructuredGridOutput()
Get the output as vtkStructuredGrid.
vtkDataSetAlgorithm::GetUnstructuredGridOutput
vtkUnstructuredGrid * GetUnstructuredGridOutput()
Get the output as vtkUnstructuredGrid.
vtkDataSetAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkDataSetAlgorithm.h:51
vtkDataSetAlgorithm::GetPolyDataOutput
vtkPolyData * GetPolyDataOutput()
Get the output as vtkPolyData.
vtkProgrammableSource
generate source dataset via a user-specified function
Definition: vtkProgrammableSource.h:56
vtkDataSetAlgorithm::New
static vtkDataSetAlgorithm * New()
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkDataSetAlgorithm.h
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:81