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:
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:40
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:57
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:36
vtkProgrammableSource::~vtkProgrammableSource
~vtkProgrammableSource() override
vtkStructuredGrid
topologically regular array of data
Definition: vtkStructuredGrid.h:64
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.
vtkDataSetAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkDataSetAlgorithm.h:52
vtkProgrammableSource
generate source dataset via a user-specified function
Definition: vtkProgrammableSource.h:57
vtkProgrammableSource::GetPolyDataOutput
vtkPolyData * GetPolyDataOutput()
Get the output as a concrete type.
vtkProgrammableSource::GetRectilinearGridOutput
vtkRectilinearGrid * GetRectilinearGridOutput()
Get the output as a concrete type.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkDataSetAlgorithm.h
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
vtkProgrammableSource::GetUnstructuredGridOutput
vtkUnstructuredGrid * GetUnstructuredGridOutput()
Get the output as a concrete type.
vtkProgrammableSource::SetExecuteMethodArgDelete
void SetExecuteMethodArgDelete(void(*f)(void *))
Set the arg delete method.
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:83
vtkProgrammableSource::GetStructuredPointsOutput
vtkStructuredPoints * GetStructuredPointsOutput()
Get the output as a concrete type.
vtkProgrammableSource::vtkProgrammableSource
vtkProgrammableSource()