VTK
vtkMatlabEngineFilter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkMatlabEngineFilter.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=========================================================================*/
15/*-------------------------------------------------------------------------
16 Copyright 2009 Sandia Corporation.
17 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18 the U.S. Government retains certain rights in this software.
19-------------------------------------------------------------------------*/
20
43#ifndef vtkMatlabEngineFilter_h
44#define vtkMatlabEngineFilter_h
45
46#include "vtkFiltersMatlabModule.h" // For export macro
48
50class vtkMatlabEngineFilterInternals;
51class vtkDataSet;
52class vtkDoubleArray;
53
54class VTKFILTERSMATLAB_EXPORT vtkMatlabEngineFilter : public vtkDataObjectAlgorithm
55{
56
57public:
58
60
62 void PrintSelf(ostream& os, vtkIndent indent);
63
71 void PutArray(const char* NameOfVTKArray, const char* NameOfMatVar);
72
80 void GetArray(const char* NameOfVTKArray, const char* NameOfMatVar);
81
86
91
93
96 vtkSetStringMacro(MatlabScript);
97 vtkGetStringMacro(MatlabScript);
99
101
104 vtkSetStringMacro(ScriptFname);
105 vtkGetStringMacro(ScriptFname);
107
109
112 vtkSetMacro(EngineVisible,int);
113 vtkGetMacro(EngineVisible,int);
115
117
120 vtkSetMacro(EngineOutput,int);
121 vtkGetMacro(EngineOutput,int);
123
125
134 vtkSetMacro(TimeOutput,int);
135 vtkGetMacro(TimeOutput,int);
137
139
143 vtkSetMacro(BlockInfoOutput,int);
144 vtkGetMacro(BlockInfoOutput,int);
146
150 virtual int ProcessRequest(vtkInformation* request,
151 vtkInformationVector** inputVector,
152 vtkInformationVector* outputVector);
153
154protected:
155
156 int SetMatlabScriptFromFile(const char* fname);
157
158 virtual int RequestData(vtkInformation *vtkNotUsed(request),
159 vtkInformationVector **inputVector,
160 vtkInformationVector *outputVector);
161
165 virtual int RequestDataObject(vtkInformation* request,
166 vtkInformationVector** inputVector,
167 vtkInformationVector* outputVector);
168
171
172private:
173
174 vtkMatlabEngineFilter(const vtkMatlabEngineFilter&) VTK_DELETE_FUNCTION;
175 void operator=(const vtkMatlabEngineFilter&) VTK_DELETE_FUNCTION;
176
177 // Implementation details
178 vtkMatlabEngineFilterInternals* mefi;
179
180 int ProcessDataSet(vtkDataSet* dsinp, vtkDataSet* dsout);
181
183 char* MatlabScript;
184 char* MatlabFileScript;
185 char* ScriptFname;
186 int EngineVisible;
187 int EngineOutput;
188 int TimeOutput;
189 int BlockInfoOutput;
190 char* OutputBuffer;
191 vtkDoubleArray* CurrentTime;
192 vtkDoubleArray* TimeRange;
193 vtkDoubleArray* TimeSteps;
194 vtkDoubleArray* BlockId;
195 vtkDoubleArray* NumBlocks;
196
197};
198
199#endif
Superclass for algorithms that produce only data object as output.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
This VTK uses the vtkMatlabEngineInterface class to perform calculations on VTK array input using the...
virtual int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Creates the same output type as the input type.
virtual int RequestData(vtkInformation *vtkNotUsed(request), vtkInformationVector **inputVector, vtkInformationVector *outputVector)
void RemoveAllGetVariables()
Clears the list of variables to be copied from the Matlab engine.
static vtkMatlabEngineFilter * New()
void RemoveAllPutVariables()
Clears the list of variables to be copied to the Matlab engine.
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is required to capture REQUEST_DATA_OBJECT requests.
void PutArray(const char *NameOfVTKArray, const char *NameOfMatVar)
Copies vtkDataArray named NameOfVTKArray to the Matlab engine with Matlab variable name NameOfMatVar.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void GetArray(const char *NameOfVTKArray, const char *NameOfMatVar)
Copies Matlab variable NameOfMatVar from the Matlab Engine to the vtkDataArray named NameOfVTKArray.
int SetMatlabScriptFromFile(const char *fname)
This class defines a VTK inteface to the MathWorks Matlab Engine.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.