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 
42 #ifndef vtkMatlabEngineFilter_h
43 #define vtkMatlabEngineFilter_h
44 
45 #include "vtkFiltersMatlabModule.h"
46 #include "vtkDataObjectAlgorithm.h"
47 
49 class vtkMatlabEngineFilterInternals;
50 class vtkDataSet;
51 class vtkDoubleArray;
52 
53 class VTKFILTERSMATLAB_EXPORT vtkMatlabEngineFilter : public vtkDataObjectAlgorithm
54 {
55 
56 public:
57 
58  static vtkMatlabEngineFilter *New();
59 
61  void PrintSelf(ostream& os, vtkIndent indent);
62 
67  void PutArray(const char* NameOfVTKArray, const char* NameOfMatVar);
68 
74  void GetArray(const char* NameOfVTKArray, const char* NameOfMatVar);
75 
77  void RemoveAllPutVariables();
78 
80  void RemoveAllGetVariables();
81 
83 
85  vtkSetStringMacro(MatlabScript);
86  vtkGetStringMacro(MatlabScript);
88 
90 
92  vtkSetStringMacro(ScriptFname);
93  vtkGetStringMacro(ScriptFname);
95 
97 
98  vtkSetMacro(EngineVisible,int);
99  vtkGetMacro(EngineVisible,int);
101 
103 
104  vtkSetMacro(EngineOutput,int);
105  vtkGetMacro(EngineOutput,int);
107 
109 
115  vtkSetMacro(TimeOutput,int);
116  vtkGetMacro(TimeOutput,int);
118 
120 
122  vtkSetMacro(BlockInfoOutput,int);
123  vtkGetMacro(BlockInfoOutput,int);
125 
127 
128  virtual int ProcessRequest(vtkInformation* request,
129  vtkInformationVector** inputVector,
130  vtkInformationVector* outputVector);
132 
133 protected:
134 
135  int SetMatlabScriptFromFile(const char* fname);
136 
137  virtual int RequestData(vtkInformation *vtkNotUsed(request),
138  vtkInformationVector **inputVector,
139  vtkInformationVector *outputVector);
140 
142 
143  virtual int RequestDataObject(vtkInformation* request,
144  vtkInformationVector** inputVector,
145  vtkInformationVector* outputVector);
147 
150 
151 private:
152 
153  vtkMatlabEngineFilter(const vtkMatlabEngineFilter&); // Not implemented.
154  void operator=(const vtkMatlabEngineFilter&); // Not implemented.
155 
156  // Implementation details
157  vtkMatlabEngineFilterInternals* mefi;
158 
159  int ProcessDataSet(vtkDataSet* dsinp, vtkDataSet* dsout);
160 
162  char* MatlabScript;
163  char* MatlabFileScript;
164  char* ScriptFname;
165  int EngineVisible;
166  int EngineOutput;
167  int TimeOutput;
168  int BlockInfoOutput;
169  char* OutputBuffer;
170  vtkDoubleArray* CurrentTime;
171  vtkDoubleArray* TimeRange;
172  vtkDoubleArray* TimeSteps;
173  vtkDoubleArray* BlockId;
174  vtkDoubleArray* NumBlocks;
175 
176 };
177 
178 #endif
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:61
static vtkDataObjectAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:38
Superclass for algorithms that produce only data object as output.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Store zero or more vtkInformation instances.