VTK
vtkMatlabEngineInterface.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMatlabEngineInterface.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 
50 #ifndef vtkMatlabEngineInterface_h
51 #define vtkMatlabEngineInterface_h
52 
53 #include "vtkFiltersMatlabModule.h" // For export macro
54 #include "vtkObject.h"
55 
56 class vtkArray;
57 class vtkDataArray;
58 class vtkMatlabEngineSingleton;
60 
61 class VTKFILTERSMATLAB_EXPORT vtkMatlabEngineInterface : public vtkObject
62 {
63 
64 public:
65 
67 
69  void PrintSelf(ostream& os, vtkIndent indent);
70 
74  int EngineOpen();
75 
81  int EvalString(const char* string);
82 
87  int PutVtkDataArray(const char* name, vtkDataArray* vda);
88 
94 
99  int PutVtkArray(const char* name, vtkArray* vda);
100 
105  vtkArray* GetVtkArray(const char* name);
106 
111  int OutputBuffer(char* p, int n);
112 
117 
122 
123 protected:
124 
127 
128 
129 private:
130 
131  vtkMatlabEngineInterface(const vtkMatlabEngineInterface&) VTK_DELETE_FUNCTION;
132  void operator=(const vtkMatlabEngineInterface&) VTK_DELETE_FUNCTION;
133 
134  vtkMatlabEngineSingleton* meng;
135  vtkMatlabMexAdapter* vmma;
136 
137 };
138 
139 #endif
vtkMatlabEngineInterface::EvalString
int EvalString(const char *string)
Input char string is a Matlab command or a series of Matlab commands read from an input file.
vtkMatlabMexAdapter
This is a utility class to convert VTK array data to and from the Matlab mxArray format.
Definition: vtkMatlabMexAdapter.h:70
vtkMatlabEngineInterface::GetVtkDataArray
vtkDataArray * GetVtkDataArray(const char *name)
Get Matlab variable name from Matlab Engine and return as vtkDataArray (memory allocated) Returns 0 i...
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:60
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkMatlabEngineInterface::SetVisibleOff
int SetVisibleOff()
Turns visibility off.
vtkMatlabEngineInterface::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkMatlabEngineInterface::SetVisibleOn
int SetVisibleOn()
Turns the Matlab Engine process visible, so users can interact directly with Matlab.
vtkMatlabEngineInterface
This class defines a VTK inteface to the MathWorks Matlab Engine.
Definition: vtkMatlabEngineInterface.h:62
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkMatlabEngineInterface::EngineOpen
int EngineOpen()
Non zero if Matlab engine connection is open.
vtkX3D::name
@ name
Definition: vtkX3D.h:219
vtkArray
Abstract interface for N-dimensional arrays.
Definition: vtkArray.h:71
vtkObject.h
vtkMatlabEngineInterface::~vtkMatlabEngineInterface
~vtkMatlabEngineInterface()
vtkMatlabEngineInterface::GetVtkArray
vtkArray * GetVtkArray(const char *name)
Get Matlab variable name from Matlab Engine and return as vtkArray (memory allocated) Returns 0 if va...
vtkMatlabEngineInterface::PutVtkDataArray
int PutVtkDataArray(const char *name, vtkDataArray *vda)
Send input vtkDataArray vda to the Matlab Engine as Matlab variable named name Returns 0 if variable ...
vtkMatlabEngineInterface::OutputBuffer
int OutputBuffer(char *p, int n)
Use char buffer p of length n to store console output from the Matlab Engine.
vtkMatlabEngineInterface::PutVtkArray
int PutVtkArray(const char *name, vtkArray *vda)
Send input vtkArray vda to the Matlab Engine as Matlab variable named name Returns 0 if variable was ...
vtkMatlabEngineInterface::vtkMatlabEngineInterface
vtkMatlabEngineInterface()
vtkMatlabEngineInterface::New
static vtkMatlabEngineInterface * New()