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
50class vtkPolyData;
55
56class VTKFILTERSSOURCES_EXPORT vtkProgrammableSource : public vtkDataSetAlgorithm
57{
58public:
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
117protected:
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
133private:
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
Superclass for algorithms that produce output of the same type as input.
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
generate source dataset via a user-specified function
vtkRectilinearGrid * GetRectilinearGridOutput()
Get the output as a concrete type.
vtkPolyData * GetPolyDataOutput()
Get the output as a concrete type.
~vtkProgrammableSource() override
void SetExecuteMethod(void(*f)(void *), void *arg)
Specify the function to use to generate the source data.
static vtkProgrammableSource * New()
void SetExecuteMethodArgDelete(void(*f)(void *))
Set the arg delete method.
vtkStructuredPoints * GetStructuredPointsOutput()
Get the output as a concrete type.
vtkStructuredGrid * GetStructuredGridOutput()
Get the output as a concrete type.
void SetRequestInformationMethod(void(*f)(void *))
Specify the function to use to fill in information about the source data.
vtkUnstructuredGrid * GetUnstructuredGridOutput()
Get the output as a concrete type.
a dataset that is topologically regular with variable spacing in the three coordinate directions
topologically regular array of data
A subclass of ImageData.
record modification and/or execution time
Definition: vtkTimeStamp.h:36
dataset represents arbitrary combinations of all possible cell types