VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Filters/Matlab/vtkMatlabEngineFilter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkMatlabEngineFilter.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 /*-------------------------------------------------------------------------
00016   Copyright 2009 Sandia Corporation.
00017   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00018   the U.S. Government retains certain rights in this software.
00019 -------------------------------------------------------------------------*/
00020 
00042 #ifndef vtkMatlabEngineFilter_h
00043 #define vtkMatlabEngineFilter_h
00044 
00045 #include "vtkFiltersMatlabModule.h"
00046 #include "vtkDataObjectAlgorithm.h"
00047 
00048 class vtkMatlabEngineInterface;
00049 class vtkMatlabEngineFilterInternals;
00050 class vtkDataSet;
00051 class vtkDoubleArray;
00052 
00053 class VTKFILTERSMATLAB_EXPORT vtkMatlabEngineFilter : public vtkDataObjectAlgorithm
00054 {
00055 
00056 public:
00057 
00058   static vtkMatlabEngineFilter *New();
00059 
00060   vtkTypeMacro(vtkMatlabEngineFilter, vtkDataObjectAlgorithm );
00061   void PrintSelf(ostream& os, vtkIndent indent);
00062 
00067   void PutArray(const char* NameOfVTKArray, const char* NameOfMatVar);
00068 
00074   void GetArray(const char* NameOfVTKArray, const char* NameOfMatVar);
00075 
00077   void RemoveAllPutVariables();
00078 
00080   void RemoveAllGetVariables();
00081 
00083 
00085   vtkSetStringMacro(MatlabScript);
00086   vtkGetStringMacro(MatlabScript);
00088 
00090 
00092   vtkSetStringMacro(ScriptFname);
00093   vtkGetStringMacro(ScriptFname);
00095 
00097 
00098   vtkSetMacro(EngineVisible,int);
00099   vtkGetMacro(EngineVisible,int);
00101 
00103 
00104   vtkSetMacro(EngineOutput,int);
00105   vtkGetMacro(EngineOutput,int);
00107 
00109 
00115   vtkSetMacro(TimeOutput,int);
00116   vtkGetMacro(TimeOutput,int);
00118 
00120 
00122   vtkSetMacro(BlockInfoOutput,int);
00123   vtkGetMacro(BlockInfoOutput,int);
00125 
00127 
00128   virtual int ProcessRequest(vtkInformation* request,
00129                              vtkInformationVector** inputVector,
00130                              vtkInformationVector* outputVector);
00132 
00133 protected:
00134 
00135   int SetMatlabScriptFromFile(const char* fname);
00136 
00137   virtual int RequestData(vtkInformation *vtkNotUsed(request),
00138                           vtkInformationVector **inputVector,
00139                           vtkInformationVector *outputVector);
00140 
00142 
00143   virtual int RequestDataObject(vtkInformation* request,
00144                                 vtkInformationVector** inputVector,
00145                                 vtkInformationVector* outputVector);
00147 
00148   vtkMatlabEngineFilter();
00149   ~vtkMatlabEngineFilter();
00150 
00151 private:
00152 
00153   vtkMatlabEngineFilter(const vtkMatlabEngineFilter&);  // Not implemented.
00154   void operator=(const vtkMatlabEngineFilter&);  // Not implemented.
00155 
00156   // Implementation details
00157   vtkMatlabEngineFilterInternals* mefi;
00158 
00159   int ProcessDataSet(vtkDataSet* dsinp, vtkDataSet* dsout);
00160 
00161   vtkMatlabEngineInterface* mengi;
00162   char* MatlabScript;
00163   char* MatlabFileScript;
00164   char* ScriptFname;
00165   int EngineVisible;
00166   int EngineOutput;
00167   int TimeOutput;
00168   int BlockInfoOutput;
00169   char* OutputBuffer;
00170   vtkDoubleArray* CurrentTime;
00171   vtkDoubleArray* TimeRange;
00172   vtkDoubleArray* TimeSteps;
00173   vtkDoubleArray* BlockId;
00174   vtkDoubleArray* NumBlocks;
00175 
00176 };
00177 
00178 #endif