VTK  9.1.0
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 =========================================================================*/
77 #ifndef vtkProgrammableSource_h
78 #define vtkProgrammableSource_h
79 
80 #include "vtkDataObjectAlgorithm.h"
81 #include "vtkFiltersSourcesModule.h" // For export macro
82 
83 class vtkGraph;
84 class vtkMolecule;
85 class vtkPolyData;
86 class vtkRectilinearGrid;
87 class vtkStructuredGrid;
89 class vtkTable;
91 
92 class VTKFILTERSSOURCES_EXPORT vtkProgrammableSource : public vtkDataObjectAlgorithm
93 {
94 public:
97  void PrintSelf(ostream& os, vtkIndent indent) override;
98 
108  typedef void (*ProgrammableMethodCallbackType)(void* arg);
109 
114  void SetExecuteMethod(void (*f)(void*), void* arg);
115 
119  void SetExecuteMethodArgDelete(void (*f)(void*));
120 
124  void SetRequestInformationMethod(void (*f)(void*));
125 
127 
142 
143 protected:
146 
150 
151  ProgrammableMethodCallbackType ExecuteMethod; // function to invoke
152  ProgrammableMethodCallbackType ExecuteMethodArgDelete;
154  ProgrammableMethodCallbackType RequestInformationMethod; // function to invoke
155 
158 
159 private:
161  void operator=(const vtkProgrammableSource&) = delete;
162 };
163 
164 #endif
vtkStructuredPoints
A subclass of ImageData.
Definition: vtkStructuredPoints.h:125
vtkProgrammableSource::ExecuteMethodArg
void * ExecuteMethodArg
Definition: vtkProgrammableSource.h:153
vtkProgrammableSource::GetTableOutput
vtkTable * GetTableOutput()
Get the output as a concrete type.
vtkProgrammableSource::ExecuteMethodArgDelete
ProgrammableMethodCallbackType ExecuteMethodArgDelete
Definition: vtkProgrammableSource.h:152
vtkProgrammableSource::SetRequestInformationMethod
void SetRequestInformationMethod(void(*f)(void *))
Specify the function to use to fill in information about the source data.
vtkProgrammableSource::New
static vtkProgrammableSource * New()
vtkProgrammableSource::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkRectilinearGrid
a dataset that is topologically regular with variable spacing in the three coordinate directions
Definition: vtkRectilinearGrid.h:151
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:172
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:52
vtkDataObjectAlgorithm
Superclass for algorithms that produce only data object as output.
Definition: vtkDataObjectAlgorithm.h:63
vtkProgrammableSource::~vtkProgrammableSource
~vtkProgrammableSource() override
vtkProgrammableSource::RequestedDataType
int RequestedDataType
Definition: vtkProgrammableSource.h:157
vtkStructuredGrid
topologically regular array of data
Definition: vtkStructuredGrid.h:167
vtkProgrammableSource::ExecuteMethod
ProgrammableMethodCallbackType ExecuteMethod
Definition: vtkProgrammableSource.h:151
vtkProgrammableSource::GetStructuredGridOutput
vtkStructuredGrid * GetStructuredGridOutput()
Get the output as a concrete type.
vtkProgrammableSource::SetExecuteMethod
void SetExecuteMethod(void(*f)(void *), void *arg)
Specify the function to use to generate the source data.
vtkProgrammableSource::RequestInformation
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
vtkProgrammableSource::ExecuteTime
vtkTimeStamp ExecuteTime
Definition: vtkProgrammableSource.h:156
vtkProgrammableSource::RequestInformationMethod
ProgrammableMethodCallbackType RequestInformationMethod
Definition: vtkProgrammableSource.h:154
vtkProgrammableSource
generate source dataset via a user-specified function
Definition: vtkProgrammableSource.h:93
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkProgrammableSource::GetPolyDataOutput
vtkPolyData * GetPolyDataOutput()
Get the output as a concrete type.
vtkProgrammableSource::GetRectilinearGridOutput
vtkRectilinearGrid * GetRectilinearGridOutput()
Get the output as a concrete type.
vtkMolecule
class describing a molecule
Definition: vtkMolecule.h:111
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkProgrammableSource::GetGraphOutput
vtkGraph * GetGraphOutput()
Get the output as a concrete type.
vtkProgrammableSource::RequestDataObject
int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
vtkProgrammableSource::GetUnstructuredGridOutput
vtkUnstructuredGrid * GetUnstructuredGridOutput()
Get the output as a concrete type.
vtkProgrammableSource::SetExecuteMethodArgDelete
void SetExecuteMethodArgDelete(void(*f)(void *))
Set the arg delete method.
vtkProgrammableSource::GetMoleculeOutput
vtkMolecule * GetMoleculeOutput()
Get the output as a concrete type.
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:204
vtkDataObjectAlgorithm.h
vtkProgrammableSource::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
vtkGraph
Base class for graph data types.
Definition: vtkGraph.h:339
vtkProgrammableSource::GetStructuredPointsOutput
vtkStructuredPoints * GetStructuredPointsOutput()
Get the output as a concrete type.
vtkProgrammableSource::vtkProgrammableSource
vtkProgrammableSource()