VTK  9.0.1
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 "vtkDataObjectAlgorithm.h"
42 #include "vtkFiltersSourcesModule.h" // For export macro
43 
44 class vtkGraph;
45 class vtkMolecule;
46 class vtkPolyData;
47 class vtkRectilinearGrid;
48 class vtkStructuredGrid;
50 class vtkTable;
52 
53 class VTKFILTERSSOURCES_EXPORT vtkProgrammableSource : public vtkDataObjectAlgorithm
54 {
55 public:
58 
68  typedef void (*ProgrammableMethodCallbackType)(void* arg);
69 
74  void SetExecuteMethod(void (*f)(void*), void* arg);
75 
79  void SetExecuteMethodArgDelete(void (*f)(void*));
80 
84  void SetRequestInformationMethod(void (*f)(void*));
85 
87 
102 
103 protected:
106 
110 
111  ProgrammableMethodCallbackType ExecuteMethod; // function to invoke
112  ProgrammableMethodCallbackType ExecuteMethodArgDelete;
114  ProgrammableMethodCallbackType RequestInformationMethod; // function to invoke
115 
118 
119 private:
121  void operator=(const vtkProgrammableSource&) = delete;
122 };
123 
124 #endif
125 
126 // VTK-HeaderTest-Exclude: vtkProgrammableSource.h
vtkStructuredPoints
A subclass of ImageData.
Definition: vtkStructuredPoints.h:36
vtkProgrammableSource::ExecuteMethodArg
void * ExecuteMethodArg
Definition: vtkProgrammableSource.h:113
vtkProgrammableSource::GetTableOutput
vtkTable * GetTableOutput()
vtkProgrammableSource::ExecuteMethodArgDelete
ProgrammableMethodCallbackType ExecuteMethodArgDelete
Definition: vtkProgrammableSource.h:112
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()
vtkRectilinearGrid
a dataset that is topologically regular with variable spacing in the three coordinate directions
Definition: vtkRectilinearGrid.h:52
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:36
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:63
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:33
vtkDataObjectAlgorithm
Superclass for algorithms that produce only data object as output.
Definition: vtkDataObjectAlgorithm.h:44
vtkProgrammableSource::~vtkProgrammableSource
~vtkProgrammableSource() override
vtkProgrammableSource::RequestedDataType
int RequestedDataType
Definition: vtkProgrammableSource.h:117
vtkStructuredGrid
topologically regular array of data
Definition: vtkStructuredGrid.h:58
vtkProgrammableSource::ExecuteMethod
ProgrammableMethodCallbackType ExecuteMethod
Definition: vtkProgrammableSource.h:111
vtkProgrammableSource::GetStructuredGridOutput
vtkStructuredGrid * GetStructuredGridOutput()
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:116
vtkProgrammableSource::RequestInformationMethod
ProgrammableMethodCallbackType RequestInformationMethod
Definition: vtkProgrammableSource.h:114
vtkProgrammableSource
generate source dataset via a user-specified function
Definition: vtkProgrammableSource.h:54
vtkProgrammableSource::GetPolyDataOutput
vtkPolyData * GetPolyDataOutput()
Get the output as a concrete type.
vtkProgrammableSource::GetRectilinearGridOutput
vtkRectilinearGrid * GetRectilinearGridOutput()
vtkMolecule
class describing a molecule
Definition: vtkMolecule.h:92
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:65
vtkProgrammableSource::GetGraphOutput
vtkGraph * GetGraphOutput()
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:85
vtkProgrammableSource::GetUnstructuredGridOutput
vtkUnstructuredGrid * GetUnstructuredGridOutput()
vtkProgrammableSource::SetExecuteMethodArgDelete
void SetExecuteMethodArgDelete(void(*f)(void *))
Set the arg delete method.
vtkProgrammableSource::GetMoleculeOutput
vtkMolecule * GetMoleculeOutput()
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:93
vtkDataObjectAlgorithm.h
vtkProgrammableSource::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
vtkGraph
Base class for graph data types.
Definition: vtkGraph.h:290
vtkProgrammableSource::GetStructuredPointsOutput
vtkStructuredPoints * GetStructuredPointsOutput()
vtkProgrammableSource::vtkProgrammableSource
vtkProgrammableSource()