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 
37 #ifndef vtkMatlabEngineFilter_h
38 #define vtkMatlabEngineFilter_h
39 
40 #include "vtkFiltersMatlabModule.h" // For export macro
41 #include "vtkDataObjectAlgorithm.h"
42 
44 class vtkMatlabEngineFilterInternals;
45 class vtkDataSet;
46 class vtkDoubleArray;
47 
48 class VTKFILTERSMATLAB_EXPORT vtkMatlabEngineFilter : public vtkDataObjectAlgorithm
49 {
50 
51 public:
52 
53  static vtkMatlabEngineFilter *New();
54 
56  void PrintSelf(ostream& os, vtkIndent indent);
57 
65  void PutArray(const char* NameOfVTKArray, const char* NameOfMatVar);
66 
74  void GetArray(const char* NameOfVTKArray, const char* NameOfMatVar);
75 
79  void RemoveAllPutVariables();
80 
84  void RemoveAllGetVariables();
85 
87 
90  vtkSetStringMacro(MatlabScript);
91  vtkGetStringMacro(MatlabScript);
93 
95 
98  vtkSetStringMacro(ScriptFname);
99  vtkGetStringMacro(ScriptFname);
101 
103 
106  vtkSetMacro(EngineVisible,int);
107  vtkGetMacro(EngineVisible,int);
109 
111 
114  vtkSetMacro(EngineOutput,int);
115  vtkGetMacro(EngineOutput,int);
117 
119 
128  vtkSetMacro(TimeOutput,int);
129  vtkGetMacro(TimeOutput,int);
131 
133 
137  vtkSetMacro(BlockInfoOutput,int);
138  vtkGetMacro(BlockInfoOutput,int);
140 
144  virtual int ProcessRequest(vtkInformation* request,
145  vtkInformationVector** inputVector,
146  vtkInformationVector* outputVector);
147 
148 protected:
149 
150  int SetMatlabScriptFromFile(const char* fname);
151 
152  virtual int RequestData(vtkInformation *vtkNotUsed(request),
153  vtkInformationVector **inputVector,
154  vtkInformationVector *outputVector);
155 
159  virtual int RequestDataObject(vtkInformation* request,
160  vtkInformationVector** inputVector,
161  vtkInformationVector* outputVector);
162 
165 
166 private:
167 
168  vtkMatlabEngineFilter(const vtkMatlabEngineFilter&) VTK_DELETE_FUNCTION;
169  void operator=(const vtkMatlabEngineFilter&) VTK_DELETE_FUNCTION;
170 
171  // Implementation details
172  vtkMatlabEngineFilterInternals* mefi;
173 
174  int ProcessDataSet(vtkDataSet* dsinp, vtkDataSet* dsout);
175 
177  char* MatlabScript;
178  char* MatlabFileScript;
179  char* ScriptFname;
180  int EngineVisible;
181  int EngineOutput;
182  int TimeOutput;
183  int BlockInfoOutput;
184  char* OutputBuffer;
185  vtkDoubleArray* CurrentTime;
186  vtkDoubleArray* TimeRange;
187  vtkDoubleArray* TimeSteps;
188  vtkDoubleArray* BlockId;
189  vtkDoubleArray* NumBlocks;
190 
191 };
192 
193 #endif
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
static vtkDataObjectAlgorithm * New()
This class defines a VTK inteface to the MathWorks Matlab Engine.
This VTK uses the vtkMatlabEngineInterface class to perform calculations on VTK array input using the...
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:33
int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
see vtkAlgorithm for details
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Superclass for algorithms that produce only data object as output.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.