VTK
dox/Graphics/vtkRAdapter.h
Go to the documentation of this file.
00001 
00002 /*=========================================================================
00003 
00004   Program:   Visualization Toolkit
00005   Module:    vtkRAdapter.h
00006 
00007   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00016 /*-------------------------------------------------------------------------
00017   Copyright 2009 Sandia Corporation.
00018   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00019   the U.S. Government retains certain rights in this software.
00020 -------------------------------------------------------------------------*/
00021 
00047 #ifndef __vtkRAdapter
00048 #define __vtkRAdapter
00049 
00050 #include "vtkObject.h"
00051 #include "Rinternals.h" // Needed for Rinternals.h SEXP data structure
00052 
00053 class vtkInformation;
00054 class vtkInformationVector;
00055 class vtkDataArray;
00056 class vtkArray;
00057 class vtkTable;
00058 class vtkDataArrayCollection;
00059 class vtkArrayData;
00060 class vtkDataObjectCollection;
00061 
00062 class VTK_GRAPHICS_EXPORT vtkRAdapter : public vtkObject
00063 {
00064 
00065 public:
00066 
00067   vtkTypeMacro(vtkRAdapter, vtkObject);
00068 
00069   void PrintSelf(ostream& os, vtkIndent indent);
00070 
00071   static vtkRAdapter *New();
00072 
00073 //BTX
00077   vtkDataArray* RToVTKDataArray(SEXP variable);
00078 
00082   vtkArray* RToVTKArray(SEXP variable);
00083 
00086   SEXP VTKDataArrayToR(vtkDataArray* da);
00087 
00090   SEXP VTKArrayToR(vtkArray* da);
00091 
00094   SEXP VTKTableToR(vtkTable* table);
00095 
00097 
00100   vtkTable* RToVTKTable(SEXP variable);
00101 //ETX
00103 
00104 protected:
00105   vtkRAdapter();
00106   ~vtkRAdapter();
00107 
00108 private:
00109 
00110   vtkRAdapter(const vtkRAdapter&); // Not implemented
00111   void operator=(const vtkRAdapter&); // Not implemented
00112 
00113   vtkDataArrayCollection* vdac;  // Collection of vtkDataArrays that have been converted from R.
00114   vtkArrayData* vad;  // Collection of vtkArrays that have been converted from R.
00115   vtkDataObjectCollection* vdoc; // Collection of vtkTables that have been converted from R.
00116 
00117 };
00118 
00119 
00120 #endif
00121 
00122 
00123