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
47 #include "vtkDataObjectAlgorithm.h"
48 
50 class vtkMatlabEngineFilterInternals;
51 class vtkDataSet;
52 class vtkDoubleArray;
53 
54 class VTKFILTERSMATLAB_EXPORT vtkMatlabEngineFilter : public vtkDataObjectAlgorithm
55 {
56 
57 public:
58 
59  static vtkMatlabEngineFilter *New();
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 
85  void RemoveAllPutVariables();
86 
90  void RemoveAllGetVariables();
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 
154 protected:
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 
172 private:
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
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:62
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:39
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.